Google App Engine: WARNING: failed Server@3d484a8a: java.net.BindException: Address already in use
I just started learning about servers, and I am messing around with Google's App Engine. I am trying to get through App Engine's tutorial located here using Eclipse on Mac, but I am getting a problem that reads:
Jun 24, 2010 4:35:08 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
Jun 24, 2010 4:35:08 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed /Users/ayanonagon/Desktop/Venmo/iPhoneApplication/Guestbook/war/WEB-INF/appengine-web.xml
Jun 24, 2010 4:35:08 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed /Users/ayanonagon/Desktop/Venmo/iPhoneApplication/Guestbook/war/WEB-INF/web.xml
Jun 24, 2010 4:35:08 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed SelectChannelConnector@127.0.0.1:8888: java.net.BindException: Address already in use
Jun 24, 2010 4:35:08 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed Server@3d484a8a: java.net.BindException: Address already in use
************************************************
Could not open the requested socket: Address already in use
Try overriding --address and/or --port.
I've tried searching the problem, and no, the red square in the console view is not red. It might somehow be a Mac problem, since m开发者_如何学运维y friend who is also going through the tutorial is not getting any problems. Maybe something to do with localhost:8888?
In my case I was starting the app, testing it, making changes to the files, then trying to start or test it again. I found this solution.
See http://code.google.com/appengine/docs/java/tools/eclipse.html#Running_the_Project
Which, among other wonderful information about when you have to restart it and when you don't, says: "To stop the server, make sure the Debug panel is selected, then click the Terminate button: The Eclipse terminate button."
To open the debug panel: Click Window -> Show View -> Other Expand the Debug list then click Debug
The debug panel will now be displayed and the Terminate button is the red square at the top right of the debug panel.
After terminating the existing server you have to do the Run it again of course.
This means you either have another instance running on the port or you have another program listening on the port. What else do you have on port 8888?
If you want to customize how the server is started, you can create a new Run/Debug
configuration of the type Web Application
in Eclipse or change the existing one you have.
You most likely have a previous instance running (check the console selection button, or just File -> Restart)
The error means that the web server could not bind to the port (like 8080, or 80) it was told to because another program already has bound itself to it.
You have a previous instance running. Restart Eclipse and then every time you run an application, just terminate it before you run it again or another application. I hope it will help you
The socket is still in use. Use the following command line:
sudo kill -9 $(lsof -i TCP:8888 | grep java | grep LISTEN | awk '{ print $2 }')
If you are using Maven to build your project, you also can edit your pom.xml
file and change the <port>8080</port>
to an unused value.
精彩评论