How to set Wildfly server as service in Raspbian
Posted: Sun May 22, 2016 11:46 am
by zebrone
Hi everyone,
I was looking how to set as service a Wildfly server installation in the Raspberry PI with the latest version of Raspbian.
I've tried to use this
https://gist.github.com/sukharevd/6087988, but if I try to start the service no messages are sent back. The command line I use is this one:
When I execute this, no messages are sent back. How Can I fix this problem? I want to set as service the Wildfly service.
P.S. If execute sudo bash standalone.sh the server starts correctly.
Re: How to set Wildfly server as service in Raspbian
Posted: Sun May 22, 2016 12:00 pm
by DirkS
zebrone wrote:
When I execute this, no messages are sent back. How Can I fix this problem? I want to set as service the Wildfly service
Do you mean that you get no messages when you issue the command?
That's normal on Jessie / Systemd.
To see if it's running use e.g.
Re: How to set Wildfly server as service in Raspbian
Posted: Mon May 23, 2016 12:35 pm
by zebrone
DirkS wrote:zebrone wrote:
When I execute this, no messages are sent back. How Can I fix this problem? I want to set as service the Wildfly service
Do you mean that you get no messages when you issue the command?
That's normal on Jessie / Systemd.
To see if it's running use e.g.
Thank you for your reply. You're almost right! The service is loaded correctly, here is the output:
Code: Select all
root@raspberrypi:/opt/wildfly/bin# sudo systemctl status wildfly
● wildfly.service - The WildFly Application Server
Loaded: loaded (/etc/systemd/system/wildfly.service; disabled)
Active: active (running) since Mon 2016-05-22 16:39:20 UTC; 5s ago
Main PID: 1425 (launch.sh)
CGroup: /system.slice/wildfly.service
├─1425 /bin/sh /opt/wildfly/bin/launch.sh standalone standalone.xml 0.0.0.0
├─1428 /bin/sh /opt/wildfly/bin/standalone.sh -c standalone.xml -b 0.0.0.0
└─1483 java -D[Standalone] -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stac...
The only problem is that if I try to execute sudo service wildfly reload, I got this error:
Is this normal?
Re: How to set Wildfly server as service in Raspbian
Posted: Mon May 23, 2016 1:40 pm
by DirkS
The service is disabled; AFAIK this just means it will not autostart on boot.
It seems to be running though.
I think it's best to start using the systemd version of the service commands. See e.g.
https://www.digitalocean.com/community/ ... -and-units
To enable:
Restart
You can use either 'wildfly' or 'wildfly.service'
Re: How to set Wildfly server as service in Raspbian
Posted: Tue May 24, 2016 12:13 pm
by zebrone
DirkS wrote:The service is disabled; AFAIK this just means it will not autostart on boot.
It seems to be running though.
I think it's best to start using the systemd version of the service commands. See e.g.
https://www.digitalocean.com/community/ ... -and-units
To enable:
Restart
You can use either 'wildfly' or 'wildfly.service'
Thank you for your reply. I've tried to upload a war on the Wildfly server but it seems it doesn't work correctly. I mean the was is deployed correctly, but if I try to connect to the endpoint with Websocket implementation, nothing happen. I don't know why, the port is now 28080 for http, so I've also changed it. Have you got any idea about this problem?
Re: How to set Wildfly server as service in Raspbian
Posted: Thu Jun 08, 2017 7:24 pm
by zebrone92
Hi,
I got the following problem, with Wildly 9.0.2.Final. The bash standalone.sh command works correctly, but the service doesn't:
pi@raspberrypi:~ $ sudo systemctl status wildfly -l
● wildfly.service - The WildFly Application Server
Loaded: loaded (/etc/systemd/system/wildfly.service; enabled)
Active: failed (Result: exit-code) since gio 2017-06-08 17:17:05 -02; 4min 59s ago
Process: 443 ExecStart=/opt/wildfly/bin/launch.sh $WILDFLY_MODE $WILDFLY_CONFIG $WILDFLY_BIND (code=exited, status=203/EXEC)
Main PID: 443 (code=exited, status=203/EXEC)
giu 08 17:17:04 raspberrypi systemd[1]: Started The WildFly Application Server.
giu 08 17:17:04 raspberrypi systemd[443]: Failed at step EXEC spawning /opt/wildfly/bin/launch.sh: No such file or directory
giu 08 17:17:05 raspberrypi systemd[1]: wildfly.service: main process exited, code=exited, status=203/EXEC
giu 08 17:17:05 raspberrypi systemd[1]: Unit wildfly.service entered failed state.
How Can I Fix it?
Re: How to set Wildfly server as service in Raspbian
Posted: Thu Jun 08, 2017 7:46 pm
by DirkS
giu 08 17:17:04 raspberrypi systemd[443]: Failed at step EXEC spawning /opt/wildfly/bin/launch.sh: No such file or directory
Apparently the directory and / or file does not exist.
Check first if the directory exists. Could it be in a different location?