mirror of
https://github.com/konstruktoid/hardening.git
synced 2026-04-26 01:05:56 +03:00
[GH-ISSUE #102] Unable to start Jenkins service in the ubuntu ... #54
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Murugapk on GitHub (Nov 29, 2021).
Original GitHub issue: https://github.com/konstruktoid/hardening/issues/102
Originally assigned to: @konstruktoid on GitHub.
Unable to start Jenkins and getting the below error ... Also there is no error or issue found in jenkins log
journalctl -xe
Nov 29 06:01:53 ip-172-31-45-93 systemd[1]: Starting LSB: Start Jenkins at boot time...
-- Subject: Unit jenkins.service has begun start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- Unit jenkins.service has begun starting up.
Nov 29 06:01:53 ip-172-31-45-93 jenkins[15463]: Correct java version found
Nov 29 06:01:53 ip-172-31-45-93 jenkins[15463]: * Starting Jenkins Automation Server jenkins
Nov 29 06:01:53 ip-172-31-45-93 su[15520]: Successful su for jenkins by root
Nov 29 06:01:53 ip-172-31-45-93 su[15520]: + ??? root:jenkins
Nov 29 06:01:53 ip-172-31-45-93 su[15520]: pam_unix(su:session): session opened for user jenkins by (uid=0)
Nov 29 06:01:53 ip-172-31-45-93 systemd-logind[1010]: New session c12 of user jenkins.
-- Subject: A new session c12 has been created for user jenkins
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
-- A new session with the ID c12 has been created for the user jenkins.
-- The leading process of the session is 15520.
Nov 29 06:01:53 ip-172-31-45-93 systemd[1]: Started Session c12 of user jenkins.
-- Subject: Unit session-c12.scope has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- Unit session-c12.scope has finished starting up.
-- The start-up result is RESULT.
Nov 29 06:01:53 ip-172-31-45-93 su[15520]: pam_unix(su:session): session closed for user jenkins
Nov 29 06:01:53 ip-172-31-45-93 jenkins[15531]: jenkins: failed to open /var/log/jenkins/jenkins.log to log client stdout: Permission denied
Nov 29 06:01:53 ip-172-31-45-93 jenkins[15531]: jenkins: failed to open /var/log/jenkins/jenkins.log to log client stderr: Permission denied
Nov 29 06:01:54 ip-172-31-45-93 jenkins[15531]: jenkins: client (pid 15532) exited with 1 status
Nov 29 06:01:54 ip-172-31-45-93 systemd-logind[1010]: Removed session c12.
-- Subject: Session c12 has been terminated
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
-- A session with the ID c12 has been terminated.
Nov 29 06:01:54 ip-172-31-45-93 jenkins[15463]: ...fail!
Nov 29 06:01:54 ip-172-31-45-93 systemd[1]: jenkins.service: Control process exited, code=exited status=7
Nov 29 06:01:54 ip-172-31-45-93 systemd[1]: jenkins.service: Failed with result 'exit-code'.
Nov 29 06:01:54 ip-172-31-45-93 systemd[1]: Failed to start LSB: Start Jenkins at boot time.
-- Subject: Unit jenkins.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- Unit jenkins.service has failed.
-- The result is RESULT.
@konstruktoid commented on GitHub (Nov 29, 2021):
Hi @Murugapk, I'll look into it but could you please provide some information on how you installed Jenkins?
@Murugapk commented on GitHub (Nov 29, 2021):
It worked fine for long time but its not working since yesterday ....
@konstruktoid commented on GitHub (Nov 29, 2021):
Okay, so what did you change yesterday?
@Murugapk commented on GitHub (Nov 29, 2021):
I changed the Jenkins permission from /etc/passwd from " uid=117(jenkins) gid=120(jenkins) groups=120(jenkins)
" to jenkins❌118:121:Jenkins,,,:/var/lib/jenkins:/bin/bash...
As I got an open proxy issue from cloud account , I updated it ...
@konstruktoid commented on GitHub (Nov 29, 2021):
So you change the user and group ID for the
jenkinsuser? Did you update all file permissions as well?@Murugapk commented on GitHub (Nov 29, 2021):
yes , I updated the file permission for /var/log/jenkins directory
-rw-r--r-- 1 jenkins jenkins 9049 Oct 24 06:25 jenkins.log.6.gz
-rw-r--r-- 1 jenkins jenkins 7724 Nov 1 06:25 jenkins.log.5.gz
-rw-r--r-- 1 jenkins jenkins 8551 Nov 7 06:25 jenkins.log.4.gz
-rw-r--r-- 1 jenkins jenkins 7322 Nov 15 06:25 jenkins.log.3.gz
-rw-r--r-- 1 jenkins jenkins 5148 Nov 21 06:25 jenkins.log.2.gz
-rw-r--r-- 1 jenkins jenkins 105401 Nov 29 06:25 jenkins.log.1
-rw-r--r-- 1 jenkins jenkins 0 Nov 29 06:25 jenkins.log
@konstruktoid commented on GitHub (Nov 29, 2021):
This seems to be a general support issue to be honest, and you're not really giving any useful information from the logs or which steps you've performed to fix this before opening an issue.
Since the actual cause of the problem is that you changed the UID and GID of the Jenkins user and nothing really related to this repository, I'm going to close this issue.