![重新启动 JBOSS EAP7 不会恢复服务](https://linux22.com/image/134982/%E9%87%8D%E6%96%B0%E5%90%AF%E5%8A%A8%20JBOSS%20EAP7%20%E4%B8%8D%E4%BC%9A%E6%81%A2%E5%A4%8D%E6%9C%8D%E5%8A%A1.png)
看下面的输出,我尝试在 CentOS7 上重新启动 JBOSS Eap7 应用程序,但它没有恢复。
# ps -ef | grep java
jboss 2906 2837 2 12:31 ? 00:00:15 java -D[Standalone] -server -verbose:gc -Xloggc:/opt/jboss/standalone/log/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=3M -XX:-TraceClassUnloading -Xms1303m -Xmx1303m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.boot.log.file=/opt/jboss/standalone/log/server.log -Dlogging.configuration=file:/opt/jboss/standalone/configuration/logging.properties -jar /opt/jboss/jboss-modules.jar -mp /opt/jboss/modules org.jboss.as.standalone -Djboss.home.dir=/opt/jboss -Djboss.server.base.dir=/opt/jboss/standalone -c standalone.xml
root 3188 2245 0 12:41 pts/0 00:00:00 grep --color=auto java
# systemctl status jbosseap7
● jbosseap7.service - JBoss EAP7
Loaded: loaded (/etc/systemd/system/jbosseap7.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2018-06-11 12:31:30 EDT; 9min ago
Process: 2791 ExecStop=/opt/jboss/bin/init.d/jboss-eap-rhel.sh stop (code=exited, status=0/SUCCESS)
Process: 2824 ExecStart=/opt/jboss/bin/init.d/jboss-eap-rhel.sh start (code=exited, status=0/SUCCESS)
Main PID: 2837 (standalone.sh)
CGroup: /system.slice/jbosseap7.service
├─2837 /bin/sh /opt/jboss/bin/standalone.sh -c standalone.xml
└─2906 java -D[Standalone] -server -verbose:gc -Xloggc:/opt/jboss/standalone/log/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -...
Jun 11 12:31:19 node01.local.com systemd[1]: Starting JBoss EAP7...
Jun 11 12:31:19 node01.local.com runuser[2835]: pam_unix(runuser:session): session opened for user jboss by (uid=0)
Jun 11 12:31:19 node01.local.com jboss-eap-rhel.sh[2824]: Starting jboss-eap: /
Jun 11 12:31:30 node01.local.com jboss-eap-rhel.sh[2824]: [ OK ]
Jun 11 12:31:30 node01.local.com systemd[1]: Started JBoss EAP7.
# systemctl restart jbosseap7
# systemctl status jbosseap7
● jbosseap7.service - JBoss EAP7
Loaded: loaded (/etc/systemd/system/jbosseap7.service; enabled; vendor preset: disabled)
Active: inactive (dead) since Mon 2018-06-11 12:42:03 EDT; 2s ago
Process: 3363 ExecStop=/opt/jboss/bin/init.d/jboss-eap-rhel.sh stop (code=exited, status=0/SUCCESS)
Process: 3223 ExecStart=/opt/jboss/bin/init.d/jboss-eap-rhel.sh start (code=exited, status=0/SUCCESS)
Main PID: 2837 (code=exited, status=0/SUCCESS)
Jun 11 12:41:32 node01.local.com systemd[1]: Starting JBoss EAP7...
Jun 11 12:41:32 node01.local.com runuser[3235]: pam_unix(runuser:session): session opened for user jboss by (uid=0)
Jun 11 12:41:32 node01.local.com jboss-eap-rhel.sh[3223]: Starting jboss-eap: /
Jun 11 12:42:03 node01.local.com jboss-eap-rhel.sh[3223]: jboss-eap started with errors, please see server log for details
Jun 11 12:42:03 node01.local.com jboss-eap-rhel.sh[3223]: [ OK ]
Jun 11 12:42:03 node01.local.com jboss-eap-rhel.sh[3363]: Stopping jboss-eap: [ OK ]
Jun 11 12:42:03 node01.local.com systemd[1]: Started JBoss EAP7.
# ps -ef | grep java
root 3372 2245 0 12:42 pts/0 00:00:00 grep --color=auto java
再次启动服务就可以正常工作了。但在这里我试图缩小重启问题的范围。因此,任何缩小这个问题范围的指示都将不胜感激。
# systemctl start jbosseap7
# ps -ef | grep java
jboss 3478 3409 62 12:46 ? 00:00:10 java -D[Standalone] -server -verbose:gc -Xloggc:/opt/jboss/standalone/log/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=3M -XX:-TraceClassUnloading -Xms1303m -Xmx1303m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.boot.log.file=/opt/jboss/standalone/log/server.log -Dlogging.configuration=file:/opt/jboss/standalone/configuration/logging.properties -jar /opt/jboss/jboss-modules.jar -mp /opt/jboss/modules org.jboss.as.standalone -Djboss.home.dir=/opt/jboss -Djboss.server.base.dir=/opt/jboss/standalone -c standalone.xml
root 3596 2245 0 12:46 pts/0 00:00:00 grep --color=auto java
# systemctl status jbosseap7
● jbosseap7.service - JBoss EAP7
Loaded: loaded (/etc/systemd/system/jbosseap7.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2018-06-11 12:46:53 EDT; 9s ago
Process: 3363 ExecStop=/opt/jboss/bin/init.d/jboss-eap-rhel.sh stop (code=exited, status=0/SUCCESS)
Process: 3396 ExecStart=/opt/jboss/bin/init.d/jboss-eap-rhel.sh start (code=exited, status=0/SUCCESS)
Main PID: 3409 (standalone.sh)
CGroup: /system.slice/jbosseap7.service
├─3409 /bin/sh /opt/jboss/bin/standalone.sh -c standalone.xml
└─3478 java -D[Standalone] -server -verbose:gc -Xloggc:/opt/jboss/standalone/log/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -...
Jun 11 12:46:42 node01.local.com systemd[1]: Starting JBoss EAP7...
Jun 11 12:46:42 node01.local.com runuser[3407]: pam_unix(runuser:session): session opened for user jboss by (uid=0)
Jun 11 12:46:42 node01.local.com jboss-eap-rhel.sh[3396]: Starting jboss-eap: /
Jun 11 12:46:53 node01.local.com jboss-eap-rhel.sh[3396]: [ OK ]
Jun 11 12:46:53 node01.local.com systemd[1]: Started JBoss EAP7.