1

I have set my GAE web app with all the appropriate endpoints and deployed it locally on my ubuntu pc. I get connected to my home network, I found my computer's local IP, selected the correct port (8888 is the default for GAE web apps) tried to connect (from Chrome and my android device) but no luck. I get

Google Chrome's connection attempt to 192.168.1.2 was rejected. The website may be down, or your network may not be properly configured.

Error code: ERR_CONNECTION_REFUSED

Where should I look? Is this a GAE, network or Ubuntu issue?

Ying Li
  • 2,500
  • 2
  • 13
  • 37
George Daramouskas
  • 3,720
  • 3
  • 22
  • 51

2 Answers2

2

Make sure you set the --address=192.168.1.2 (for java) (--host=192.168.1.2 for python) flag when you startup the app

GAEfan
  • 11,244
  • 2
  • 17
  • 33
  • Could you please tell me how to pass this argument to the server? Also do I have to do anything on my client app? Like change any constant? – George Daramouskas Sep 04 '14 at 16:55
  • Are you using python, dev_appserver.py and appcfg.py? – GAEfan Sep 04 '14 at 17:12
  • I use Java, I haven't used any python scrips (don't know if app engine generates something) I've deployed a default implementation of a java web app. – George Daramouskas Sep 04 '14 at 17:17
  • For java, it's the `--address=` flag. See edit. More at: https://developers.google.com/appengine/docs/java/tools/devserver#Running_the_Development_Web_Server – GAEfan Sep 04 '14 at 17:24
  • How do I use this flag? I tried Run Configurations-> Arguments --address=127.0.0.1 but it doens't seem to work. – George Daramouskas Sep 04 '14 at 17:30
  • Are you trying to access it from a browser on the same computer that is running the app? If so, then 127.0.0.1 is fine, and you should use the url `127.0.0.1:8888`. If trying to access from another computer on the network, then set `--address=192.168.1.2`, and point the browser to `192.168.1.2:8888`. The `address` flag is the url you want to use. – GAEfan Sep 04 '14 at 18:06
  • I am accessing the server from a different machine, on the same LAN network though. When I set the `--address=192.168.1.2` I cannot launch the server. I get this: `http://stackoverflow.com/questions/6712270/eclipse-google-plug-in-doesnt-start-server-for-web-application` – George Daramouskas Sep 04 '14 at 18:45
  • I think you pasted the wrong URL. Are you using Eclipse? If so, you can set the server address there. – GAEfan Sep 04 '14 at 18:57
  • Yes, I use eclipse. I pasted the exact address as you typed in to Run configurations-> arguments-> program arguments leaving just a space within the previous argument. – George Daramouskas Sep 04 '14 at 19:03
  • I am referring the paste in your comment above. What is the error? Sorry, but I cannot spend much more time on this. – GAEfan Sep 04 '14 at 19:12
0

192.168.1.2 is generally the router address, although it's possible you have set it as your local computer IP.

The --address flag will work as long as you have the correct LAN IP address, in your case, I think you got the wrong one.

If you are on Windows, go to your cmd and type ipconfig. Look for the field IPv4 Address, it should have your local IP address that looks "similar" to 198.128.1.2.

Let me know if that works for you, thanks.

Ying Li
  • 2,500
  • 2
  • 13
  • 37