Java

Start, Stop and Restart Wildfly

If your memory likes to trick you like mine does, this post is for you. Below are the three most important commands for start, stop and restart Wildfly and JBoss late releases. Also, an extra for starting it in domain mode.

Everything should be done into your <$JBOSS_HOME>/bin folder:

Start

Linux: ./standalone.sh &

Windows: standalone.bat

Stop

Linux: ./jboss-cli.sh --connect command=:shutdown

Windows: jboss-cli.bat --connect command=:shutdown

Restart

Linux: ./jboss-cli.sh --connect command=:reload

Windows: jboss-cli.bat --connect command=:reload

Start in domain mode

Linux: ./domain.sh &

Windows: domain.bat

I hope it helps. Cya!

bgasparotto

View Comments

  • Hi, I used the step to restart the keycloak server. Now after the restart I am unable to access the keycloak.

  • .jboss-cli.sh --connect command=:reload I throw this result

    bash: .jboss-cli.sh: order not found

  • You saved my life (or at least, a few hours of my precious time) : I was trying to add the 1st user in a dockerized keycloak, and found no way to reload the configuration after that

    • Your comment mentioning keycloak saved my life, as it lead me to this article!

  • Hi, is there any way to start the server and close the cmd window. Many times I accidentally close the window which stops my server.

    • Hi! Unfortunately I don't have a Windows machine here but after digging it up a little bit, I found that the following might work:
      start /B standalone.bat

      Please let me know if it works!

  • I had the same issue. I solved doing this:
    Go to /bin and edit the jboss-cli.xml file
    Go to section
    Change the value of tag from localhost to the hostname.
    For example:
    Change :

    http-remoting
    localhost
    9990

    to:

    http-remoting
    myWildflyServer.mydomain.com
    9990

  • Hello. I'm facing trouble in installing wildfly 11 on CentOS. Can you share the correct installation steps.

    Thanks.

    • Hello Bony,

      What exactly is going on? Currently I have the steps for both Windows and Ubuntu on this tutorial, but I will update with the steps for CentOS as soon as I can.

      In the meanwhile, I believe it is worth checking the Ubuntu section in the link I posted in order to try to adapt it for CentOS.
      I'll be posting an update soon.

  • hey, really like the site.

    am struggling though with anything but starting the server with standalone.bat.

    stopping or restarting (or starting the server with jboss-cli) results in:

    Failed to connect to the controller: The controller is not available at localhost:9990: java.net.ConnectException.WFLYPRT0053: Could not connect to remote+http://localhost:9990. The connection failed: Permission denied: no further information

    I can't work it out at all!

    Will be reading your content regardless - looks good, thanks!

    • Hi Nick,
      not sure if you solved your problem. I found out, that often "localhost" does not work as a proper hostname. It is better to use 127.0.0.1, the real IP or FQDN Hostname.

    • Hi Nick! Thanks for the feedback, I really appreciate that =]

      About the issue you're facing regarding the jboss.cli:
      1 - Does the startup log show any errors or unexpected behaviour?
      2 - Does it happen on stock Wildfly installations as well?

Recent Posts

Python function decorator

This guide will show you how to create a Python function decorator with a few…

2 years ago

Got permission denied while trying to connect to the Docker daemon socket

This guide will show you how to fix the error Got permission denied while trying…

2 years ago

Python virtual environment on Intellij IDEA

This guide will show you how to create a Python virtual environment on Intellij IDEA…

2 years ago

Find and kill processes on Linux and Mac by port number

This tutorial will quickly show you how to to find and kill processes on Linux,…

2 years ago

Python: Relocation R_X86_64_PC32 against symbol can not be used when making a shared object Error

This guide shows a possible solution for Python error Relocation R_X86_64_PC32 against symbol can not…

2 years ago

Kubernetes useful commands

I condensed below a cheat sheet of Kubernetes useful commands. I will keep updating this…

2 years ago