[GH-ISSUE #102] Unable to start Jenkins service in the ubuntu ... #54

Closed
opened 2026-03-03 13:58:44 +03:00 by kerem · 7 comments
Owner

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.

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.
kerem closed this issue 2026-03-03 13:58:44 +03:00
Author
Owner

@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?

<!-- gh-comment-id:981449954 --> @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?
Author
Owner

@Murugapk commented on GitHub (Nov 29, 2021):

It worked fine for long time but its not working since yesterday ....

<!-- gh-comment-id:981451791 --> @Murugapk commented on GitHub (Nov 29, 2021): It worked fine for long time but its not working since yesterday ....
Author
Owner

@konstruktoid commented on GitHub (Nov 29, 2021):

Okay, so what did you change yesterday?

<!-- gh-comment-id:981453184 --> @konstruktoid commented on GitHub (Nov 29, 2021): Okay, so what did you change yesterday?
Author
Owner

@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 jenkins118:121:Jenkins,,,:/var/lib/jenkins:/bin/bash...

As I got an open proxy issue from cloud account , I updated it ...

<!-- gh-comment-id:981456270 --> @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:x:118:121:Jenkins,,,:/var/lib/jenkins:/bin/bash... As I got an open proxy issue from cloud account , I updated it ...
Author
Owner

@konstruktoid commented on GitHub (Nov 29, 2021):

So you change the user and group ID for the jenkins user? Did you update all file permissions as well?

<!-- gh-comment-id:981459224 --> @konstruktoid commented on GitHub (Nov 29, 2021): So you change the user and group ID for the `jenkins` user? Did you update all file permissions as well?
Author
Owner

@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

<!-- gh-comment-id:981461857 --> @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
Author
Owner

@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.

<!-- gh-comment-id:981469409 --> @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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hardening#54
No description provided.