ERR_EMPTY_RESPONSE with all examples on Mac

871 views
Skip to first unread message

Peter Ottery

unread,
Sep 11, 2017, 10:00:13 AM9/11/17
to Google Cloud Developers
Hey,

I assume I'm making some sort of newbie mistake :)

I've been trying to set up some of the app engine Java examples on my Mac. However, in each case even though everything appears to be building and running as expected I get nothing when I hit the localhost:8080 endpoints and just see  ERR_EMPTY_RESPONSE.

I've tried building through the Eclipse plugin or simply from the Maven command line.

I'm unfortunately not making much progress. Any suggestions what I should look at?

Cheers,

Pete

Part output running from maven:

"[INFO] Sep 11, 2017 7:42:48 AM com.google.apphosting.utils.jetty.JettyLogger info

[INFO] INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger

[INFO] Sep 11, 2017 7:42:48 AM com.google.apphosting.utils.jetty.JettyLogger info

[INFO] INFO: jetty-6.1.x

[INFO] Sep 11, 2017 7:42:49 AM com.google.apphosting.utils.jetty.JettyLogger info

[INFO] INFO: Started SelectChannelConnector@localhost:8080

[INFO] Sep 11, 2017 7:42:49 AM com.google.appengine.tools.development.JettyContainerService startHotDeployScanner

[INFO] INFO: Full scan of the web app in place every 5s.

[INFO] Sep 11, 2017 7:42:49 AM com.google.appengine.tools.development.AbstractModule startup

[INFO] INFO: Module instance default is running at http://localhost:8080/

[INFO] Sep 11, 2017 7:42:49 AM com.google.appengine.tools.development.AbstractModule startup

[INFO] INFO: The admin console is running at http://localhost:8080/_ah/admin

[INFO] Sep 11, 2017 7:42:49 AM com.google.appengine.tools.development.DevAppServerImpl doStart

[INFO] INFO: Dev App Server is now running"


gcloud components list

Your current Cloud SDK version is: 170.0.1

The latest available version is: 170.0.1


┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────┐

                                                  Components                                                

├───────────────┬──────────────────────────────────────────────────────┬──────────────────────────┬───────────┤

    Status                            Name                                     ID                Size  

├───────────────┼──────────────────────────────────────────────────────┼──────────────────────────┼───────────┤

│ Not Installed │ App Engine Go Extensions                             │ app-engine-go              97.7 MiB │

│ Not Installed │ Cloud Bigtable Command Line Tool                     │ cbt                        4.0 MiB │

│ Not Installed │ Cloud Bigtable Emulator                              │ bigtable                   3.5 MiB │

│ Not Installed │ Cloud Datalab Command Line Tool                      │ datalab                    < 1 MiB │

│ Not Installed │ Cloud Datastore Emulator                             │ cloud-datastore-emulator │  15.4 MiB │

│ Not Installed │ Cloud Datastore Emulator (Legacy)                    │ gcd-emulator               38.1 MiB │

│ Not Installed │ Cloud Pub/Sub Emulator                               │ pubsub-emulator            33.2 MiB │

│ Not Installed │ Emulator Reverse Proxy                               │ emulator-reverse-proxy     14.5 MiB │

│ Not Installed │ Google Container Local Builder                       │ container-builder-local    3.7 MiB │

│ Not Installed │ Google Container Registry's Docker credential helper │ docker-credential-gcr      2.2 MiB │

│ Not Installed │ gcloud Alpha Commands                                │ alpha                      < 1 MiB │

│ Not Installed │ gcloud Beta Commands                                 │ beta                       < 1 MiB │

│ Not Installed │ gcloud app PHP Extensions (Mac OS X)                 │ app-engine-php-darwin      21.9 MiB │

│ Not Installed │ kubectl                                              │ kubectl                    15.9 MiB │

│ Installed     │ BigQuery Command Line Tool                           │ bq                         < 1 MiB │

│ Installed     │ Cloud SDK Core Libraries                             │ core                       6.7 MiB │

│ Installed     │ Cloud Storage Command Line Tool                      │ gsutil                     3.0 MiB │

│ Installed     │ gcloud app Java Extensions                           │ app-engine-java          │ 128.1 MiB │

│ Installed     │ gcloud app Python Extensions                         │ app-engine-python          6.5 MiB │

└───────────────┴──────────────────────────────────────────────────────┴──────────────────────────┴───────────┘

Jordan (Cloud Platform Support)

unread,
Sep 11, 2017, 11:31:23 AM9/11/17
to Google Cloud Developers
If you are seeing the same ERR_EMPTY_RESPONSE for all applications running on localhost, than this is not a Google Cloud issue but a networking configuration issue with your mac. 

You may be able to run dscacheutil -q host -a name localhost to see if your localhost is properly pointing to you local IP address 127.0.0.1. As a workaround you may even try 127.0.0.1:8080 instead of using localhost. Deleting the line "::1 localhost" in your '/etc/hosts' file may fix the issue if this is the case. 

You might also disable anti-virus as it may be blocking localhost. Also another process may be listening on localhost. Running sudo lsof -PiTCP -sTCP:LISTEN will show you all of the processes running and will help to identify if localhost is being used. If so try killing the process' PID that is using localhost using sudo kill -9 [PID] (where PID is the PID of the process) and attempt to run your App Engine application again.

- Note that Google Groups is meant for general product discussions and not for technical support. If you require further technical support for running an application via localhost on your mac, it is recommended to ask your complete question on Stack Exchange

 

Peter Ottery

unread,
Sep 11, 2017, 12:08:39 PM9/11/17
to Google Cloud Developers
Hi Jordan,

Thanks for the reply.

It was my suspicion that this may be a general network issue. However, I have already tried most of what you suggested and everything seems OK:

dscacheutil -q host -a name localhost

name
: localhost

ipv6_address
: ::1

name
: localhost

ip_address
: 127.0.0.1


Antivirus is completely disabled and nothing else is listening on the 8080. I had also tried using 127.0.0.1:8080 with no luck.

I didn't realise this group was only for general product discussion so as suggested I have moved this question https://stackoverflow.com/questions/46158570/issues-running-google-app-engine-examples-locally-on-mac

If anyone has any other thoughts what the issue might be please feel free to answer there.

Cheers,

Pete

Peter Ottery

unread,
Sep 11, 2017, 12:10:31 PM9/11/17
to Brian de Alwis, Google Cloud Developers
Hi Brian,

Thanks for trying to help.

The most basic example I tried was from the getting started repo (though I tried the guestbook example and creating a new project with the Eclipse plugin too):

https://github.com/GoogleCloudPlatform/getting-started-java - getting-started-java/appengine-standard-java8/helloworld 

Run with `mvn appengine:run`

After the server starts I see no further output after the following regardless of how many times I reload the localhost:8080 page.

[INFO] GCLOUD: 2017-09-11 16:07:49.992:INFO:oejs.Server:main: Started @3334ms

[INFO] GCLOUD: Sep 11, 2017 4:07:49 PM com.google.appengine.tools.development.AbstractModule startup

[INFO] GCLOUD: INFO: Module instance default is running at http://localhost:8080/

[INFO] GCLOUD: Sep 11, 2017 4:07:49 PM com.google.appengine.tools.development.AbstractModule startup

[INFO] GCLOUD: INFO: The admin console is running at http://localhost:8080/_ah/admin

[INFO] GCLOUD: Sep 11, 2017 4:07:49 PM com.google.appengine.tools.development.DevAppServerImpl doStart

[INFO] GCLOUD: INFO: Dev App Server is now running


Cheers,

Pete



On Mon, 11 Sep 2017 at 16:03 Brian de Alwis <briand...@gmail.com> wrote:
Hi Peter. 

What examples are you using, and could you show the local server output after you've tried to fetch a page? 

Brian.

--
You received this message because you are subscribed to the Google Groups "Google Cloud Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-dev/4bb6a378-57ab-4cdc-b22c-4299be0b2b81%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Brian de Alwis

unread,
Sep 11, 2017, 12:10:43 PM9/11/17
to Peter Ottery, Google Cloud Developers
Hi Peter. 

What examples are you using, and could you show the local server output after you've tried to fetch a page? 

Brian.

On Sep 11, 2017, at 2:53 AM, Peter Ottery <pet...@gmail.com> wrote:

--
Reply all
Reply to author
Forward
0 new messages