Ajay Kotapati
Ajay Kotapati

Reputation: 21

How to Run WAS Liberty Core server as a Background Service in Windows

We have installed WAS Liberty Core 8.5.5 to run Maximo anywhere mobile applications.

If we start the server from CMD then we are able to access worklight console and maximo anywhere apps.

Command we are using to start the server.

server start server1

But once we closed the CMD window the server stops automatically.

Any workaround to run the server as a background Service ?

Also we need info on how to add WAS Liberty server to Windows startup service so that it will start automatically on system restart.

Thanks,

Ajay

Upvotes: 1

Views: 552

Answers (2)

JohnHartin
JohnHartin

Reputation: 30

The feature to setup a proper windows service is not available in Websphere Liberty 8.5.5.x.

You can use sc.exe to create a service linked to the server executable, but it won't behave correctly i.e. it won't respond correctly to the commands from the services application. As an example, you will be able to start the service and the server will run, but then you will see an error saying the service did not respond in a timely fashion.

According to this question the proper functionality, as described in the other answer, only became available around version 17.0.0.1.

Hope that helps,

John

Upvotes: 0

covener
covener

Reputation: 17872

You can run Liberty as a Windows service:

https://www.ibm.com/support/knowledgecenter/en/SSEQTP_liberty/com.ibm.websphere.wlp.doc/ae/twlp_setup_new_server_winserv.html

bin\server registerWinService serverName

bin\server startWinService serverName

bin\server stopWinService serverName

Of course "net stop/net start" or services.msc can be used instead of startWinService/stopWinService

Upvotes: 2

Related Questions