upstream connect error or disconnect/reset before headers. retried and the latest reset reason: protocol error

Andy Kepr 60 Reputation points
2023-03-31T17:52:44.8+00:00

Trying to curl to my deployed container app. As far as I see the container started successfully and the listener port is running evidently by running netstat -an within the container. But a curl to the health check endpoint fails.

Host: automatoraca-app.wittymeadow-****.azurecontainerapps.io

user-agent: curl/7.78.0

accept: /

  • STATE: DO => DID handle 0x80007eec8; line 2068 (connection #0)
  • multi changed, check CONNECT_PEND queue!
  • STATE: DID => PERFORMING handle 0x80007eec8; line 2187 (connection #0)
  • HTTP/2 found, allow multiplexing

< HTTP/2 502

< content-length: 110

< content-type: text/plain

< date: Fri, 31 Mar 2023 17:43:41 GMT

<

  • nread == 0, stream closed, bailing
  • STATE: PERFORMING => DONE handle 0x80007eec8; line 2386 (connection #0)
  • multi_done
  • Connection #0 to host automatoraca-app.wittymeadow-4cc63852.southcentralus.azurecontainerapps.io left intact
  • Expire cleared (transfer 0x80007eec8)

upstream connect error or disconnect/reset before headers. retried and the latest reset reason: protocol error

Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
458 questions
{count} votes

12 answers

Sort by: Most helpful
  1. Mike Urnun 9,821 Reputation points Microsoft Employee
    2023-04-12T17:50:43.9+00:00

    Hello, @Andy Kepr - Sorry for the late reply. The error message "upstream connect error or disconnect/reset before headers" indicates that the connection between the client and the server was closed before the server could send a response. The error message "protocol error" indicates that there was an issue with the protocol used to communicate between the client and the server for the health check endpoint.

    This could be caused by a number of issues, such as a misconfigured firewall (if any), a network issue, or a problem with the server itself.

    Generally speaking, to troubleshoot this issue, you can try the following steps:

    1. Check the firewall settings to ensure that the port used by the container app is open.
    2. Check the network settings to ensure that there are no issues with the network.
    3. Check the logs of the container app to see if there are any errors or issues that could be causing the problem.
    4. Try accessing the container app from a different network or location to see if the issue is specific to your current network.

    If the issue persists, we'll likely need to work with you on a 1:1 setting and take a closer look. In such a case, does your subscription carry a support plan? If not, let me know and I can help open one free of charge for resolving this issue.

    4 people found this answer helpful.

  2. Adam Jachocki 46 Reputation points
    2023-09-08T08:51:23.62+00:00

    Come on Microsoft. @Mike Urnun any news on that? Do you actually even care about this problem? It's really a big blocker.

    4 people found this answer helpful.
    0 comments No comments

  3. Andy Kepr 60 Reputation points
    2023-08-06T01:05:28.82+00:00

    The problem has not been resolved.

    2 people found this answer helpful.
    0 comments No comments

  4. Adam Jachocki 46 Reputation points
    2023-08-24T16:35:31.55+00:00

    The same here. I have my app at: https://sevigo.eu. The scenario is:

    • first enter to the site - 502 error
    • refresh page:
    upstream connect error or disconnect/reset before headers. retried and the latest reset reason: connection failure, transport failure reason: delayed connect error: 111
    
    
    
    • refresh page: page is loaded.

    This is Azure Container Application on Consumption plan with scale rule setting set to 0 - 10

    Because of that error this app is completely unusable. Why is that?

    2 people found this answer helpful.
    0 comments No comments

  5. Gole, Pankaj 10 Reputation points
    2023-08-26T07:29:44.3466667+00:00

    Even i am also facing similar error.

    May i know what could be the possible troubleshooting steps shall i take to resolve it?

    upstream connect error or disconnect/reset before headers. reset reason: connection failure, transport failure reason: delayed connect error: 111
    
    2 people found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.