git Jenkins 服务不可用错误 - 503 - 以不同用户身份运行
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25881712/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Jenkins service unavailable error - 503 - running as different user
提问by user1373307
I am having a git repository which is restricted to my team and i want to set up jenkins in my system. Since jenkins runs as jenkins user, I am working on running jenkins as me. I followed the steps from http://blog.manula.org/2013/03/running-jenkins-under-different-user-in.htmlbut after this when i start jenkins I am getting Service unavailable error 503. Its because i changed user in /etc/default/jenkins to my id from jenkins. When i change it back to jenkins it works. There is no log in /var/log/jenkins/..Has anyone faced this issue before?.
我有一个仅限我的团队使用的 git 存储库,我想在我的系统中设置 jenkins。由于 jenkins 以 jenkins 用户身份运行,因此我正在以我的身份运行 jenkins。我按照http://blog.manula.org/2013/03/running-jenkins-under-different-user-in.html 中的步骤操作,但在此之后,当我启动 jenkins 时,我收到了服务不可用错误 503。这是因为我将 /etc/default/jenkins 中的用户从 jenkins 更改为我的 ID。当我把它改回 jenkins 时,它就起作用了。没有登录/var/log/jenkins/..有没有人遇到过这个问题?。
回答by Emmet Hung
I find out the directory owner of /var/cache/jenkins
and /var/lib/jenkins
somehow be changed back to jenkins, just redo
我找到了目录所有者/var/cache/jenkins
并/var/lib/jenkins
以某种方式改回詹金斯,只需重做
sudo chown YOUR_USER_NAME /var/lib/jenkins
sudo chown YOUR_USER_NAME /var/lib/jenkins
sudo chown YOUR_USER_NAME /var/cache/jenkins
sudo chown YOUR_USER_NAME /var/cache/jenkins
Restart jenkins, it should work.
重新启动詹金斯,它应该可以工作。
Also check /var/log/jenkins if the same problem shows there.
如果相同的问题出现在那里,还要检查 /var/log/jenkins。