GCP components update causes “ConnectionRefusedError: [Errno 111] Connection refused” errors

1,248 views
Skip to first unread message
Message has been deleted

eps...@gmail.com

unread,
Jul 31, 2018, 1:10:33 PM7/31/18
to Google App Engine
My GCP deployment was working fine until I did "gcloud components update" two weeks ago. I understand that the command updates the libraries, and there was an option to revert back to the previous version at the end of the update, but I do not understand why there are so many connection-refused errors with the new update. On the client side, I see "502 Bad Gateway errors". These errors are not consistent. I see them occurring 12 times in the last 48 minutes.


2018-07-31 09:13:19.000 MST
Traceback (most recent call last): File "/env/lib/python3.6/site-packages/urllib3/connection.py", line 171, in _new_conn (self._dns_host, self.port), self.timeout, **extra_kw) File "/env/lib/python3.6/site-packages/urllib3/util/connection.py", line 79, in create_connection raise err File "/env/lib/python3.6/site-packages/urllib3/util/connection.py", line 69, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused

Expand all | Collapse all
{
 insertId
: "crhycg4civkq14"  
 labels
: {…}  
 logName
: "projects/eps-server/logs/appengine.googleapis.com%2Fstderr"  
 receiveTimestamp
: "2018-07-31T16:13:24.966198879Z"  
 resource
: {…}  
 textPayload
: "Traceback (most recent call last):
  File "
/env/lib/python3.6/site-packages/urllib3/connection.py", line 171, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
  File "
/env/lib/python3.6/site-packages/urllib3/util/connection.py", line 79, in create_connection
    raise err
  File "
/env/lib/python3.6/site-packages/urllib3/util/connection.py", line 69, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
"
 
 timestamp
: "2018-07-31T16:13:19Z"  
}



2018-07-31 09:13:19.000 MST
AuthMetadataPluginCallback "<google.auth.transport.grpc.AuthMetadataPlugin object at 0x7fdd9f316b00>" raised exception!

Expand all | Collapse all
{
 insertId
: "crhycg4civkq14"  
 labels
: {…}  
 logName
: "projects/eps-server/logs/appengine.googleapis.com%2Fstderr"  
 receiveTimestamp
: "2018-07-31T16:13:24.966198879Z"  
 resource
: {…}  
 textPayload
: "AuthMetadataPluginCallback "<google.auth.transport.grpc.AuthMetadataPlugin object at 0x7fdd9f316b00>" raised exception!
"
 
 timestamp
: "2018-07-31T16:13:19Z"  
}


eps...@gmail.com

unread,
Aug 1, 2018, 8:59:52 AM8/1/18
to Google App Engine
Figured out that GCP uses python 3.6 when python_version is set to 3 in app.yaml
Changed the version to 3.5. Hopefully, this should solve some problems.

eps...@gmail.com

unread,
Aug 1, 2018, 8:59:52 AM8/1/18
to Google App Engine
Figured out that the GCP uses python 3.6 if the runtime config in app.yaml is 3. My app uses python 3.5, there are some subtle differences between python 3.5 and 3.6 that may be causing errors. 'python_version: 3.5' should downgrade the runtime env

runtime_config:

  python_version: 3.5



On Tuesday, July 31, 2018 at 10:10:33 AM UTC-7, eps...@gmail.com wrote:

George (Cloud Platform Support)

unread,
Aug 1, 2018, 2:38:27 PM8/1/18
to Google App Engine
The he Nginx process would serve a 502 error for different reasons, so in itself, this message is not very useful. You may get 502 errors for an exception in your application, for an internal API call that causes an exception, but also if a request isn't replied to within the prescribed limits. The latter seems likely in your case, as your 502 errors are randomly received. You should investigate your app's response times. 

It may prove worthwhile checking your app's handlers, and trying to reliably reproduce the error by calling the endpoints that are most likely to have caused the error. 

All this is above the scope of this discussion group, in fact off-topic. You should post such questions to StackOverflow, or other similar forums. This forum meant for general discussion of the platform and its services. By contrast, in StackOverflow, you get with experienced programmers, who are happy to help.
Reply all
Reply to author
Forward
0 new messages