Centos 7
Wildfly-16.0.0.Beta1
JDK 1.8.0_212
Я не могу запустить wildfly с помощью "systemctl start wildfly", но могу запустить его с "/opt/wildfly/bin/launch.sh standalone standalone.xml 192.168.56.200 &"
Config file:
# cat /etc/wildfly/wildfly.conf
# The configuration you want to run
WILDFLY_CONFIG=standalone.xml
# The mode you want to run
WILDFLY_MODE=standalone
# The address to bind to
WILDFLY_BIND=192.168.56.200
Статус Systemctl
[root@liferay ~]# systemctl status wildfly -l
● wildfly.service - The WildFly Application Server
Loaded: loaded (/etc/systemd/system/wildfly.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2019-04-22 17:42:47 +08; 14min ago
Process: 12925 ExecStart=/opt/wildfly/bin/launch.sh $WILDFLY_MODE $WILDFLY_CONFIG $WILDFLY_BIND (code=exited, status=1/FAILURE)
Main PID: 12925 (code=exited, status=1/FAILURE)
Apr 22 17:42:46 liferay systemd[1]: Started The WildFly Application Server.
Apr 22 17:42:47 liferay systemd[1]: wildfly.service: main process exited, code=exited, status=1/FAILURE
Apr 22 17:42:47 liferay systemd[1]: Unit wildfly.service entered failed state.
Apr 22 17:42:47 liferay systemd[1]: wildfly.service failed.
блок systemd
# cat /etc/systemd/system/wildfly.service
[Unit]
Description=The WildFly Application Server
After=syslog.target network.target
Before=httpd.service
[Service]
Environment=LAUNCH_JBOSS_IN_BACKGROUND=1
EnvironmentFile=-/etc/wildfly/wildfly.conf
User=wildfly
LimitNOFILE=102642
PIDFile=/var/run/wildfly/wildfly.pid
ExecStart=/opt/wildfly/bin/launch.sh $WILDFLY_MODE $WILDFLY_CONFIG $WILDFLY_BIND
StandardOutput=null
[Install]
WantedBy=multi-user.target
Как я могу заставить это работать с systemd?
После проверки поставляемого модуля systemd я обнаружил, что есть набор папок PID
mkdir /var/run/wildfly/
chown wildfly. /var/run/wildfly/
эти команды исправили это.