1 Reply Latest reply on Aug 28, 2019 4:23 AM by thomas2008ch

    Configure JBoss EAP 6.x as Service on RHEL 7

    thomas2008ch

      Hi,

       

      Recently I update the LINUX from RHEL6 to RHEL7.7. But I have to use the EAP6.4.22. But I have problem by starting the Jboss as a service. I've heard the RHEL7 works different than RHEL6. I've googled but till now couldn't find any helpful information.

       

      Has someone the same problem like me and have some idea?

       

      Many thanks!

        • 1. Re: Configure JBoss EAP 6.x as Service on RHEL 7
          thomas2008ch

          Further describtion:

          Here below is my situation and what I did:

          After the installation of Jboss EAP 6 (RPM text installation), there is the file /etc/init.d/jbossas

          I enable this as service with 'chkconfig jbossas on'. Then I create a file called '/usr/lib/systemd/system/eap6-jbossas-standalone.service' and it looks as follow:

          [Unit] Description=JBoss EAP Systemctl script After=NetworkManager.service

          [Service] Type=forking ExecStart=/etc/init.d/jbossas start ExecStop=/etc/init.d/jbossas stop PIDFile=/var/run/jbossas/jbossas-standalone.pid

          I start the jboss with 'systemctl start eap6-jbossas-standalone'. The jboss can be started but the cursor doesn't return. I have to use the ctrl+c to get the cursor.

          Then I try to stop the jboss with 'systemctl stop eap6-jbossas-standalone' but the jboss can not be stopped. As I check its status with 'systemctl status eap6-jbossas-standalone -l' I got following messages: ...

          systemctl status eap6-jbossas-standalone -l

          ● eap6-jbossas-standalone.service - JBoss EAP Systemctl script Loaded: loaded (/usr/lib/systemd/system/eap6-jbossas-standalone.service; static; vendor preset: disabled) Active: inactive (dead)

          Aug 28 10:04:59 s001ap21-test-n.ad001.proactiv.grp systemd[1]: Failed to start JBoss EAP Systemctl script. Aug 28 10:04:59 s001ap21-test-n.ad001.proactiv.grp systemd[1]: Unit eap6-jbossas-standalone.service entered failed state. Aug 28 10:04:59 s001ap21-test-n.ad001.proactiv.grp systemd[1]: eap6-jbossas-standalone.service failed. Aug 28 10:15:24 s001ap21-test-n.ad001.proactiv.grp systemd[1]: Starting JBoss EAP Systemctl script... Aug 28 10:15:24 s001ap21-test-n.ad001.proactiv.grp runuser[15400]: pam_unix(runuser:session): session opened for user jboss by (uid=0) Aug 28 10:15:24 s001ap21-test-n.ad001.proactiv.grp runuser[15400]: pam_unix(runuser:session): session closed for user jboss Aug 28 10:15:24 s001ap21-test-n.ad001.proactiv.grp runuser[15403]: pam_unix(runuser:session): session opened for user jboss by (uid=0) Aug 28 10:15:24 s001ap21-test-n.ad001.proactiv.grp runuser[15403]: pam_unix(runuser:session): session closed for user jboss Aug 28 10:15:24 s001ap21-test-n.ad001.proactiv.grp jbossas[15384]: Starting jbossas: runuser: warning: cannot change directory to /opt/rh/eap7/root/usr/share/wildfly: No such file or directory Aug 28 10:15:52 s001ap21-test-n.ad001.proactiv.grp systemd[1]: Stopped JBoss EAP Systemctl script.

          What could be the reason?