I checked the status of the jenkins service and tried to restart it, but it did not start, so I looked at journalctl -xe. What is the problem and how to solve it?
[ec2-user@ip-x-x-x-x ~]$ systemctl status jenkins.service
● jenkins.service - LSB: Jenkins Automation Server
Loaded: loaded (/etc/rc.d/init.d/jenkins; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2021-07-07 03:28:41 UTC; 42min ago
Docs: man:systemd-sysv-generator(8)
Process: 7465 ExecStop=/etc/rc.d/init.d/jenkins stop (code=exited, status=0/SUCCESS)
Process: 7482 ExecStart=/etc/rc.d/init.d/jenkins start (code=exited, status=1/FAILURE)
Jul 07 03:28:40 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal systemd[1]: Stopped LSB: Jenkins Automation Server.
Jul 07 03:28:40 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal systemd[1]: Starting LSB: Jenkins Automation Server...
Jul 07 03:28:41 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal runuser[7488]: pam_unix(runuser:session): session opened for user jenkins by (uid=0)
Jul 07 03:28:41 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal jenkins[7482]: Starting Jenkins bash: fork: Cannot allocate memory
Jul 07 03:28:41 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal runuser[7488]: pam_unix(runuser:session): session closed for user jenkins
Jul 07 03:28:41 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal jenkins[7482]: [FAILED]
Jul 07 03:28:41 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal systemd[1]: jenkins.service: control process exited, code=exited status=1
Jul 07 03:28:41 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal systemd[1]: Failed to start LSB: Jenkins Automation Server.
Jul 07 03:28:41 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal systemd[1]: Unit jenkins.service entered failed state.
Jul 07 03:28:41 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal systemd[1]: jenkins.service failed.
[ec2-user@ip-x-x-x-x ~]$ systemctl restart jenkins.service
Failed to restart jenkins.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files
See system logs and 'systemctl status jenkins.service' for details.
Restarting jenkins (via systemctl): Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" a nd "journalctl -xe" for details.
[FAILED]
I checked the status of the jenkins service and tried to restart it, but it did not start, so I looked at journalctl -xe. What is the problem and how to solve it?
[ec2-user@ip-x-x-x-x ~]$ journalctl -xe
Jul 07 03:41:04 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal dhclient[1916]: DHCPREQUEST on eth0 to 172.31.48.1 port 67 (xid=0x24aee52e)
Jul 07 03:41:12 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal dhclient[1916]: DHCPACK from 172.31.48.1 (xid=0x24aee52e)
Jul 07 03:41:27 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal crond[8099]: PAM unable to dlopen(/usr/lib64/security/pam_loginuid.so): /usr/lib64/security/pam_loginuid.so: failed to map se
Jul 07 03:41:29 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal crond[8099]: PAM adding faulty module: /usr/lib64/security/pam_loginuid.so
Jul 07 03:41:38 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal dhclient[1961]: XMT: Solicit on eth0, interval 117070ms.
Jul 07 03:41:49 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal sshd[2294]: error: fork: Cannot allocate memory
Jul 07 03:42:12 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal dhclient[1916]: fork: Cannot allocate memory
Jul 07 03:42:48 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal crond[8099]: PAM unable to dlopen(/usr/lib64/security/pam_succeed_if.so): /usr/lib64/security/pam_succeed_if.so: failed to ma
Jul 07 03:42:52 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal crond[8099]: PAM adding faulty module: /usr/lib64/security/pam_succeed_if.so
Jul 07 03:42:54 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal dhclient[1916]: bound to 172.31.49.224 -- renewal in 1691 seconds.
Jul 07 03:43:06 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal crond[8099]: PAM unable to dlopen(/usr/lib64/security/pam_env.so): /usr/lib64/security/pam_env.so: failed to map segment from
Jul 07 03:43:09 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal crond[8099]: PAM adding faulty module: /usr/lib64/security/pam_env.so
Jul 07 03:43:49 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal dhclient[1961]: XMT: Solicit on eth0, interval 126820ms.
Jul 07 03:44:40 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal crond[8099]: (root) PAM ERROR (Module is unknown)
Jul 07 03:44:44 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal crond[8099]: (root) FAILED to authorize user with PAM (Module is unknown)
Jul 07 03:44:47 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal sshd[8097]: Invalid user jira from 195.133.40.60 port 52340
Jul 07 03:44:47 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal sshd[8097]: input_userauth_request: invalid user jira [preauth]
Jul 07 03:44:47 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal sshd[8096]: Received disconnect from 195.133.40.60 port 40570:11: Normal Shutdown, Thank you for playing [preauth]
Jul 07 03:44:47 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal sshd[8096]: Disconnected from 195.133.40.60 port 40570 [preauth]
Jul 07 03:44:47 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal sshd[8091]: Received disconnect from 195.133.40.60 port 57050:11: Normal Shutdown, Thank you for playing [preauth]
Jul 07 03:44:47 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal sshd[8091]: Disconnected from 195.133.40.60 port 57050 [preauth]
Jul 07 03:44:47 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal sshd[8087]: Received disconnect from 195.133.40.60 port 45284:11: Normal Shutdown, Thank you for playing [preauth]
Jul 07 03:44:47 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal sshd[8087]: Disconnected from 195.133.40.60 port 45284 [preauth]
Jul 07 03:44:47 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal sshd[8097]: Received disconnect from 195.133.40.60 port 52340:11: Normal Shutdown, Thank you for playing [preauth]
Jul 07 03:44:47 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal sshd[8097]: Disconnected from 195.133.40.60 port 52340 [preauth]
Jul 07 03:45:57 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal dhclient[1961]: XMT: Solicit on eth0, interval 115360ms.
Jul 07 03:47:53 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal dhclient[1961]: XMT: Solicit on eth0, interval 128820ms.
Jul 07 03:50:01 ip-x-x-x-x.ap-northeast-2.x-x-x-x.internal systemd[1]: Created slice User Slice of root.