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

grpc health-checks: "check is not a valid HTTP or TCP check" #117

Open
VictorBac opened this issue Jan 10, 2022 · 0 comments · May be fixed by #120
Open

grpc health-checks: "check is not a valid HTTP or TCP check" #117

VictorBac opened this issue Jan 10, 2022 · 0 comments · May be fixed by #120

Comments

@VictorBac
Copy link

VictorBac commented Jan 10, 2022

Hi team!

I am using consul-esm to run health-checks for externals services running in kubernetes. It's working great for http services.

But I can't make it works with GRPC checks:

Service + health-check registration:

{
    "node": "external-node",
    "address": "127.0.0.1",
    "NodeMeta": {
        "external-source": "kubernetes",
        "external-node": "true",
        "external-probe": "true"
    },
    "service": {
        "ID": "test-grpc",
        "service": "test-grpc",
        "tags": [
            "kubernetes",
            "health-check"
        ],
        "address": "random-url",
        "port": 80,
        "meta": {
            "external-k8s-ns": "ns_name",
            "external-source": "kubernetes"
        }
    },
    "Checks": [
        {
            "Name": "test-grpc",
            "ServiceID": "test-grpc",
            "status": "failing",
            "Definition": {
                "grpc": "my-host:31314",
                "interval": "10s"
            }
        }
    ]
}

The service + health check is created:

$ curl http://consul:8500/v1/health/node/external-node?pretty
[
    {
        "Node": "external-node",
        "CheckID": "test-grpc",
        "Name": "test-grpc",
        "Status": "success",
        "Notes": "",
        "Output": "",
        "ServiceID": "test-grpc",
        "ServiceName": "test-grpc",
        "ServiceTags": [
            "kubernetes",
            "health-check"
        ],
        "Type": "grpc",
        "Definition": {
            "Interval": "10s",
            "GRPC": "my-host:31314"
        },
        "CreateIndex": 677654376,
        "ModifyIndex": 677654376
    }
]

But consul-esm doesn't even try to run the health check:

Jan 10 14:18:43 hostX consul-esm.service[8460]: 2022-01-10T14:18:43.064-0500 [WARN]  project/check.go:244: consul-esm: check is not a valid HTTP or TCP check: checkHash=external-node/test-grpc/test-grpc

I know the service is running, I can test it using https://github.com/grpc-ecosystem/grpc-health-probe:

$ grpc-health-probe -addr my-host:31314
status: SERVING

Any idea how to fix this the health-check ?

@VictorBac VictorBac linked a pull request Jan 21, 2022 that will close this issue
@blake blake linked a pull request Jan 22, 2022 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant