question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

502 "Bad Gateway" errors consistently occurring when hitting "Run" on any function in Kudu

See original GitHub issue

As of Friday morning 10/4/2019, we cannot run a WebJob function manually through the Kudu console. When we click “Run”, It spins for 2 minutes and returns a 502 error.

We’re seeing it with multiple completely isolated production WebJobs (different App Service Plans, storage accounts, regions), none of which have had code changes in a while, as well as a totally trivial test WebJob deployed solely to troubleshoot this issue.

We have googled this extensively, been through many troubleshooting guides, and examined our code and app service health carefully. Nothing seems to apply. But the announcement of .NET Core 3.0 availability on Friday makes us wonder if that’s somehow related.

Steps to reproduce:

  1. Create a WebJob project using .NET Framework and the WebJobs SDK.
  2. Add a trivial no-op function, marked with [NoAutomaticTrigger] (or any trigger attribute).
  3. Deploy to a continuous WebJob.
  4. Browse to the WebJob and specific function in Kudu.
  5. Click the “Run” button.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
tmeniercommented, Oct 10, 2019

I confirmed the work-around is working for us.

If it helps anyone else, the Microsoft account you likely use to log into the Azure portal won’t work for basic auth. You can find the credentials in the portal by navigating to your WebJob, highlight it, click Properties, and grab the username/password from that blade.

2reactions
mathewccommented, Oct 9, 2019

We’ve found a regression in our recent App Service deployment (not related to .NET Core 3 or WebJobs). The issue affects form POSTs to the SCM/Kudu endpoint using SSO login. ARM and basic auth are not impacted and could be used for a workaround (@ahmelsayed). We’re actively working on a patch for this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting bad gateway errors in Application Gateway
Learn how to troubleshoot Application Gateway Server Error: 502 - Web server received an invalid response while acting as a gateway or proxy ......
Read more >
502 Bad Gateway Error: What It Is and How to Fix It
The 502 Bad Gateway error usually means there's an issue with the server, plugins, or firewall. Learn how to fix this error here....
Read more >
Getting 502 - Bad Gateway errors on a Kentico site running ...
502 HTTP error is an invalid response from the server. Are those static resources loaded through HTTPS as well?
Read more >
How to Fix Kubernetes '502 Bad Gateway' Error
1. Check if the Pod and Containers is Running. If the pod or one of its containers did not start, this could result...
Read more >
504 Gateway Time-out or 502 Bad Gateway HTTP Errors ...
This is often caused by the CloudHub Application that the DLB is forwarding to is either not running or is in an unhealthy...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found