Sample Header Ad - 728x90

jboss service is not starting up in CentOS7

2 votes
1 answer
20129 views
Unable to fork initd scripts on Centos 7. I have installed JBOSS EAP7 which comes with inbuilt initd scripts to start the service. I start/stop/restart the services like the following which works fine. However, when I fork the same initd scripts via systemd it doesn't work. Any help would be appreciated. # /opt/jboss/bin/init.d/jboss-eap-rhel.sh start Starting jboss-eap: /root [ OK ] # /opt/jboss/bin/init.d/jboss-eap-rhel.sh status jboss-eap is running (pid 3024) # /opt/jboss/bin/init.d/jboss-eap-rhel.sh stop Stopping jboss-eap: [ OK ] # /opt/jboss/bin/init.d/jboss-eap-rhel.sh status jboss-eap is not running # /opt/jboss/bin/init.d/jboss-eap-rhel.sh start Starting jboss-eap: /root [ OK ] # /opt/jboss/bin/init.d/jboss-eap-rhel.sh status jboss-eap is running (pid 3314) Forking the same initd scripts via systemd, gives an error. # cat /etc/systemd/system/jbosseap7.service [Unit] Description=JBoss EAP7 After=syslog.target After=network.target [Service] Type=forking ExecStart=/opt/jboss/bin/init.d/jboss-eap-rhel.sh start ExecStop=/opt/jboss/bin/init.d/jboss-eap-rhel.sh stop ExecReload=/opt/jboss/bin/init.d/jboss-eap-rhel.sh restart PIDFile=/var/run/jboss-eap/jboss-eap-standalone.pid [Install] WantedBy=multi-user.target # time systemctl start jbosseap7 Job for jbosseap7.service failed because a timeout was exceeded. See "systemctl status jbosseap7.service" and "journalctl -xe" for details. real **1m27.330s** user 0m0.008s sys 0m0.003s # time systemctl status jbosseap7 ● jbosseap7.service - JBoss EAP7 Loaded: loaded (/etc/systemd/system/jbosseap7.service; enabled; vendor preset: disabled) Active: failed (Result: timeout) since Mon 2018-06-11 07:04:29 EDT; 15s ago Jun 11 06:58:22 node01.local.com systemd: Starting JBoss EAP7... Jun 11 06:58:22 node01.local.com runuser: pam_unix(runuser:session): session opened for user jboss by (uid=0) Jun 11 06:58:22 node01.local.com jboss-eap-rhel.sh: Starting jboss-eap: / Jun 11 06:58:39 node01.local.com jboss-eap-rhel.sh: [ OK ] Jun 11 06:58:39 node01.local.com systemd: PID file /var/run/jboss-eap/jboss-eap-standalone.pid not readable (yet?) after start. Jun 11 07:04:28 node01.local.com systemd: jbosseap7.service start operation timed out. Terminating. Jun 11 07:04:29 node01.local.com systemd: Failed to start JBoss EAP7. Jun 11 07:04:29 node01.local.com systemd: Unit jbosseap7.service entered failed state. Jun 11 07:04:29 node01.local.com systemd: jbosseap7.service failed. real 0m0.045s user 0m0.004s sys 0m0.000s **Note:** I have even tried specifying the Timeout limit under [SERVICE] unit, but that still doesn't work. Without specifying the time limit it still takes a long time (1 minute & 27 seconds). What could be wrong here? **Additional Comments:** Sometimes it starts and sometimes it doesn't start. How can we nail down the failed one? # systemctl start 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 07:32:47 EDT; 7s ago Process: 2913 ExecStop=/etc/init.d/jboss-eap-rhel.sh stop (code=exited, status=0/SUCCESS) Process: 2771 ExecStart=/etc/init.d/jboss-eap-rhel.sh start (code=exited, status=0/SUCCESS) Main PID: 2537 (code=exited, status=0/SUCCESS) Jun 11 07:32:15 node01.local.com systemd: Starting JBoss EAP7... Jun 11 07:32:15 node01.local.com runuser: pam_unix(runuser:session): session opened for user jboss by (uid=0) Jun 11 07:32:15 node01.local.com jboss-eap-rhel.sh: Starting jboss-eap: / Jun 11 07:32:46 node01.local.com jboss-eap-rhel.sh: jboss-eap started with errors, please see server log for details Jun 11 07:32:46 node01.local.com jboss-eap-rhel.sh: [ OK ] Jun 11 07:32:47 node01.local.com jboss-eap-rhel.sh: Stopping jboss-eap: [ OK ] Jun 11 07:32:47 node01.local.com systemd: Started JBoss EAP7. # ps -ef | grep jboss root 2924 2222 0 07:33 pts/0 00:00:00 grep --color=auto jboss # systemctl start jbosseap7 # 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 07:33:35 EDT; 3s ago Process: 2913 ExecStop=/etc/init.d/jboss-eap-rhel.sh stop (code=exited, status=0/SUCCESS) Process: 2930 ExecStart=/etc/init.d/jboss-eap-rhel.sh start (code=exited, status=0/SUCCESS) Main PID: 2943 (standalone.sh) CGroup: /system.slice/jbosseap7.service ├─2943 /bin/sh /opt/jboss/bin/standalone.sh -c standalone.xml └─3012 java -D[Standalone] -server -verbose:gc -Xloggc:/opt/jboss/standalone/log/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:Nu... Jun 11 07:33:19 node01.local.com systemd: Starting JBoss EAP7... Jun 11 07:33:19 node01.local.com runuser: pam_unix(runuser:session): session opened for user jboss by (uid=0) Jun 11 07:33:19 node01.local.com jboss-eap-rhel.sh: Starting jboss-eap: / Jun 11 07:33:35 node01.local.com jboss-eap-rhel.sh: [ OK ] Jun 11 07:33:35 node01.local.com systemd: Started JBoss EAP7. **PS Results:** # ps -aux|grep jboss jboss 4559 0.0 0.0 113120 1540 ? S 07:58 0:00 /bin/sh /opt/jboss/bin/standalone.sh -c standalone.xml jboss 4628 49.4 33.9 3077608 640432 ? Sl 07:58 0: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 4754 0.0 0.0 112644 952 pts/0 R+ 07:58 0:00 grep --color=auto jboss
Asked by Gokulnath Kumar (95 rep)
Jun 11, 2018, 11:08 AM
Last activity: Jun 11, 2018, 11:59 AM