hashicorp / consul

Consul is a distributed, highly available, and data center aware solution to connect and configure applications across dynamic, distributed infrastructure.
https://www.consul.io
Other
28.37k stars 4.42k forks source link

The Watch cannot be triggered at all #4359

Closed richie-tt closed 6 years ago

richie-tt commented 6 years ago

Overview of the Issue

After release 1.2.0, the watch cannot be triggered at all, More info you can find under following link, https://github.com/hashicorp/consul/issues/4076 I don't have permission to re-open the old ticket, because it was not closed by me.

you cannot re-open your own issues if a repo collaborator closed them

The problem is that after upgrade to new version v1.2.0 the watch cannot be triggered any more

Reproduction Steps

Steps to reproduce this issue, eg:

{
  "advertise_addr": "10.202.24.8",
  "bind_addr": "10.202.24.8",
  "client_addr": "0.0.0.0",
  "log_level": "INFO",
  "datacenter": "eu-west-1",
  "node_name": "10.202.24.8",
  "retry_join": ["consul.tech.inet"],
  "server": false,
  "ui": false,
  "ports": {
    "http": -1,
    "https": 8500
  },
  "key_file": "/etc/pki/tls/private/consul.key",
  "cert_file": "/etc/pki/tls/certs/consul.crt",
  "domain": "consul",
  "enable_script_checks": true
}
  "watches":[
    {
        "type": "checks",
        "service": "shared1",
        "handler_type": "http",
        "http_handler_config": {
            "path":"https://salt01.tech.inet:4080/hook/percona",
            "method": "POST",
            "header": {"cluster": ["shared1"]},
            "timeout": "10s",
            "tls_skip_verify": true
        }
    }
  ]

Consul info for both Client and Server

Client
# consul info
agent:
        check_monitors = 2
        check_ttls = 0
        checks = 4
        services = 3
build:
        prerelease = 
        revision = 28141971
        version = 1.2.0
consul:
        known_servers = 3
        server = false
runtime:
        arch = amd64
        cpu_count = 4
        goroutines = 47
        max_procs = 4
        os = linux
        version = go1.10.1
serf_lan:
        coordinate_resets = 0
        encrypted = false
        event_queue = 0
        event_time = 173
        failed = 0
        health_score = 0
        intent_queue = 0
        left = 0
        member_time = 2365
        members = 40
        query_queue = 0
        query_time = 1
Server
# consul info
agent:
        check_monitors = 0
        check_ttls = 5
        checks = 5
        services = 5
build:
        prerelease = 
        revision = 28141971
        version = 1.2.0
consul:
        bootstrap = false
        known_datacenters = 1
        leader = true
        leader_addr = 10.200.12.34:8300
        server = true
raft:
        applied_index = 2891797
        commit_index = 2891797
        fsm_pending = 0
        last_contact = 0
        last_log_index = 2891797
        last_log_term = 1765
        last_snapshot_index = 2891042
        last_snapshot_term = 1765
        latest_configuration = [{Suffrage:Voter ID:baf253c9-7a07-e8bf-2a16-4fdac5b8d779 Address:10.200.12.34:8300} {Suffrage:Voter ID:6458a929-bdf5-4bc1-e4b0-a966618c6749 Address:10.200.22.20:8300} {Suffrage:Voter ID:4725f550-8fe0-b75c-9a11-19417a14800f Address:10.200.32.22:8300}]
        latest_configuration_index = 2355400
        num_peers = 2
        protocol_version = 3
        protocol_version_max = 3
        protocol_version_min = 0
        snapshot_version_max = 1
        snapshot_version_min = 0
        state = Leader
        term = 1765
runtime:
        arch = amd64
        cpu_count = 1
        goroutines = 340
        max_procs = 1
        os = linux
        version = go1.10.1
