Skip to content
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

Consul connect proxy reset connection instead of timeout #21877

Open
VenkateswaranJ opened this issue Oct 26, 2024 · 0 comments
Open

Consul connect proxy reset connection instead of timeout #21877

VenkateswaranJ opened this issue Oct 26, 2024 · 0 comments

Comments

@VenkateswaranJ
Copy link

I have grafana Loki running as a nomad service which gets connected to clients via consul proxy.

Main Runtime service

service {
    name = "runtime"
    connect {
        sidecar_service {
            proxy {
                upstreams {
                    destination_name = "loki"
                    local_bind_port  = 18092
                }
            }
        }
    }
}

Loki Service

service {
    name = "loki"
    port = 3100
    check {
        name     = "Loki instance health check"
        type     = "http"
        path     = "/ready"
        interval = "10s"
        timeout  = "2s"
        expose   = true
        check_restart {
            limit = 3
            grace = "2m"
        }
    }
    connect {
        sidecar_service {}
        sidecar_task {
            resources {
              cpu    = 80
              memory = 80
            }
        }
    }
}

Everything works correctly, but when I stop the Loki service, I receive a 'connection reset' error from the Consul proxy, even after reducing the client connection timeout to 1 second (default connection timeout for the Consul proxy is 5 seconds). In this case, I expect an HTTP connection timeout instead of an immediate connection reset by the proxy.

# wget --timeout=1 http://127.0.0.1:18092/ready
Connecting to 127.0.0.1:18092 (127.0.0.1:18092)
wget: error getting response: Connection reset by peer 

As you can see above, the Consul proxy reset the connection even though the client ("wget") has 1-second timeout.

Could someone please help with this? Am I missing some configuration in the nomad service spec?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant