Error: UNAUTHORIZED: server response status code: 401 when gRPC streaming data

692 views
Skip to first unread message

Mark Nuttall-Smith

unread,
Jun 3, 2017, 2:16:46 PM6/3/17
to Google Cloud Endpoints
Hi,

I have another problem/concern with my gRPC endpoint setup.

I have a streaming endpoint sending data to a client. After some period of api inactivity (I guess 30 mins+), I start seeing messages as follows in the esp container log:

2017/06/03 18:06:43[error]9#9: Failed to call https://servicecontrol.googleapis.com/v1/services/myapp.endpoints.myapp-167610.cloud.goog:report, Error: UNAUTHORIZED: server response status code: 401, Response body:�Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.
[libprotobuf ERROR external/servicecontrol_client_git/src/service_control_client_impl.cc:182] Failed in Report call: Service control request failed with HTTP response code 401

Note, the streaming service continues sending data without any problems. As soon as I make another request to my api, the error messages stop being produced. 

Any ideas?

TIA,
Mark


anirbanc

unread,
Jun 9, 2017, 2:43:36 PM6/9/17
to Google Cloud Endpoints
Hi Mark,

It looks like unauthorized requests were made to your API that you were not expecting. We are doing some work to give you more information about the source of such requests. There is an ongoing discussion about it here: https://groups.google.com/forum/#!topic/google-cloud-endpoints/kcwSEB8cqvo

Thanks,
Anirban
Reply all
Reply to author
Forward
0 new messages