Jboss 作为服务在操作系统重启 RHEL8 时失败

Jboss 作为服务在操作系统重启 RHEL8 时失败

0

在 RHEL8 服务器上运行 Jboss 作为服务时,我遇到了一些问题。服务设置按照 RHEL 指南以标准方式完成

https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.1/html/installation_guide/configuring_jboss_eap_to_run_as_a_service。

问题是使用 systemctl 命令手动启动/停止可以正常工作。但如果操作系统重新启动,它无法自动启动 Jboss 服务,并出现以下错误

[ec2-user@ip-xx-xx-xx-xx ~]$ sudo systemctl status jboss-eap-rhel
● jboss-eap-rhel.service - SYSV: JBoss EAP startup script
   Loaded: loaded (/etc/rc.d/init.d/jboss-eap-rhel.sh; generated)
   Active: failed (Result: protocol) since Tue 2022-10-18 02:09:10 UTC; 5min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 753 ExecStart=/etc/rc.d/init.d/jboss-eap-rhel.sh start (code=exited, status=0/SUCCESS)

Oct 18 02:06:50 ip-xx-xx-xx-xx.eu-west-1.compute.internal systemd[1]: Starting SYSV: JBoss EAP startup script...
Oct 18 02:06:50 ip-xx-xx-xx-xx.eu-west-1.compute.internal runuser[777]: pam_unix(runuser:session): session opened for user jboss by (uid=0)
Oct 18 02:06:50 ip-xx-xx-xx-xx.eu-west-1.compute.internal runuser[777]: pam_unix(runuser:session): session closed for user jboss
Oct 18 02:06:50 ip-xx-xx-xx-xx.eu-west-1.compute.internal jboss-eap-rhel.sh[753]: Starting jboss-eap: /
Oct 18 02:09:10 ip-xx-xx-xx-xx.eu-west-1.compute.internal jboss-eap-rhel.sh[753]: jboss-eap started with errors, please see server log for details
Oct 18 02:09:10 ip-xx-xx-xx-xx.eu-west-1.compute.internal jboss-eap-rhel.sh[753]: [  OK  ]
Oct 18 02:09:10 ip-xx-xx-xx-xx.eu-west-1.compute.internal systemd[1]: jboss-eap-rhel.service: Can't open PID file /var/run/jboss-eap/jboss-eap.pid (yet?) >
Oct 18 02:09:10 ip-xx-xx-xx-xx.eu-west-1.compute.internal systemd[1]: jboss-eap-rhel.service: Failed with result 'protocol'.
Oct 18 02:09:10 ip-xx-xx-xx-xx.eu-west-1.compute.internal systemd[1]: Failed to start SYSV: JBoss EAP startup script.

即使有详细的日志记录,主机控制器日志中也没有记录太多内容,进程突然以状态码 99 退出

2022-10-18 02:08:48,512 DEBUG [org.jboss.modules] (main) Module org.jboss.resteasy.resteasy-validator-provider defined by local module loader @65e2dbf3 (finder: local module finder @4f970963 (roots: /space/jboss/jboss-eap-7.4/modules,/space/jboss/jboss-eap-7.4/modules/system/layers/base/.overlays/layer-base-jboss-eap-7.4.4.CP,/space/jboss/jboss-eap-7.4/modules/system/layers/base))
2022-10-18 02:08:48,913 DEBUG [org.jboss.logging] (main) Logging Provider: org.jboss.logging.JBossLogManagerProvider
2022-10-18 02:08:49,042 FATAL [org.jboss.as.server] (main) WFLYSRV0239: Aborting with exit code 99

在进行故障排除时,有不少帖子指出这可能是 SELinux 拒绝权限的问题。尝试了 SELinux 允许/禁用的情况,但问题仍然存在。systemd 日志中也没有其他信息。有人能帮我解决上述问题吗?我不知道该怎么做。谢谢

相关内容