Skip to content

9.0.x: Connection errors to healthy origin #7638

Closed

Description

@mtorluemke

From docs:

20210328.17h19m28s CONNECT:[0] could not connect [CONNECTION_ERROR] to 192.168.3.1 for 'http://192.168.3.1:2000/' connect_result=5 src_port=0
20210328.17h19m37s CONNECT:[0] could not connect [CONNECTION_ERROR] to 192.168.3.1 for 'http://192.168.3.1:2000' connect_result=5 src_port=0
20210328.17h19m39s CONNECT:[0] could not connect [CONNECTION_ERROR] to 192.168.3.1 for 'http://192.168.3.1:2000/' connect_result=5 src_port=0
20210328.17h20m28s CONNECT:[0] could not connect [CONNECTION_ERROR] to 192.168.3.1 for 'http://192.168.3.1:2000/' connect_result=5 src_port=0

But, connectivity is fine:

root@origin1 # telnet 192.168.3.1 2000
Trying 192.168.3.1...
Connected to 192.168.3.1.
Escape character is '^]'.
^CConnection closed by foreign host.
root@origin1 #

Error is from:

//////////////////////////////////////////
...which hasn't changed in a few years.

So, one theory is that connectivity had an interruption, and did not recover when the connectivity is restored.

Activity

  1. shinrich commented on Mar 29, 2021

    @shinrich
    Member

    @djcarlin has been tracking down similar issues for us since before Christmas. We have been running with the changes in PR #7580 to help track down the issue.

  2. djcarlin commented on Mar 29, 2021

    @djcarlin
    Contributor

    Do you see log entries in error.log with "(setting last failure time)" ? We were triggering "dead/down" origin behavior inappropriately sometimes, which would prevent subsequent connections from working for a time.

    In our case, I noticed squid.log entries with "ERR_CONNECT_FAIL 502" when a POST was happening, and Content-Length sent by client request differed from %<cqql> log field - "Client request header and content length combined, in bytes." In our case, Content-Length was tens of megabytes and cqql was only hundreds of bytes. This was marking origin down and breaking other valid requests.

  3. djcarlin commented on Mar 29, 2021

    @djcarlin
    Contributor

    If you think you're bumping against dead/down origin behavior, see #7290 and #7283 - I think the conditions on when an origin is marked dead/down need to be reviewed.

  4. mtorluemke commented on Mar 29, 2021

    @mtorluemke
    CollaboratorAuthor

    If you think you're bumping against dead/down origin behavior, see #7290 and #7283 - I think the conditions on when an origin is marked dead/down need to be reviewed.

    I thought "down server" was always when ATS got a TCP RST, and "dead server" was always when connection attempts (TCP connection + HTTP headers in <9.x, TCP connection in >=9.x) failed.

  5. mtorluemke commented on Mar 29, 2021

    @mtorluemke
    CollaboratorAuthor

    setting last failure time

    Yes, see some of those errors in error.log: 20210328.14h19m39s CONNECT Error: EIO: Input/output error [5] connecting to 192.168.3.1:2000 for 'http://192.168.3.1:2000/' (setting last failure time)

  6. shinrich commented on Apr 22, 2021

    @shinrich
    Member

    Within the code there is no separate tracking of an origin connection failing due to receiving a TCP RST as opposed to any other failure. More discussion on what currently makes a server dead in issue #7290. I hope to have a PR up to address the options discussed early next week. Testing internally right now. Hopefully those changes will help fix and/or debug the origin connection problems we are seeing with ASF 9.1 in the docs environment.

  7. bryancall commented on Feb 1, 2022

    @bryancall
    Contributor

    @mtorluemke is this still an issue?

  8. bryancall commented on Mar 8, 2022

    @bryancall
    Contributor

    If this is still an issue please reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions