google-app-enginelocal-network

Is there any way to access GAE dev app server in the local network?


If I access my web site via http://localhost:8080 from the same Win 7 PC, where server is running, then it works well.

If I try to access that from another PC (with usage of my internal PC's ip http://192.168.1.98:8080), then it doesn't work. Moreover, it is not accessible with this ip even on the same machine. What am I doing wrong?

(I've tried to disable firewall on my Win 7 PC - it didn't help)


Solution

  • First check whether your server listens on loopback or on all interfaces - in command line type in netstat -an find a line with port 8080 and state LISTENING, something like this:

      TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING

    If IP is 0.0.0.0 it means it listens on all IP addresses and the problem is with something else blocking it.

    If IP is 127.0.0.1 then you need to bind to 0.0.0.0 address. And now the fun beings - according to documentation, you should add --address=0.0.0.0 or --host=0.0.0.0 to arguments in run configuration (depends on GAE version - thank you @momijigari). But in my case I have also GWT and parameters go to GWT and it does not accept this argument. But on the other hand listens on all interfaces, which I personally was trying to change to localhost. The GWT has -bindAddress parameter though, but it sets only address for code server (one with 9997 port by default), not HTTP.