美文网首页
Mac 安装 Jenkins 无法启动

Mac 安装 Jenkins 无法启动

作者: 顶宝麻麻 | 来源:发表于2019-07-30 11:28 被阅读0次

MacOS 10.14.1 版本
Jenkins 2.716.2.pkg

sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist
# 启动 Jenkins 命令
sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist
# 停止 Jenkins 命令

localhost:8080 无法访问

ps -ef | grep jenkins

没有jenkins进程,启动失败。查看vim /Library/LaunchDaemons/org.jenkins-ci.plist配置文件得知日志路径,查看日志 cat /var/log/jenkins/jenkins.log中发现如下错误:

Jenkins command line for execution: /usr/bin/java -Dfile.encoding=UTF-8 -XX:PermSize=256m -XX:MaxPermSize=512m -Xms256m -Xmx512m -Djava.io.tmpdir=/Users/Shared/Jenkins/tmp -jar /Applications/Jenkins/jenkins.war --httpPort=8080 Java HotSpot(TM) 64-Bit Server VM warning: Ignoring option PermSize; support was removed in 8.0 Java HotSpot(TM) 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0 7月 28, 2019 7:27:59 下午 Main verifyJavaVersion 严重: Running with Java class version 56 which is not in the list of supported versions: [52, 55]. Run with the --enable-future-java flag to enable such behavior. See https://jenkins.io/redirect/java-support/ java.lang.UnsupportedClassVersionError: 56.0 at Main.verifyJavaVersion(Main.java:174) at Main.main(Main.java:142) Jenkins requires Java versions [8, 11] but you are running with Java 12 from /Library/Java/JavaVirtualMachines/jdk-12.0.1.jdk/Contents/Home java.lang.UnsupportedClassVersionError: 56.0 at Main.verifyJavaVersion(Main.java:174) at Main.main(Main.java:142)

sudo /usr/bin/java -Dfile.encoding=UTF-8 -XX:PermSize=256m -XX:MaxPermSize=512m -Xms256m -Xmx512m -Djava.io.tmpdir=/Users/Shared/Jenkins/tmp -jar /Applications/Jenkins/jenkins.war --httpPort=8080 --enable-future-java

再次启动,访问 localhost:8080,访问成功~
PS:每次重新启动都需要执行以上命令

相关文章

网友评论

      本文标题:Mac 安装 Jenkins 无法启动

      本文链接:https://www.haomeiwen.com/subject/utkmrctx.html