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

Nomad fails in parsing "grpc" key in grpc health check #5549

Closed
tommyalatalo opened this issue Apr 11, 2019 · 2 comments
Closed

Nomad fails in parsing "grpc" key in grpc health check #5549

tommyalatalo opened this issue Apr 11, 2019 · 2 comments

Comments

@tommyalatalo
Copy link

When filing a bug, please include the following headings if possible. Any example text in this template can be deleted.

Overview of the Issue

Setting up a grpc health check in a nomad job written in hcl fails to parse the key "grpc" as valid.

Reproduction Steps

Looking in the docs as well as the source code there is supposed to be support for a "grpc" key in the check stanza for a grpc check, but as soon as you enter a grpc = "server/service" line in the job file an error is thrown when validating/planning the job.

Write a nomad job and add a check containing a grpc health check such as:

check {
  name     = "grpc health"
  grpc     = "${NOMAD_ADDR_grpc}/protoService"
  grpc_use_tls = false
}

Use nomad job validate or nomad job plan to check the job, and receive an error:

Error getting job struct: Error parsing job file from job.nomad: error parsing 'job': 1 error(s) occurred:                                                                                                                                            
                                                                                                                                                                                                                                                              
* group: 'group1', task: 'task1', service: 'service1', check -> invalid key: grpc 

Consul info for both Client and Server

Running consul version 1.4.2

agent:
        check_monitors = 0
        check_ttls = 0
        checks = 15
        services = 14
build:
        prerelease = 
        revision = c97c712e
        version = 1.4.2
consul:
        acl = disabled
        bootstrap = false
        known_datacenters = 1
        leader = false
        leader_addr = 10.79.0.21:8300
        server = true
raft:
        applied_index = 108224
        commit_index = 108224
        fsm_pending = 0
        last_contact = 11.143908ms
        last_log_index = 108224
        last_log_term = 3
        last_snapshot_index = 98319
        last_snapshot_term = 3
        latest_configuration = [{Suffrage:Voter ID:1433d677-1f97-248a-0074-5b67baa351d3 Address:10.79.0.20:8300} {Suffrage:Voter ID:96374adc-82cd-7a22-ff44-ae57ab9efe8e Address:10.79.0.22:8300} {Suffrage:Voter ID:ca265ed6-7410-0103-464a-7cb468ed60ff Address:10.79.0.21:8300}]
        latest_configuration_index = 1
        num_peers = 2
        protocol_version = 3
        protocol_version_max = 3
        protocol_version_min = 0
        snapshot_version_max = 1
        snapshot_version_min = 0
        state = Follower
        term = 3
runtime:
        arch = amd64
        cpu_count = 4
        goroutines = 125
        max_procs = 4
        os = linux
        version = go1.11.4
serf_lan:
        coordinate_resets = 0
        encrypted = true
        event_queue = 0
        event_time = 3
        failed = 0
        health_score = 0
        intent_queue = 0
        left = 0
        member_time = 6
        members = 3
        query_queue = 0
        query_time = 1
serf_wan:
        coordinate_resets = 0
        encrypted = true
        event_queue = 0
        event_time = 1
        failed = 0
        health_score = 0
        intent_queue = 0
        left = 0
        member_time = 6
        members = 3
        query_queue = 0
        query_time = 1

Operating system and Environment details

Debian stretch, running nomad and consul as binaries on the host.

@endocrimes
Copy link
Contributor

👋 @tommyalatalo,

When specifying a GRPC check, you have to specify the type = "grpc" and use grpc_service to define the service. You can find an example check stanza here: https://www.nomadproject.io/docs/job-specification/service.html#grpc-health-check

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants