<@ULVA73B9P> I am trying to setup a google cloud r...
# ask-marvin
r
@Marvin I am trying to setup a google cloud run worker (v2) and connect it to my self hosted prefect server (also running in google cloud run, but i keep getting "401 Unathorized" errors
m
thought for 37.4 seconds
Based on the GitHub issues search, there's an important additional point to note: API keys can expire after a certain period. If you're seeing 401 errors suddenly appear for a previously working setup, this could be the cause. To further help diagnose your issue, I'd also recommend checking: 5. Logs Access - Check the Cloud Run logs for the worker service for more detailed error messages - The exact 401 error message might provide more context about what's failing 6. Network Configuration - Ensure your Cloud Run worker service has proper outbound access to reach your self-hosted Prefect server - If your Prefect server is behind a VPC, make sure the Cloud Run service has the necessary VPC connector configured 7. API Key Validation - Try testing your API key manually using a curl command to verify it works:
Copy code
bash
curl -H "Authorization: Bearer YOUR_API_KEY" YOUR_PREFECT_API_URL/health
Could you provide more details about: 1. How long has this been happening? Did it work before and suddenly stop, or has it never worked? 2. Are you using any VPC configurations or private networking between your Cloud Run services? 3. Can you share a sanitized version of the full error message from the Cloud Run logs? This will help me provide more specific guidance for your setup.