wildfly 8 run as service

General support questions
Post Reply
tommyhp2
Posts: 33
Joined: 2010/09/18 00:35:39

wildfly 8 run as service

Post by tommyhp2 » 2014/11/04 02:17:12

Hi folks,

I'm having problem with getting Wildfly 8 to start as service on C7. I got the symlink to /etc/init.d/

Code: Select all

[root@d-c7-web ~]# ll /etc/init.d/w*
lrwxrwxrwx. 1 root root 62 Nov  3 09:19 /etc/init.d/wildfly -> /var/www/wildfly-8.1.0.Final/bin/init.d/wildfly-init-redhat.sh
and is added to chkconfig

Code: Select all

[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 /etc/init.d/wildfly works for start, stop, status, and reload. Just on server reboot, it doesn't startup automatically. Does anyone know how to get it to start automatically on server reboot?

Thanks,
Tommy

User avatar
igorek24
Posts: 90
Joined: 2013/11/13 06:11:37

Re: wildfly 8 run as service

Post by igorek24 » 2014/11/04 05:27:49


tommyhp2
Posts: 33
Joined: 2010/09/18 00:35:39

Re: wildfly 8 run as service

Post by tommyhp2 » 2014/11/05 19:34:45

How can I verify that chkconfig is has the correct configuration other than chkconfig --list and if the system startup actually launches the /etc/init.d/wildfly script?

EDIT:

Some more debugging results:

Code: Select all

[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

Post Reply