Jenkins install failed

Hello,

When I start up Jenkins I see this message in the journal

Apr 06 09:53:13 jenkins.stratos.xfusioncorp.com systemd[1]: systemd-journald.service: Failed to add fd to store: Operation not permitted

Which is wierd because im root here.
Any hints to solve this

Have you got SELinux or AppArmor running?

nope, I try this on this lab : Jenkins install and I think those are not installed on your own Jenkins server.

And I cannot image that Win10 is too blame here or Firefox.

Do you have a link to the lab please?

yep, this is my lab: KodeKloud - Engineer | Task

and im following this tutorial : How to Install Jenkins on CentOS 8?

and the problem arises from the systemctl start jenkins step

I see now this arirse from the prompt :

[root@jenkins ~]# sudo systemctl start jenkins
Job for jenkins.service failed because a timeout was exceeded.
See "systemctl status jenkins.service" and "journalctl -xe" for details.

There is a link in the description that explains what you need to do it there is a timeout starting Jenkins. I have just completed this lab without experiencing the timeout.

Also if you are already root you don’t need to use sudo.

found the link but I cannot find the service file anywhere.

and still this error in the journal :

Apr 06 14:44:52 jenkins.stratos.xfusioncorp.com systemd[1]: systemd-journald.service: Failed to add fd
 to store: Operation not permitted

installed openjdk 11

I installed java-17-openjdk but it should be no different. Can you give a list of commands you are running and the output.

of course :

ssh root@jenkins
The authenticity of host 'jenkins (172.16.238.19)' can't be established.
ECDSA key fingerprint is SHA256:8x9FMcwmncQ3i0yKWQZ0bwgfHpWr51D+xG1VrqA1HsQ.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'jenkins,172.16.238.19' (ECDSA) to the list of known hosts.
root@jenkins's password: 

yum -y install java-11-openjdk-devel
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

CentOS Stream 8 - AppStream                                                                    14 kB/s | 4.4 kB     00:00    
CentOS Stream 8 - AppStream                                                                    25 MB/s |  28 MB     00:01    
CentOS Stream 8 - BaseOS                                                                       13 kB/s | 3.9 kB     00:00    
CentOS Stream 8 - BaseOS                                                                       23 MB/s |  10 MB     00:00    
CentOS Stream 8 - Extras                                                                      7.8 kB/s | 2.9 kB     00:00    
CentOS Stream 8 - Extras common packages                                                      9.2 kB/s | 3.0 kB     00:00    
CentOS Stream 8 - Extras common packages                                                       18 kB/s | 7.7 kB     00:00    
Red Hat Universal Base Image 8 (RPMs) - BaseOS                                                3.5 MB/s | 718 kB     00:00    
Red Hat Universal Base Image 8 (RPMs) - AppStream                                              15 MB/s | 3.0 MB     00:00    
Red Hat Universal Base Image 8 (RPMs) - CodeReady Builder                                     682 kB/s | 102 kB     00:00    
Dependencies resolved.

A lot of packages and then this 
Complete!

wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat/jenkins.repo
--2024-04-06 15:09:53--  https://pkg.jenkins.io/redhat/jenkins.repo
Resolving pkg.jenkins.io (pkg.jenkins.io)... 151.101.2.133, 151.101.66.133, 151.101.130.133, ...
Connecting to pkg.jenkins.io (pkg.jenkins.io)|151.101.2.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 71
Saving to: '/etc/yum.repos.d/jenkins.repo'

/etc/yum.repos.d/jenkins.repo   100%[=====================================================>]      71  --.-KB/s    in 0s      

2024-04-06 15:09:54 (4.71 MB/s) - '/etc/yum.repos.d/jenkins.repo' saved [71/71]

rpm --import https://pkg.jenkins.io/redhat/jenkins.io-2023.key

yum -y install jenkins

Complete!

systemctl start jenkins
Job for jenkins.service failed because a timeout was exceeded.
See "systemctl status jenkins.service" and "journalctl -xe" for details.

So I see you didn’t update all the packages and are using an older version of Java than I used, also the devel paakage rather than main. However following your commands (and installing wget) I was able to replicate the time out issue. This is fixed as given in the guide by editing the service and setting the timeout to infinty:

vi /usr/lib/systemd/system/jenkins.service

Uncomment the line and set as follows:

TimeoutStartSec=infinity

Then run these commands:

systemctl daemon-reload
systemctl start jenkins

Thanks, I wil try that
What is then the right java version and how do I install that ?

I installed java-17-openjdk

Thanks, I will then try that one
11 is still failing with :

[root@jenkins ~]# vi /usr/lib/systemd/system/jenkins.service
[root@jenkins ~]# systemctl daemon-reload
[root@jenkins ~]# systemctl start jenkins
Job for jenkins.service failed because a timeout was exceeded.
See "systemctl status jenkins.service" and "journalctl -xe" for details

Did you uncomment this line:

#TimeoutStartSec=

and change it to:

TimeoutStartSec=infinity

Make sure infinity is spelt correctly.

oke,

I tried with java17 and everything worked fine.
After a whole afternoon finally this one solved