-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[v1.27] Intermittent failures: Response body:`Permission 'servicemanagement.services.report' denied on service '<redacted_3rd_party_service>' #510
Comments
What is your deployment platform, e.g. GKE, GCE? Which start_esp flags are you using when you deploy ESP? |
It was for GKE. I am not aware of any start_esp flags |
Oh I suppose you meant something like this:
|
Thanks. In your case, ESP is using GKE metadata server to get the access token and use it to talk to Google Service Control. That access token is expired every hour, but ESP is re-fetching it every hour too. How often do you see "report" is rejected by 403? In your service config, are you using "allow_unregistered_call", if not, then "check" call to service control should be rejected too. In this case, it will reject your requests. Do you see your requests got rejected? |
I switched back to 1.27, and the issue seemed to have disappeared. I am not using Seemingly related: GoogleCloudPlatform/java-docs-samples#873 |
For some context, this was what I was facing immediately prior to this. Permissions on the service went wonky: https://issuetracker.google.com/issues/122241615 |
So the problem is not related to ESP release version and it is NOT happening now. I will close this issue. If it happens again, please re-open it. Thanks |
It seems the issue is back with 1.49.0 release. I am getting this:
No issues with 1.47.0 release. |
Yes, #779 better surfaces permission errors. It seems like your Cloud Run deployment does not have permission to access service control. This may cause some metrics to be missing, which is why we are enforcing it now (in both ESP and ESPv2). 2 things to ensure all permissions:
|
thanks for the reply @nareddyt your first link is broken. Could you re-post, please? Cloud Run is deployed with default compute service account as per https://cloud.google.com/endpoints/docs/openapi/get-started-cloud-run |
Ah, it's a link to this section: https://cloud.google.com/endpoints/docs/openapi/get-started-cloud-run#checking_required_services
Ok, the default compute service account should have the Project Editor role by default. That should be fine. So the issue is most likely the first one (above). |
thank you @nareddyt These below are enabled on the project all the time:
The only issue I can see is that behavior for the Google Cloud Endpoints after deployment and Use case: Google Cloud Endpoints service on Cloud Run is created during CI pipeline with different When can I know that service is operational? What would be recommended way to handle that case? Is retrying on |
Like you said, Enabling a service can take a few minutes to propagate across the GCP control plane. So it seems your CI system deploys ESP and starts running tests before the propagation has finished. Note that in production (where you don't create a new Endpoints Service every time), you shouldn't run into this issue. Before release One workaround is to just wait 5 minutes after doing the enable. This is how we handle it in CI for ESPv2 (we have a similar CI setup that you described). You can also keep retrying based on the status code, but note that #785 changes these to 500 errors for consistency. This change will occur in the next release of ESP, so it might be easier to just use the time-based workaround. |
FYI I did not realize that the current implementation results in a |
Affects ESP release v1.27
403 errors are happening intermittently, and thus the count in the dashboard is not accurate.
Reverting to 1.26 seems to have fixed the problem.
The text was updated successfully, but these errors were encountered: