Stopping Wildfly Windows Service failed
Asked Answered
G

5

11

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!

Gavra answered 15/7, 2016 at 8:4 Comment(2)
Hm, perhaps a problem of user rights? When shutting down Wildfly will want to modify the standalone.xml file, perhaps it can't and that causes the failure.Kevel
i think i also tested this fact because i tried to installed the service with normal, domain admin and local admin rights and i have the same result in all three cases.... -.-Gavra
D
5

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.

Dumbwaiter answered 4/10, 2016 at 9:18 Comment(0)
T
3

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).

Troglodyte answered 30/8, 2016 at 20:29 Comment(1)
Just a note, I had to change the port before installing the service.Tchao
U
1

I had similar issue but it turned out I needed a JAVA_HOME in standalone.conf.bat under bin folder. Simply uncomment the line that sets the JAVA_HOME variable and update its value with the desired path.

set "JAVA_HOME=C:\Program Files\Java\jdk1.8.0_121"

Above solution worked for me.

Unionize answered 8/3, 2017 at 12:30 Comment(0)
S
0

I had the "stopping" problem, when JAVA_HOME was set directly in jboss_cli.bat, pointing to the older jdk version previously installed on my machine. Check jboss_cli.bat for correct path of JAVA_HOME or simply use the JAVA_HOME environment variable (you might have to delete set JAVA_HOME line in jboss_cli.bat).

Somatoplasm answered 21/11, 2016 at 10:23 Comment(0)
L
0

Make sure JAVA_HOME\bin is in your PATH variable

Leveret answered 15/7 at 4:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.