2 Replies Latest reply on Nov 5, 2014 8:28 PM by Tommy Pham

    Wildfly 8.1 automatic startup on CentOS 7

    Tommy Pham Newbie

      Hi folks,

       

      Anyone able to get Wildfly 8.1 startup automatically on system start/restart for CentOS 7? I symlink the wildfly-ini-redhat.sh to /etc/init.d/ and I can start, stop, status, and reload via /etc/init.d/wildlfy OK.  chkconfig --list shows correctly.  System reboot/startup doesn't startup automatically.

       

      I've also posted on CentOS:

       

      https://www.centos.org/forums/viewtopic.php?f=47&t=49371

       

      Thanks,

      Tommy

       

      PS:  Can't scroll down on the search results and posted a question:

       

      Scrolling on search results on this forum

        • 2. Re: Wildfly 8.1 automatic startup on CentOS 7
          Tommy Pham Newbie

          Hi Tomaz,

           

          I've already done that as shown in my post at CentOS forum:

           

          [root@d-c7-web ~]# chkconfig --list|grep -i wildfly

           

          Note: This output shows SysV services only and does not include native

                systemd services. SysV configuration data might be overridden by native

                systemd configuration.

           

                If you want to list systemd services use 'systemctl list-unit-files'.

                To see services enabled on particular target use

                'systemctl list-dependencies [target]'.

           

          wildfly         0:off   1:off   2:on    3:on    4:on    5:on    6:off

           

          and

           

          [root@d-c7-web ~]# systemctl status wildfly

          wildfly.service - SYSV: WildFly startup script

             Loaded: loaded (/etc/rc.d/init.d/wildfly)

             Active: active (running) since Wed 2014-11-05 03:33:31 PST; 2min 11s ago

          Main PID: 2653 (java)

             CGroup: /system.slice/wildfly.service

                     \u251c\u25002606 /bin/sh /etc/rc.d/init.d/wildfly start

                     \u251c\u25002608 runuser -s /bin/bash wildfly -c ulimit -S -c 0 >/dev/null 2>&1 ; LAUNCH_JBOSS_IN_BAC...

                     \u251c\u25002610 bash -c ulimit -S -c 0 >/dev/null 2>&1 ; LAUNCH_JBOSS_IN_BACKGROUND=1 JBOSS_PIDFILE=...

                     \u251c\u25002611 /bin/sh /var/www/wildfly-8.1.0.Final/bin/standalone.sh -c standalone.xml

                     \u2514\u25002653 java -D[Standalone] -server -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferI...

           

          Nov 05 03:33:05 d-c7-web systemd[1]: Starting SYSV: WildFly startup script...

          Nov 05 03:33:05 d-c7-web wildfly[2598]: JAVA_HOME

          Nov 05 03:33:05 d-c7-web wildfly[2598]: JBOSS_HOME /var/www/wildfly-8.1.0.Final

          Nov 05 03:33:05 d-c7-web wildfly[2598]: JBOSS_USER wildfly

          Nov 05 03:33:05 d-c7-web runuser[2608]: pam_unix(runuser:session): session opened for user wildfly...d=0)

          Nov 05 03:33:31 d-c7-web wildfly[2598]: Starting wildfly: [  OK  ]

          Nov 05 03:33:31 d-c7-web systemd[1]: wildfly.service: Supervising process 2653 which is not our ch...its.

          Nov 05 03:33:31 d-c7-web systemd[1]: Started SYSV: WildFly startup script.

          Nov 05 03:35:38 d-c7-web systemd[1]: wildfly.service: Supervising process 2653 which is not our ch...its.

          Hint: Some lines were ellipsized, use -l to show in full.

          [root@d-c7-web ~]# systemctl enable wildfly.service

          wildfly.service is not a native service, redirecting to /sbin/chkconfig.

          Executing /sbin/chkconfig wildfly on

          The unit files have no [Install] section. They are not meant to be enabled

          using systemctl.

          Possible reasons for having this kind of units are:

          1) A unit may be statically enabled by being symlinked from another unit's

             .wants/ or .requires/ directory.

          2) A unit's purpose may be to act as a helper for some other unit which has

             a requirement dependency on it.

          3) A unit may be started when needed via activation (socket, path, timer,

             D-Bus, udev, scripted systemctl call, ...).

          [root@d-c7-web ~]# chkconfig --list wildfly

           

          Note: This output shows SysV services only and does not include native

                systemd services. SysV configuration data might be overridden by native

                systemd configuration.

           

                If you want to list systemd services use 'systemctl list-unit-files'.

                To see services enabled on particular target use

                'systemctl list-dependencies [target]'.

           

          wildfly         0:off   1:off   2:on    3:on    4:on    5:on    6:off

           

          However, rebooting is still a no go

           

          Thanks,

          Tommy