2

How can I stop the GeoServer running on my Windows 10 computer? I downloaded geoserver-2.19.2-bin(zipped) Platform Independent Binary and extracted it into a folder I wanted (my Download folder). I have the Java environment set C:\Program Files (x86)\Java\jre1.8.0_301 and also set the GOESERVER_HOME set to the location where the GeoServer application was extracted in my case C:\Users\YO\Downloads\geoserver-2.19.2-bin. When I try to shutdown I get the following error

Shutting down GeoServer...

JAVA_HOME: C:\Program Files (x86)\Java\jre1.8.0_301

java.net.ConnectException: Connection refused: connect
        at java.net.DualStackPlainSocketImpl.connect0(Native Method)
        at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
        at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
        at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
        at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
        at java.net.PlainSocketImpl.connect(Unknown Source)
        at java.net.SocksSocketImpl.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.<init>(Unknown Source)
        at java.net.Socket.<init>(Unknown Source)
        at org.eclipse.jetty.start.Main.stop(Main.java:570)
        at org.eclipse.jetty.start.Main.stop(Main.java:546)
        at org.eclipse.jetty.start.Main.doStop(Main.java:533)
        at org.eclipse.jetty.start.Main.start(Main.java:424)
        at org.eclipse.jetty.start.Main.main(Main.java:77)

Usage: java -jar $JETTY_HOME/start.jar [options] [properties] [configs]
       java -jar $JETTY_HOME/start.jar --help  # for more information

Press any key to continue . . .

I cannot stop the application and I can not delete the folder. Any ideas of how I can fix the problem?

5
  • 1
    Reinstall using the war option with Tomcat rather than Jetty, running as a windows service
    – nmtoken
    Jan 17, 2023 at 9:51
  • ok, I thought that I might use that option later. I want to delete the folder but I cant because it says folder in use as the application is still running. I have been trying to figure this out for a while now.
    – mapperx
    Jan 17, 2023 at 10:00
  • I have had this issue for long i guess you inspired me to solve it @nmtoken.
    – mapperx
    Jan 17, 2023 at 10:52
  • just close the window that jetty is running in
    – Ian Turton
    Jan 17, 2023 at 13:02
  • For some reason there was no jetty window or a geoserver terminal window. But its sorted now.
    – mapperx
    Jan 17, 2023 at 13:04

1 Answer 1

4

Took a while to figure this out, though through @nmtoken's comment. In order to stop the running GeoServer, I checked all the open ports on my Windows 10 using the following command netstat -aon in the CMD shell. I was able to identify the the GeoServer process based on the port number it was running on

TCP    [::]:8080              [::]:0                 LISTENING       37776

For some reason when I check through the task manager or running processes it is not listed. So to stop the process I used the following command Stop-Process -ID 37776 -Force from Window Powershell (when I tried it from normal CMD terminal its says 'Stop-Process' is not recognized as an internal or external command, operable program or batch file. ), (I found this method from Tutorial: PowerShell Kill Process Command). I was able to stop and then restart the GeoServer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.