领事客户端-企业代理后面的服务器

我在两个单独的服务器上有一个Consul服务器节点和Consul客户端节点。我希望我的客户加入集群,但是我的代理人拒绝了我。 我不知道为什么,因为我已经设置了http_proxyhttps_proxyno_proxy env vars,但是它没有任何改变。

这是我的2个docker-compose文件:

服务器

  consul:
    image: consul:1.6
    container_name: consul
    hostname: consul
    restart: always
    network_mode: host
    volumes:
      - consuldata:/consul/data
      - ./rules/consul.hcl:/consul/rules/consul.hcl
      - ./rules/registrator.hcl:/consul/rules/registrator.hcl
      - ../my.pem:/etc/ssl/certs/my.pem:ro
    environment:
      CONSUL_LOCAL_CONFIG: >-
        {
          "leave_on_terminate": false,"skip_leave_on_interrupt": true,"acl": {"enabled": true,"default_policy": "deny","down_policy": "extend-cache","enable_token_persistence": true},"log_level": "debug","ports": {
            "https": 8501
          },"key_file": "/etc/ssl/certs/my.pem","cert_file": "/etc/ssl/certs/my.pem","ca_file": "/etc/ssl/certs/my.pem","performance": {
            "raft_multiplier": 1
          }
        }
      HOST_IP: ${HOST_IP}
      http_proxy: http://user:password@myproxy:3129
      https_proxy: http://user:password@myproxy:3129
      HTTP_Proxy: http://user:password@myproxy:3129
      HTTPS_Proxy: http://user:password@myproxy:3129
      no_proxy: "127.0.0.1"
      NO_Proxy: "127.0.0.1"
    command: "agent -server -client=${HOST_IP} -bind=${HOST_IP} -bootstrap-expect=2 -ui"

客户

  consul:
    image: consul:1.6
    container_name: consul
    hostname: consul
    restart: always
    network_mode: host
    volumes:
      - consuldata:/consul/data
      - ./rules/consul.hcl:/consul/rules/consul.hcl
      - ./rules/registrator.hcl:/consul/rules/registrator.hcl
      - ../my.pem:/etc/ssl/certs/my.pem:ro
    environment:
      CONSUL_LOCAL_CONFIG: >-
        {
          "leave_on_terminate": true,"log_level": "trace","performance": {
            "raft_multiplier": 1
          }
        }
      HOST_IP: ${HOST_IP}
      http_proxy: http://user:password@myproxy:3129
      https_proxy: http://user:password@myproxy:3129
      HTTP_Proxy: http://user:password@myproxy:3129
      HTTPS_Proxy: http://user:password@myproxy:3129
      no_proxy: "127.0.0.1,${SERVER_IP},consul-dev.intra.net"
      NO_Proxy: "127.0.0.1,consul-dev.intra.net"
    command: "agent -bind=${HOST_IP} -client=${HOST_IP} -retry-join=${SERVER_IP}"

我错了吗?

谢谢。

bxgwd0904 回答:领事客户端-企业代理后面的服务器

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3165491.html

大家都在问