serf_lan:
        coordinate_resets = 0
        encrypted = false
        event_queue = 0
        event_time = 173
        failed = 0
        health_score = 0
        intent_queue = 0
        left = 1
        member_time = 2365
        members = 41
        query_queue = 0
        query_time = 1
serf_wan:
        coordinate_resets = 0
        encrypted = false
        event_queue = 0
        event_time = 1
        failed = 0
        health_score = 0
        intent_queue = 0
        left = 0
        member_time = 227
        members = 3
        query_queue = 0
        query_time = 1

Operating system and Environment details

System Versions:
           dist: centos 7.5.1804 Core
         locale: UTF-8
        machine: x86_64
        release: 3.10.0-693.11.6.el7.x86_64
         system: Linux
        version: CentOS Linux 7.5.1804 Core

Log Fragments

Jul  9 11:44:42 sql198a-prd-1 consulID: ==> Starting Consul agent...
Jul  9 11:44:42 sql198a-prd-1 consulID: ==> Consul agent running!
Jul  9 11:44:42 sql198a-prd-1 consulID: Version: 'v1.2.0'
Jul  9 11:44:42 sql198a-prd-1 consulID: Node ID: '4c71d0cc-bbe1-4e0f-f814-4214e95c1cfb'
Jul  9 11:44:42 sql198a-prd-1 consulID: Node name: '10.205.14.198'
Jul  9 11:44:42 sql198a-prd-1 consulID: Datacenter: 'eu-west-1' (Segment: '')
Jul  9 11:44:42 sql198a-prd-1 consulID: Server: false (Bootstrap: false)
Jul  9 11:44:42 sql198a-prd-1 consulID: Client Addr: [0.0.0.0] (HTTP: -1, HTTPS: 8500, DNS: 8600)
Jul  9 11:44:42 sql198a-prd-1 consulID: Cluster Addr: 10.205.14.198 (LAN: 8301, WAN: 8302)
Jul  9 11:44:42 sql198a-prd-1 consulID: Encrypt: Gossip: false, TLS-Outgoing: false, TLS-Incoming: false
Jul  9 11:44:42 sql198a-prd-1 consulID: ==> Log data will now stream in as it occurs:
Jul  9 11:44:42 sql198a-prd-1 consulID: 2018/07/09 11:44:42 [WARN] agent: Node name 
Jul  9 11:44:42 sql198a-prd-1 consulID: 2018/07/09 11:44:42 [INFO] serf: EventMemberJoin: 10.205.14.198 10.205.14.198
Jul  9 11:44:42 sql198a-prd-1 consulID: 2018/07/09 11:44:42 [INFO] agent: Started DNS server 0.0.0.0:8600 (udp)
Jul  9 11:44:42 sql198a-prd-1 consulID: 2018/07/09 11:44:42 [INFO] agent: Started DNS server 0.0.0.0:8600 (tcp)
Jul  9 11:44:42 sql198a-prd-1 consulID: 2018/07/09 11:44:42 [INFO] agent: Started HTTPS server on [::]:8500 (tcp)
Jul  9 11:44:42 sql198a-prd-1 consulID: 2018/07/09 11:44:42 [INFO] agent: started state syncer
Jul  9 11:44:42 sql198a-prd-1 consulID: 2018/07/09 11:44:42 [INFO] agent: Retry join LAN is supported for: aliyun aws azure digitalocean gce os scaleway softlayer triton
Jul  9 11:44:42 sql198a-prd-1 consulID: 2018/07/09 11:44:42 [INFO] agent: Joining LAN cluster...
Jul  9 11:44:42 sql198a-prd-1 consulID: 2018/07/09 11:44:42 [INFO] agent: (LAN) joining: [consul-tech.inet]
Jul  9 11:44:42 sql198a-prd-1 consulID: 2018/07/09 11:44:42 [ERR] agent: Failed to run watch: Failed to connect to agent: address https://0.0.0.0:8500: too many colons in address
mkeeler commented 6 years ago

Definitely a bug but going to close this one as a duplicate of #4358