Jenkins无法在macOS 10.12(Sierra)上启动 [英] Jenkins does not start on macOS 10.12 (Sierra)

查看:144
本文介绍了Jenkins无法在macOS 10.12(Sierra)上启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将macOS升级到Sierra之后,当我使用launchctl load启动Jenkins时,无法连接到localhost:8080.如果再次调用launchctl load,则会看到响应服务已加载".默认位置/var/log/jenkins/(在jenkins-ci.plist中设置)没有日志文件.我还尝试在该处创建jenkins.log并将其添加给jenkins用户,但仍然没有任何内容打印出来.

After upgrading my macOS to Sierra, when I start Jenkins using launchctl load I cannot connect to localhost:8080. If I call launchctl load again, I see response "service already loaded". There is no log file at the default location /var/log/jenkins/ (as set in jenkins-ci.plist). I also tried to create jenkins.log there and chown to jenkins user, but still nothing is printed there.

如果我尝试使用java -jar jenkins.war启动Jenkins,则可以连接到localhost,但是Jenkins将作为新安装运行.

If I try to start Jenkins using java -jar jenkins.war, I can connect to localhost, but Jenkins runs as a new installation.

我已安装了最新的JRE 1.8.0_102.

I have the latest JRE 1.8.0_102 installed.

如何诊断问题?

推荐答案

似乎Sierra更改了Jenkis文件夹的权限.所以最好的解决方案是:
1.将执行权限添加到org.jenkins-ci.plist:
sudo chmod +x /Library/LaunchDaemons/org.jenkins-ci.plist
2.将jenkins设置为/var/log/jenkins的所有者:
sudo chown jenkins /var/log/jenkins
3.启动詹金斯:
sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist

Seems that Sierra changed the permission of Jenkis folder. So the best solution is:
1. Add execute permissions to org.jenkins-ci.plist:
sudo chmod +x /Library/LaunchDaemons/org.jenkins-ci.plist
2. Set jenkins as the owner of /var/log/jenkins:
sudo chown jenkins /var/log/jenkins
3. Start Jenkins:
sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist

这篇关于Jenkins无法在macOS 10.12(Sierra)上启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