Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stopping Wildfly Windows Service failed

as mentioned from the title i have a problem stopping the wildfly windows service. When i tried to stop the wildfly service via the server manager - services window the status of the wildfly service doens't change to stop from stop pending. But wildfly isn't running anymore (my web service is not reachable and also the server log says that wildfly was successfully stopped). to start the service again i have to restart the windows server.

i've tested this with different scenarios:

  • Windows Server 2008 R2 Datacenter + Wildfly 9
  • Windwos Server 2012 Datacenter + Wildfly 10
  • Windows 7 + Wildfly 10

I also tried to make changes in the service.bat like Chris French mentioned on https://developer.jboss.org/thread/238135?tstart=0 but there is no change.

Interessting is that the problem doens't exists on any of the scenarios when i added the service without adding any deployments to wildfly (so just the blank server). What means that i am able to start and stop the wildfly service successfully from the server manager services window when the wildfly server is "blank" and without any changes (for e.g. in standalone.xml).

So i think the problem must be my java ee project which contains a web service and a simple persistent project to access different my sql databases. In the standalone.xml i just added the mysql driver and the databases and i do some edits in the interface section (ip adress changes).

Any Ideas? Do i have to made changes in different config files (for e.g. the service.bat) when im deploying something to wildfly?

Sorry for my english and thanks a lot!

like image 266
user99316 Avatar asked Jul 15 '16 08:07

user99316


People also ask

How do I cancel my WildFly service?

In order to stop the application server domain, you can either use the Ctrl + C shortcut in the same window in which you started the domain, or you can use the command-line client and issue the shutdown command to the host controller.

Does WildFly run on Windows?

Setting up a Windows service to run your Wildfly Web Server will allow the server to continuously run in the background, without any user interaction. Another advantage of a Windows service is that it will run no matter which user is logged onto the machine.

What is WildFly service?

WildFly is a powerful, modular, & lightweight application server that helps you build amazing applications.


2 Answers

When installing the WildFly service, make sure you have the following parameters specified:

In WildFly 8: /user <username> /password <password>

in WildFly 10: /jbossuser <username> /jbosspass <password>

In the services.bat the documentation reads:

/user: username for the shutdown command /password: password for the shutdown command

According to my experience, without these parameters, WildFly will move to status "stopping", but will not stop.

like image 187
NDB Avatar answered Oct 06 '22 23:10

NDB


That works for me:
1. Always run the CMD as admin first.
2. If your JBOSS_HOME environment is not set, get sure that you navigate to WildFly home directory before you execute the script.
For example: cd "C:\Program Files\wildfly
It's matter, because the service.bat takes your current dir (%CD%) as JBOSS_HOME, if it's not set.
3. You’ve to install the service with a special parameter. /controller
It’s important that you tell wildfly service on which port your wildfly admin console is running.
Take a look in standalone.xml, search for “management-http”, get sure that you use the same port in parameter.
Example: (Default port is 9990)

./bin/service/service.bat install /controller localhost:9990 

Done. Now start the service and wait until you can reach the wildfly console page.
After try to stop or restart the service in service.msc or with service.bat (service.bat start/stop/restart).

like image 31
Igromanru Avatar answered Oct 06 '22 21:10

Igromanru