Unable to start Jenkins on OCI Instance

Hi ,

I am trying to install Jenkins on OCI instance using the below steps from URL - Linux

At step to start jenkins, i am getting below error . I have executed all the commands as root user. Please guide me in this issue.
[root@scheduler ~]# sudo systemctl start jenkins
Job for jenkins.service failed because the control process exited with error code. See “systemctl status jenkins.service” and “journalctl -xe” for details.

Thanks in advance

Hello @MoreshToraskar and welcome to this community :wave:

Could you launch the proposed commands systemctl status jenkins.service and journalctl -xe and paste the logs in here?

Thanks.

Hi @poddingue

Please find below details

[root@scheduler ~]# systemctl status jenkins.service
● jenkins.service - Jenkins Continuous Integration Server
Loaded: loaded (/usr/lib/systemd/system/jenkins.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/jenkins.service.d
└─override.conf
Active: activating (start) since Thu 2022-06-02 15:11:29 IST; 4s ago
Main PID: 25705 (java)
CGroup: /system.slice/jenkins.service
└─25705 /usr/bin/java -Djava.awt.headless=true -jar /usr/share/java/jenkins.war --webroot=%C/jenkins/war --httpPort=8989

Jun 02 15:11:29 scheduler systemd[1]: jenkins.service: main process exited, code=exited, status=1/FAILURE
Jun 02 15:11:29 scheduler systemd[1]: Failed to start Jenkins Continuous Integration Server.
Jun 02 15:11:29 scheduler systemd[1]: Unit jenkins.service entered failed state.
Jun 02 15:11:29 scheduler systemd[1]: jenkins.service failed.
Jun 02 15:11:29 scheduler systemd[1]: jenkins.service holdoff time over, scheduling restart.

[root@scheduler ~]# journalctl -xe
– Logs begin at Thu 2022-06-02 15:10:31 IST, end at Thu 2022-06-02 15:11:10 IST. –
Jun 02 15:11:10 scheduler jenkins[19968]: at winstone.HostConfiguration.getWebRoot(HostConfiguration.java:265)
Jun 02 15:11:10 scheduler jenkins[19968]: at winstone.HostConfiguration.(HostConfiguration.java:84)
Jun 02 15:11:10 scheduler jenkins[19968]: at winstone.HostGroup.initHost(HostGroup.java:66)
Jun 02 15:11:10 scheduler jenkins[19968]: at winstone.HostGroup.(HostGroup.java:45)
Jun 02 15:11:10 scheduler jenkins[19968]: at winstone.Launcher.(Launcher.java:174)
Jun 02 15:11:10 scheduler jenkins[19968]: at winstone.Launcher.main(Launcher.java:369)
Jun 02 15:11:10 scheduler jenkins[19968]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Jun 02 15:11:10 scheduler jenkins[19968]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[19968]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[19968]: at java.lang.reflect.Method.invoke(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[19968]: at Main._main(Main.java:304)
Jun 02 15:11:10 scheduler jenkins[19968]: at Main.main(Main.java:108)
Jun 02 15:11:10 scheduler jenkins[19968]: 2022-06-02 09:27:49.172+0000 [id=1] WARNING winstone.Logger#logInternal: Failed to delete dirs /var/lib/jenkins/%C/jenkins/war/scripts/yui/base/base-min.css
Jun 02 15:11:10 scheduler jenkins[19968]: java.nio.file.AccessDeniedException: %C/jenkins/war/scripts/yui/base/base-min.css
Jun 02 15:11:10 scheduler jenkins[19968]: at sun.nio.fs.UnixException.translateToIOException(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[19968]: at sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[19968]: at sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[19968]: at sun.nio.fs.UnixFileSystemProvider.implDelete(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[19968]: at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[19968]: at java.nio.file.Files.deleteIfExists(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[19968]: at winstone.HostConfiguration.deleteRecursive(HostConfiguration.java:330)
Jun 02 15:11:10 scheduler jenkins[19968]: at winstone.HostConfiguration.deleteRecursive(HostConfiguration.java:326)
Jun 02 15:11:10 scheduler jenkins[19968]: at winstone.HostConfiguration.deleteRecursive(HostConfiguration.java:326)
Jun 02 15:11:10 scheduler jenkins[19968]: at winstone.HostConfiguration.deleteRecursive(HostConfiguration.java:326)
Jun 02 15:11:10 scheduler jenkins[19968]: at winstone.HostConfiguration.deleteRecursive(HostConfiguration.java:326)
Jun 02 15:11:10 scheduler jenkins[19968]: at winstone.HostConfiguration.getWebRoot(HostConfiguration.java:265)
Jun 02 15:11:10 scheduler jenkins[23009]: at winstone.Launcher.main(Launcher.java:369)
Jun 02 15:11:10 scheduler jenkins[23009]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Jun 02 15:11:10 scheduler jenkins[23009]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[23009]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[23009]: at java.lang.reflect.Method.invoke(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[23009]: at Main._main(Main.java:304)
Jun 02 15:11:10 scheduler jenkins[23009]: at Main.main(Main.java:108)
Jun 02 15:11:10 scheduler jenkins[23009]: 2022-06-02 09:35:12.160+0000 [id=1] WARNING winstone.Logger#logInternal: Failed to delete dirs /var/lib/jenkins/%C/jenkins/war/help/project-config/triggerRemotely_zh_TW.html
Jun 02 15:11:10 scheduler jenkins[23009]: java.nio.file.AccessDeniedException: %C/jenkins/war/help/project-config/triggerRemotely_zh_TW.html
Jun 02 15:11:10 scheduler jenkins[23009]: at sun.nio.fs.UnixException.translateToIOException(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[23009]: at sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[23009]: at sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[23009]: at sun.nio.fs.UnixFileSystemProvider.implDelete(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[23009]: at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[23009]: at java.nio.file.Files.deleteIfExists(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[23009]: at winstone.HostConfiguration.deleteRecursive(HostConfiguration.java:330)
Jun 02 15:11:10 scheduler jenkins[23009]: at winstone.HostConfiguration.deleteRecursive(HostConfiguration.java:326)
Jun 02 15:11:10 scheduler jenkins[23009]: at winstone.HostConfiguration.deleteRecursive(HostConfiguration.java:326)
Jun 02 15:11:10 scheduler jenkins[23009]: at winstone.HostConfiguration.deleteRecursive(HostConfiguration.java:326)
Jun 02 15:11:10 scheduler jenkins[23009]: at winstone.HostConfiguration.getWebRoot(HostConfiguration.java:265)
Jun 02 15:11:10 scheduler jenkins[23009]: at winstone.HostConfiguration.(HostConfiguration.java:84)
Jun 02 15:11:10 scheduler jenkins[23009]: at winstone.HostGroup.initHost(HostGroup.java:66)
Jun 02 15:11:10 scheduler jenkins[23009]: at winstone.HostGroup.(HostGroup.java:45)
Jun 02 15:11:10 scheduler jenkins[23009]: at winstone.Launcher.(Launcher.java:174)
Jun 02 15:11:10 scheduler jenkins[23009]: at winstone.Launcher.main(Launcher.java:369)
Jun 02 15:11:10 scheduler jenkins[23009]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Jun 02 15:11:10 scheduler jenkins[23009]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[23009]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[23009]: at java.lang.reflect.Method.invoke(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[23009]: at Main._main(Main.java:304)
Jun 02 15:11:10 scheduler jenkins[23009]: at Main.main(Main.java:108)
Jun 02 15:11:10 scheduler jenkins[16148]: at winstone.HostConfiguration.deleteRecursive(HostConfiguration.java:326)
Jun 02 15:11:10 scheduler jenkins[16148]: at winstone.HostConfiguration.deleteRecursive(HostConfiguration.java:326)
Jun 02 15:11:10 scheduler jenkins[16148]: at winstone.HostConfiguration.deleteRecursive(HostConfiguration.java:326)
Jun 02 15:11:10 scheduler jenkins[16148]: at winstone.HostConfiguration.getWebRoot(HostConfiguration.java:265)
Jun 02 15:11:10 scheduler jenkins[16148]: at winstone.HostConfiguration.(HostConfiguration.java:84)
Jun 02 15:11:10 scheduler jenkins[16148]: at winstone.HostGroup.initHost(HostGroup.java:66)
Jun 02 15:11:10 scheduler jenkins[16148]: at winstone.HostGroup.(HostGroup.java:45)
Jun 02 15:11:10 scheduler jenkins[16148]: at winstone.Launcher.(Launcher.java:174)
Jun 02 15:11:10 scheduler jenkins[16148]: at winstone.Launcher.main(Launcher.java:369)
Jun 02 15:11:10 scheduler jenkins[16148]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Jun 02 15:11:10 scheduler jenkins[16148]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[16148]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[16148]: at java.lang.reflect.Method.invoke(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[16148]: at Main._main(Main.java:304)
Jun 02 15:11:10 scheduler jenkins[16148]: at Main.main(Main.java:108)
Jun 02 15:11:10 scheduler jenkins[16148]: 2022-06-02 09:18:17.372+0000 [id=1] WARNING winstone.Logger#logInternal: Failed to delete dirs /var/lib/jenkins/%C/jenkins/war/images/48x48/light-grey.png
Jun 02 15:11:10 scheduler jenkins[16148]: java.nio.file.AccessDeniedException: %C/jenkins/war/images/48x48/light-grey.png
Jun 02 15:11:10 scheduler jenkins[16148]: at sun.nio.fs.UnixException.translateToIOException(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[16148]: at sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[16148]: at sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[16148]: at sun.nio.fs.UnixFileSystemProvider.implDelete(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[16148]: at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[16148]: at java.nio.file.Files.deleteIfExists(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[16148]: at winstone.HostConfiguration.deleteRecursive(HostConfiguration.java:330)
Jun 02 15:11:10 scheduler jenkins[16148]: at winstone.HostConfiguration.deleteRecursive(HostConfiguration.java:326)
Jun 02 15:11:10 scheduler jenkins[16148]: at winstone.HostConfiguration.deleteRecursive(HostConfiguration.java:326)
Jun 02 15:11:10 scheduler jenkins[16148]: at winstone.HostConfiguration.deleteRecursive(HostConfiguration.java:326)
Jun 02 15:11:10 scheduler jenkins[16148]: at winstone.HostConfiguration.getWebRoot(HostConfiguration.java:265)
Jun 02 15:11:10 scheduler jenkins[16148]: at winstone.HostConfiguration.(HostConfiguration.java:84)
Jun 02 15:11:10 scheduler jenkins[16148]: at winstone.HostGroup.initHost(HostGroup.java:66)
Jun 02 15:11:10 scheduler jenkins[16148]: at winstone.HostGroup.(HostGroup.java:45)
Jun 02 15:11:10 scheduler jenkins[19006]: at winstone.HostConfiguration.deleteRecursive(HostConfiguration.java:326)
Jun 02 15:11:10 scheduler jenkins[19006]: at winstone.HostConfiguration.getWebRoot(HostConfiguration.java:265)
Jun 02 15:11:10 scheduler jenkins[19006]: at winstone.HostConfiguration.(HostConfiguration.java:84)
Jun 02 15:11:10 scheduler jenkins[19006]: at winstone.HostGroup.initHost(HostGroup.java:66)
Jun 02 15:11:10 scheduler jenkins[19006]: at winstone.HostGroup.(HostGroup.java:45)
Jun 02 15:11:10 scheduler jenkins[19006]: at winstone.Launcher.(Launcher.java:174)
Jun 02 15:11:10 scheduler jenkins[19006]: at winstone.Launcher.main(Launcher.java:369)
Jun 02 15:11:10 scheduler jenkins[19006]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Jun 02 15:11:10 scheduler jenkins[19006]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[19006]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[19006]: at java.lang.reflect.Method.invoke(Unknown Source)
Jun 02 15:11:10 scheduler jenkins[19006]: at Main._main(Main.java:304)
Jun 02 15:11:10 scheduler jenkins[19006]: at Main.main(Main.java:108)

1 Like

Thanks.
At first glance, it looks like a permission problem:

Failed to delete dirs /var/lib/jenkins/%C/jenkins/war/scripts/yui/base/base-min.css

But does that directory even exist? What is that %C? Why do we have jenkins twice in the path?
Would you mind uninstalling Jenkins and restart from sudo yum install jenkins ?

Hi @poddingue

I was able to resolve the installation issue with help of a colleague in our team. The issue was less memory on the server and installation issues. Thanks for your help!

1 Like

I would never have guessed memory could have been part of your problem. :wink:

Thanks a lot for your feedback, and happy to see you solved your problem. :pray:

1 Like