Apps won't run on GAE - 'unable to bind to localhost:0'

后端 未结 7 892
谎友^
谎友^ 2020-12-14 20:10

I recently upgraded Google App Engine to 1.7.7. and have not been able to run any apps locally since. This includes apps that worked before the update and apps I\'ve created

相关标签:
7条回答
  • 2020-12-14 20:33

    your socket is already in use. kill it and it should be resolved.fuser -k 8080/tcp

    for example the above code kills and frees the socket at 8080

    0 讨论(0)
  • 2020-12-14 20:36

    fuser -k command didn't work for me because of the unknown option and I did this instead.

    See which process is using the port via "sudo lsof -i -n -P | grep TCP". I took note of the process ID and quit it via Activity Monitor (in the Network Tab).

    0 讨论(0)
  • 2020-12-14 20:41

    For people who got Unknown key when running fuser -k 8080/tcp, here is a solution which worked for me:

    lsof -P | grep ':8080' | awk '{print $2}' | xargs kill -9
    
    0 讨论(0)
  • 2020-12-14 20:45

    Test it in another port adding --port NUMBER when starting the server.

    0 讨论(0)
  • 2020-12-14 20:47

    Had the same issue, was actually trying to run the server with the GUI too. Stopped it in the GUI, works perfectly.

    0 讨论(0)
  • 2020-12-14 20:48

    Ubuntu 14.04 has a lightweight server named "webfs" listening on localhost:8000. Run - sudo netstat -taupen | grep ":8000" - in a terminal to confirm. If it's listening run - sudo killall -q /usr/bin/webfsd - to kill it it. GAE uses ports 8000 and 8080 and won't start if one or both are busy. On reflection, the webfs daemon can also be turned on and off as a service: sudo service webfs start/stop. However, as both methods require root privileges, they are not easy to automate. As I start appengine locally from the command line, simply changing the admin port from 8000 to 8001 on startup proved a more considered approach. My command line looks like: google_appengine/dev_appserver.py --admin_port 8001 projects/helloworld/

    0 讨论(0)
提交回复
热议问题