How to Stop Hybris server from command prompt or Admin console

12,600

Solution 1

Use this command /bin/platform/hybrisserver.sh stop

That will stop the server.

Solution 2

just push ctrl + c in the command line window and the server is shut down properly

Solution 3

As a small side note, if you'd like to stop a hybris server through the admin console, you could always go to Console > Scripting Languages > Edit Statement and execute System.exit(0);

hybris has got all the necessary runtime shutdown hooks to do a graceful (as if you did CTRL + C).

In theory it's also possible to restart the hybris system internally by executing:

import de.hybris.platform.core.Registry;
Registry.destroyAndForceStartup();

By default, there's a restriction to forbid doing so using groovy scripts, though.

Solution 4

Sometimes it happen that the hybrisserver is runned on another console and even after hybrisserrver.sh stop some processes are still running. And you will receive message like:

INFO: Illegal access: this web application instance has been stopped already

My solution is (for linux based systems):

lsof | grep hybris

To get the processes runned from "hybris" directory(change on you need) and then kill the listed processes with:

kill -15 <PROCESS_ID>

PS. (This solution require the root privileges)

Share:
12,600
user2492144
Author by

user2492144

Updated on June 04, 2022

Comments

  • user2492144
    user2492144 almost 2 years

    I want to add a new extension and for that I need to stop hybris server first, but I am unable to figure out how exactly I should STOP the server: through command line or by admin Console?
    I cannot type any command as my server is running.
    I also started the server by using hybrisserver.bat

  • user2492144
    user2492144 about 9 years
    Will this stop only the latest batch process or all executed previously ?
  • Soufiane Roui
    Soufiane Roui about 4 years
    when I am running the server from "/bin/platform/hybrisserver.sh" and then I try to stop it using your solution an error occurs : The hybris Server 5.1.0.0 service is not installed