You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/05/09 05:44:46 UTC

[GitHub] [apisix] prajith-nair opened a new issue, #7008: bug:

prajith-nair opened a new issue, #7008:
URL: https://github.com/apache/apisix/issues/7008

   ### Current Behavior
   
   **apisix_conf/config.yaml**
   
   `#
   # Licensed to the Apache Software Foundation (ASF) under one or more
   # contributor license agreements.  See the NOTICE file distributed with
   # this work for additional information regarding copyright ownership.
   # The ASF licenses this file to You under the Apache License, Version 2.0
   # (the "License"); you may not use this file except in compliance with
   # the License.  You may obtain a copy of the License at
   #
   #     http://www.apache.org/licenses/LICENSE-2.0
   #
   # Unless required by applicable law or agreed to in writing, software
   # distributed under the License is distributed on an "AS IS" BASIS,
   # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   # See the License for the specific language governing permissions and
   # limitations under the License.
   #
   
   apisix:
     node_listen: 9080              # APISIX listening port
     enable_ipv6: false
   
     allow_admin:                  # http://nginx.org/en/docs/http/ngx_http_access_module.html#allow
       - 0.0.0.0/0              # We need to restrict ip access rules for security. 0.0.0.0/0 is for test.
   
     admin_key:
       - name: "admin"
         key: xxxxx
         role: admin                 # admin: manage all configuration data
         # viewer: only can view configuration data
       - name: "viewer"
         key: xxxxx
         role: viewer
   
     enable_control: true
     control:
       ip: "0.0.0.0"
       port: 9092
   
   
   etcd:
     host:                           # it's possible to define multiple etcd hosts addresses of the same etcd cluster.
       - "http://labindia01_etcd:2379"     # multiple etcd address, if your etcd cluster enables TLS, please use https scheme,
       # e.g. https://127.0.0.1:2379.
     prefix: /apisix                 # apisix configurations prefix
     timeout: 30                     # 30 seconds
     #resync_delay: 5                # when sync failed and a rest is needed, resync after the configured seconds plus 50% random jitter
     #health_check_timeout: 10       # etcd retry the unhealthy nodes after the configured seconds
     health_check_retry: 2           # etcd retry time that only affects the health check, default 2
     #user: root                     # root username for etcd
     #password: 5tHkHhYkjr6cQY       # root password for etcd
     tls:
       # To enable etcd client certificate you need to build APISIX-OpenResty, see
       # https://apisix.apache.org/docs/apisix/how-to-build/#step-6-build-openresty-for-apache-apisix
       #cert: /path/to/cert          # path of certificate used by the etcd client
       #key: /path/to/key            # path of key used by the etcd client
   
       verify: false                  # whether to verify the etcd endpoint certificate when setup a TLS connection to etcd,
       # the default value is true, e.g. the certificate will be verified strictly.
       #sni:                         # the SNI for etcd TLS requests. If missed, the host part of the URL will be used.
   
   
   plugin_attr:
     prometheus:
       export_addr:
         ip: "0.0.0.0"
         port: 9091`
   
   etcd.conf.yml : 
   `#
   # Licensed to the Apache Software Foundation (ASF) under one or more
   # contributor license agreements.  See the NOTICE file distributed with
   # this work for additional information regarding copyright ownership.
   # The ASF licenses this file to You under the Apache License, Version 2.0
   # (the "License"); you may not use this file except in compliance with
   # the License.  You may obtain a copy of the License at
   #
   #     http://www.apache.org/licenses/LICENSE-2.0
   #
   # Unless required by applicable law or agreed to in writing, software
   # distributed under the License is distributed on an "AS IS" BASIS,
   # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   # See the License for the specific language governing permissions and
   # limitations under the License.
   #
   
   # This is the configuration file for the etcd server.
   
   # Human-readable name for this member.
   name: 'default'
   
   # Path to the data directory.
   data-dir:
   
   # Path to the dedicated wal directory.
   wal-dir:
   
   # Number of committed transactions to trigger a snapshot to disk.
   snapshot-count: 10000
   
   # Time (in milliseconds) of a heartbeat interval.
   heartbeat-interval: 100
   
   # Time (in milliseconds) for an election to timeout.
   election-timeout: 1000
   
   # Raise alarms when backend size exceeds the given quota. 0 means use the
   # default quota.
   quota-backend-bytes: 0
   
   # List of comma separated URLs to listen on for peer traffic.
   listen-peer-urls: http://localhost:2380
   
   # List of comma separated URLs to listen on for client traffic.
   listen-client-urls: http://localhost:2379
   
   # Maximum number of snapshot files to retain (0 is unlimited).
   max-snapshots: 5
   
   # Maximum number of wal files to retain (0 is unlimited).
   max-wals: 5
   
   # Comma-separated white list of origins for CORS (cross-origin resource sharing).
   cors:
   
   # List of this member's peer URLs to advertise to the rest of the cluster.
   # The URLs needed to be a comma-separated list.
   initial-advertise-peer-urls: http://localhost:2380
   
   # List of this member's client URLs to advertise to the public.
   # The URLs needed to be a comma-separated list.
   advertise-client-urls: http://localhost:2379
   
   # Discovery URL used to bootstrap the cluster.
   discovery:
   
   # Valid values include 'exit', 'proxy'
   discovery-fallback: 'proxy'
   
   # HTTP proxy to use for traffic to discovery service.
   discovery-proxy:
   
   # DNS domain used to bootstrap initial cluster.
   discovery-srv:
   
   # Initial cluster configuration for bootstrapping.
   initial-cluster:
   
   # Initial cluster token for the etcd cluster during bootstrap.
   initial-cluster-token: 'etcd-cluster'
   
   # Initial cluster state ('new' or 'existing').
   initial-cluster-state: 'new'
   
   # Reject reconfiguration requests that would cause quorum loss.
   strict-reconfig-check: false
   
   # Accept etcd V2 client requests
   enable-v2: true
   
   # Enable runtime profiling data via HTTP server
   enable-pprof: true
   
   # Valid values include 'on', 'readonly', 'off'
   proxy: 'off'
   
   # Time (in milliseconds) an endpoint will be held in a failed state.
   proxy-failure-wait: 5000
   
   # Time (in milliseconds) of the endpoints refresh interval.
   proxy-refresh-interval: 30000
   
   # Time (in milliseconds) for a dial to timeout.
   proxy-dial-timeout: 1000
   
   # Time (in milliseconds) for a write to timeout.
   proxy-write-timeout: 5000
   
   # Time (in milliseconds) for a read to timeout.
   proxy-read-timeout: 0
   
   client-transport-security:
     # Path to the client server TLS cert file.
     cert-file:
   
     # Path to the client server TLS key file.
     key-file:
   
     # Enable client cert authentication.
     client-cert-auth: false
   
     # Path to the client server TLS trusted CA cert file.
     trusted-ca-file:
   
     # Client TLS using generated certificates
     auto-tls: false
   
   peer-transport-security:
     # Path to the peer server TLS cert file.
     cert-file:
   
     # Path to the peer server TLS key file.
     key-file:
   
     # Enable peer client cert authentication.
     client-cert-auth: false
   
     # Path to the peer server TLS trusted CA cert file.
     trusted-ca-file:
   
     # Peer TLS using generated certificates.
     auto-tls: false
   
   # Enable debug-level logging for etcd.
   debug: false
   
   logger: zap
   
   # Specify 'stdout' or 'stderr' to skip journald logging even when running under systemd.
   log-outputs: [stderr]
   
   # Force to create a new one member cluster.
   force-new-cluster: false
   
   auto-compaction-mode: periodic
   auto-compaction-retention: "1"`
   
   **docker-compose.yml**
   
   `  apisix:
       hostname: "{{.Service.Name}}"
       image: apache/apisix:2.13.1-alpine
       restart: always
       depends_on:
         - etcd
       #network_mode: host
       ports:
         - "9080:9080/tcp"
         - "9091:9091/tcp"
         - "9443:9443/tcp"
         - "9092:9092/tcp"
       configs:
         - source: apisix-config
           target: /usr/local/apisix/conf/config.yaml
           mode: 0444
       networks:
         my-stack-network:
           aliases:
             - apisix
       deploy:
         restart_policy:
           condition: any
         update_config:
           # ensure at least one instance runs when updating
           order: start-first
         resources:
           limits:
             memory: 100M
           reservations:
             memory: 100M
         placement:
           constraints:
             - ${SERVICE_CONSTRAINT:-node.role==worker}
       logging:
         driver: "syslog"
         options:
           syslog-address: "udp://127.0.0.1:${RSYSLOG_EXPOSED_PORT:-10514}"
           tag: "apisix/{{.Name}}/container.log"
           syslog-facility: local2
           syslog-format: rfc3164
     etcd:
       hostname: "{{.Service.Name}}"
       image: bitnami/etcd:3.5.4
       restart: always
       volumes:
         - etcd_data:/bitnami/etcd
       environment:
         ETCD_ENABLE_V2: "true"
         ALLOW_NONE_AUTHENTICATION: "yes"
         ETCD_ADVERTISE_CLIENT_URLS: "http://0.0.0.0:2379"
         ETCD_LISTEN_CLIENT_URLS: "http://labindia01_etcd:2379"
       ports:
         - "2379:2379/tcp"
       networks:
         my-stack-network:
           aliases:
             - etcd
       deploy:
         restart_policy:
           condition: any
         update_config:
           # ensure at least one instance runs when updating
           order: start-first
         resources:
           limits:
             memory: 100M
           reservations:
             memory: 100M
         placement:
           constraints:
             - ${SERVICE_CONSTRAINT:-node.role==worker}
       logging:
         driver: "syslog"
         options:
           syslog-address: "udp://127.0.0.1:${RSYSLOG_EXPOSED_PORT:-10514}"
           tag: "etcd/{{.Name}}/container.log"
           syslog-facility: local2
           syslog-format: rfc3164`
   
   
   I can ping 
   
   @labindia01_etcd:/opt/bitnami/etcd/bin$ cat /etc/hosts
   127.0.0.1	localhost
   ::1	localhost ip6-localhost ip6-loopback
   fe00::0	ip6-localnet
   ff00::0	ip6-mcastprefix
   ff02::1	ip6-allnodes
   ff02::2	ip6-allrouters
   **10.0.32.31	labindia01_etcd**
   
   From Other container on same network, I can ping labindia01_etcd hostname 
   /usr/local/apisix-dashboard # ping labindia01_etcd
   PING labindia01_etcd (10.0.32.21): 56 data bytes
   64 bytes from 10.0.32.21: seq=0 ttl=64 time=0.106 ms
   64 bytes from 10.0.32.21: seq=1 ttl=64 time=0.086 ms
   64 bytes from 10.0.32.21: seq=2 ttl=64 time=0.075 ms
   64 bytes from 10.0.32.21: seq=3 ttl=64 time=0.105 ms
   64 bytes from 10.0.32.21: seq=4 ttl=64 time=0.072 ms
   
   However, defining hostname in config.yaml of apisix like below, would lead to apisix service to fail with 
   
   ```
   etcd:
     host:                           # it's possible to define multiple etcd hosts addresses of the same etcd cluster.
       - "http://labindia01_etcd:2379"     # multiple etcd address, if your etcd cluster enables TLS, please use https scheme,
       # e.g. https://127.0.0.1:2379.
     prefix: /apisix                 # apisix configurations prefix
     timeout: 30                     # 30 seconds
      tls:
         verify: false 
   ```
   
   
   
   replacing etcd container IP 10.0.32.31 in api config.yml works as expected. 
   
   ### Expected Behavior
   
   apisix service should come up with hostname defined in config.yml
   
   !@labindia01_etcd:/opt/bitnami/etcd/bin$ cat /etc/hosts
   127.0.0.1	localhost
   ::1	localhost ip6-localhost ip6-loopback
   fe00::0	ip6-localnet
   ff00::0	ip6-mcastprefix
   ff02::1	ip6-allnodes
   ff02::2	ip6-allrouters
   **10.0.32.31	labindia01_etcd**
   
   **Before** 
   etcd:
       host:
          - "http://127.0.0.1:2379"
   
   ETCD_HOST being hostname of container (labindia01_etcd) should resolve in apisix 
   
   **After**
   etcd:
        host:
          - "http://${{ETCD_HOST}}:2379"
   
   ### Error Logs
   
   ```
   labindia01_apisix.1.p3m2ok88e93c@xxxxxx    |
   labindia01_apisix.1.u2pazna86jp8@xxxxxx    | /usr/local/openresty/luajit/bin/luajit ./apisix/cli/apisix.lua init_etcd
   labindia01_apisix.1.p3m2ok88e93c@xxxxxx    | /usr/local/openresty/luajit/bin/luajit ./apisix/cli/apisix.lua init_etcd
   labindia01_apisix.1.u2pazna86jp8@xxxxxx    | 2022/05/09 05:36:53 [error] 1#1: init_by_lua error: /usr/local/apisix/apisix/core/config_etcd.lua:816: attempt to concatenate local 'err' (a nil value)
   labindia01_apisix.1.p3m2ok88e93c@xxxxxx    | 2022/05/09 05:36:39 [error] 1#1: init_by_lua error: /usr/local/apisix/apisix/core/config_etcd.lua:816: attempt to concatenate local 'err' (a nil value)
   labindia01_apisix.1.u2pazna86jp8@xxxxxx    | stack traceback:
   labindia01_apisix.1.p3m2ok88e93c@xxxxxx    | stack traceback:
   labindia01_apisix.1.u2pazna86jp8@xxxxxx    | 	/usr/local/apisix/apisix/core/config_etcd.lua:816: in function 'init'
   labindia01_apisix.1.u2pazna86jp8@xxxxxx    | 	/usr/local/apisix/apisix/init.lua:84: in function 'http_init'
   labindia01_apisix.1.p3m2ok88e93c@xxxxxx    | 	/usr/local/apisix/apisix/core/config_etcd.lua:816: in function 'init'
   labindia01_apisix.1.u2pazna86jp8@xxxxxx    | 	init_by_lua:9: in main chunk
   labindia01_apisix.1.p3m2ok88e93c@xxxxxx    | 	/usr/local/apisix/apisix/init.lua:84: in function 'http_init'
   labindia01_apisix.1.p3m2ok88e93c@xxxxxx    | 	init_by_lua:9: in main chunk
   labindia01_apisix.1.u2pazna86jp8@xxxxxx    | nginx: [error] init_by_lua error: /usr/local/apisix/apisix/core/config_etcd.lua:816: attempt to concatenate local 'err' (a nil value)
   labindia01_apisix.1.u2pazna86jp8@xxxxxx    | stack traceback:
   labindia01_apisix.1.u2pazna86jp8@xxxxxx    | 	/usr/local/apisix/apisix/core/config_etcd.lua:816: in function 'init'
   labindia01_apisix.1.p3m2ok88e93c@xxxxxx    | nginx: [error] init_by_lua error: /usr/local/apisix/apisix/core/config_etcd.lua:816: attempt to concatenate local 'err' (a nil value)
   labindia01_apisix.1.tto2u9kbjiqm@xxxxxx    | 	/usr/local/apisix/apisix/init.lua:84: in function 'http_init'
   labindia01_apisix.1.p3m2ok88e93c@xxxxxx    | stack traceback:
   labindia01_apisix.1.tto2u9kbjiqm@xxxxxx    | 	init_by_lua:9: in main chunk
   labindia01_apisix.1.p3m2ok88e93c@xxxxxx    | 	/usr/local/apisix/apisix/core/config_etcd.lua:816: in function 'init'
   labindia01_apisix.1.hy71wbvj83bk@xxxxxx    | 	/usr/local/apisix/apisix/init.lua:84: in function 'http_init'
   labindia01_apisix.1.hy71wbvj83bk@xxxxxx    | 	init_by_lua:9: in main chunk
   labindia01_apisix.1.p3m2ok88e93c@xxxxxx    | 	/usr/local/apisix/apisix/init.lua:84: in function 'http_init'
   labindia01_apisix.1.p3m2ok88e93c@xxxxxx    | 	init_by_lua:9: in main chunk
   labindia01_apisix.1.u2pazna86jp8@xxxxxx    | 	/usr/local/apisix/apisix/init.lua:84: in function 'http_init'
   labindia01_apisix.1.u2pazna86jp8@xxxxxx    | 	init_by_lua:9: in main chunk
   ```
   
   ### Steps to Reproduce
   
   1. Deploy stack using below docker-compose.yml
   
   `
   version: "3.8"
   services:
     ################################################################################
     # APISIX for traffic management
     apisix-dashboard:
       hostname: "{{.Service.Name}}"
       image: apache/apisix-dashboard:2.10.1-alpine
       restart: always
       ports:
         - "9000:9000"
       configs:
         - source: apisixdashboard-config
           target: /usr/local/apisix-dashboard/conf/conf.yaml
           mode: 0444
       networks:
        my-stack-network:
       deploy:
         restart_policy:
           condition: any
         update_config:
           # ensure at least one instance runs when updating
           order: start-first
         resources:
           limits:
             memory: 100M
           reservations:
             memory: 100M
         placement:
           constraints:
             - ${SERVICE_CONSTRAINT:-node.role==worker}
       logging:
         driver: "syslog"
         options:
           syslog-address: "udp://127.0.0.1:${RSYSLOG_EXPOSED_PORT:-10000}"
           tag: "apisix-dashboard/{{.Name}}/container.log"
           syslog-facility: local2
           syslog-format: rfc3164
     apisix:
       hostname: "{{.Service.Name}}"
       image: apache/apisix:2.13.1-alpine
       #command: /bin/sh -c 'sleep 300'
       restart: always
       depends_on:
         - etcd
       #network_mode: host
       ports:
         - "9080:9080/tcp"
         - "9091:9091/tcp"
         - "9443:9443/tcp"
         - "9092:9092/tcp"
       configs:
         - source: apisix-config
           target: /usr/local/apisix/conf/config.yaml
           mode: 0444
       networks:
        my-stack-network:
           aliases:
             - apisix
       deploy:
         restart_policy:
           condition: any
         update_config:
           # ensure at least one instance runs when updating
           order: start-first
         resources:
           limits:
             memory: 100M
           reservations:
             memory: 100M
         placement:
           constraints:
             - ${SERVICE_CONSTRAINT:-node.role==worker}
       logging:
         driver: "syslog"
         options:
           syslog-address: "udp://127.0.0.1:${RSYSLOG_EXPOSED_PORT:-10000}"
           tag: "apisix/{{.Name}}/container.log"
           syslog-facility: local2
           syslog-format: rfc3164
     etcd:
       hostname: "{{.Service.Name}}"
       image: bitnami/etcd:3.5.4
       restart: always
       volumes:
         - etcd_data:/bitnami/etcd
       environment:
         ETCD_ENABLE_V2: "true"
         ALLOW_NONE_AUTHENTICATION: "yes"
         ETCD_ADVERTISE_CLIENT_URLS: "http://0.0.0.0:2379"
         ETCD_LISTEN_CLIENT_URLS: "http://0.0.0.0:2379"
       ports:
         - "2379:2379/tcp"
       networks:
        my-stack-network:
           aliases:
             - etcd
       deploy:
         restart_policy:
           condition: any
         update_config:
           # ensure at least one instance runs when updating
           order: start-first
         resources:
           limits:
             memory: 100M
           reservations:
             memory: 100M
         placement:
           constraints:
             - ${SERVICE_CONSTRAINT:-node.role==worker}
       logging:
         driver: "syslog"
         options:
           syslog-address: "udp://127.0.0.1:${RSYSLOG_EXPOSED_PORT:-10000}"
           tag: "etcd/{{.Name}}/container.log"
           syslog-facility: local2
           syslog-format: rfc3164
   
   networks:
    my-stack-network:
   
   volumes:
     etcd_data:
       driver: local
   
   configs:
   
     apisix-config:
       name: ${DOCKER_STACK}_apisix-config-v1
       file: ${DEPLOYMENT_HOME}/resources/apisix/apisix_conf/config.yaml
     apisixdashboard-config:
       name: ${DOCKER_STACK}_apisixdashboard-config-v1
       file: ${DEPLOYMENT_HOME}/resources/apisix/dashboard_conf/conf.yaml
   `
   2. List the docker service and notice docker service for apisix doesnt comeup as expected. 
   `qoij49qbfiad   labindia01_apisix                     replicated   0/1                    apache/apisix:2.13.1-alpine                         *:9080->9080/tcp, *:9091-9092->9091-9092/tcp, *:9443->9443/tcp`
   
   3. Check docker service log labindia01_apisix for potential errors 
   
   ### Environment
   
   - APISIX version (run `apisix version`): apisix:2.13.1
   - Operating system (run `uname -a`): Darwin prajith 21.4.0 Darwin Kernel Version 21.4.0: Fri Mar 18 00:47:26 PDT 2022; root:xnu-8020.101.4~15/RELEASE_ARM64_T8101 arm64
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`): nginx version: openresty/1.19.9.1
   built by clang 13.1.6 (clang-1316.0.21.2.3)
   built with OpenSSL 1.1.1n  15 Mar 2022
   TLS SNI support enabled
   - etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`): etcdctl version: 3.5.4
   API version: 3.5
   
   @labindia01_etcd:/opt/bitnami/etcd/bin$ ./etcdctl member list
   224bff4639e481b9, started, default, http://172.18.0.6:2380, http://0.0.0.0:2379, false
   
   - APISIX Dashboard version, if relevant: 2.10.1-alpine
   - Plugin runner version, for issues related to plugin runners:
   - LuaRocks version, for installation issues (run `luarocks --version`): 3.8.0
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] prajith-nair commented on issue #7008: bug:

Posted by GitBox <gi...@apache.org>.
prajith-nair commented on issue #7008:
URL: https://github.com/apache/apisix/issues/7008#issuecomment-1120894233

   When we provide etcd container IP via config.yaml it does work as expected. However, we want it to be working with hostname supplied via config.yaml
   
   Below logs are after we edited config.yaml and supplied etcd container IP 
   
   ```
   labindia01 (master)nsg-customers$docker service logs labindia01_apisix
   labindia01_apisix.1.l475yve866q8@xxxx    | /usr/local/openresty/luajit/bin/luajit ./apisix/cli/apisix.lua init
   labindia01_apisix.1.l475yve866q8@xxxx    |
   labindia01_apisix.1.l475yve866q8@xxxx    | WARNING: using fixed Admin API token has security risk.
   labindia01_apisix.1.l475yve866q8@xxxx    | Please modify "admin_key" in conf/config.yaml .
   labindia01_apisix.1.l475yve866q8@xxxx    |
   labindia01_apisix.1.l475yve866q8@xxxx    |
   labindia01_apisix.1.l475yve866q8@xxxx    | /usr/local/openresty/luajit/bin/luajit ./apisix/cli/apisix.lua init_etcd
   labindia01_apisix.1.l475yve866q8@xxxx    | 2022/05/09 09:44:03 [warn] 43#43: *3 [lua] plugin.lua:173: load(): new plugins: {"grpc-transcode":true,"splunk-hec-logging":true,"consumer-restriction":true,"ua-restriction":true,"hmac-auth":true,"referer-restriction":true,"api-breaker":true,"limit-count":true,"loggly":true,"jwt-auth":true,"public-api":true,"openwhisk":true,"gzip":true,"syslog":true,"ext-plugin-pre-req":true,"request-id":true,"aws-lambda":true,"redirect":true,"client-control":true,"prometheus":true,"forward-auth":true,"http-logger":true,"kafka-logger":true,"udp-logger":true,"echo":true,"skywalking-logger":true,"response-rewrite":true,"traffic-split":true,"google-cloud-logging":true,"ip-restriction":true,"ldap-auth":true,"key-auth":true,"serverless-post-function":true,"zipkin":true,"proxy-rewrite":true,"ext-plugin-post-req":true,"serverless-pre-function":true,"clickhouse-logger":true,"tcp-logger":true,"authz-keycloak":true,"openid-connect":true,"uri-blocker":true,"real-ip"
 :true,"opa":true,"proxy-control":true,"csrf":true,"basic-auth":true,"authz-casbin":true,"server-info":true,"proxy-mirror":true,"limit-conn":true,"limit-req":true,"sls-logger":true,"fault-injection":true,"azure-functions":true,"proxy-cache":true,"grpc-web":true,"mocking":true,"wolf-rbac":true,"datadog":true,"file-logger":true,"cors":true,"rocketmq-logger":true,"request-validation":true,"example-plugin":true}, context: init_worker_by_lua*
   labindia01_apisix.1.l475yve866q8@xxxx    | 2022/05/09 09:44:03 [warn] 47#47: *1 [lua] plugin.lua:173: load(): new plugins: {"grpc-transcode":true,"splunk-hec-logging":true,"consumer-restriction":true,"ua-restriction":true,"hmac-auth":true,"referer-restriction":true,"api-breaker":true,"limit-count":true,"loggly":true,"jwt-auth":true,"public-api":true,"openwhisk":true,"gzip":true,"syslog":true,"ext-plugin-pre-req":true,"request-id":true,"aws-lambda":true,"redirect":true,"client-control":true,"prometheus":true,"forward-auth":true,"http-logger":true,"kafka-logger":true,"udp-logger":true,"echo":true,"skywalking-logger":true,"response-rewrite":true,"traffic-split":true,"google-cloud-logging":true,"ip-restriction":true,"ldap-auth":true,"key-auth":true,"serverless-post-function":true,"zipkin":true,"proxy-rewrite":true,"ext-plugin-post-req":true,"serverless-pre-function":true,"clickhouse-logger":true,"tcp-logger":true,"authz-keycloak":true,"openid-connect":true,"uri-blocker":true,"real-ip"
 :true,"opa":true,"proxy-control":true,"csrf":true,"basic-auth":true,"authz-casbin":true,"server-info":true,"proxy-mirror":true,"limit-conn":true,"limit-req":true,"sls-logger":true,"fault-injection":true,"azure-functions":true,"proxy-cache":true,"grpc-web":true,"mocking":true,"wolf-rbac":true,"datadog":true,"file-logger":true,"cors":true,"rocketmq-logger":true,"request-validation":true,"example-plugin":true}, context: init_worker_by_lua*
   labindia01_apisix.1.l475yve866q8@xxxx    | 2022/05/09 09:44:03 [warn] 44#44: *2 [lua] plugin.lua:173: load(): new plugins: {"grpc-transcode":true,"splunk-hec-logging":true,"consumer-restriction":true,"ua-restriction":true,"hmac-auth":true,"referer-restriction":true,"api-breaker":true,"limit-count":true,"loggly":true,"jwt-auth":true,"public-api":true,"openwhisk":true,"gzip":true,"syslog":true,"ext-plugin-pre-req":true,"request-id":true,"aws-lambda":true,"redirect":true,"client-control":true,"prometheus":true,"forward-auth":true,"http-logger":true,"kafka-logger":true,"udp-logger":true,"echo":true,"skywalking-logger":true,"response-rewrite":true,"traffic-split":true,"google-cloud-logging":true,"ip-restriction":true,"ldap-auth":true,"key-auth":true,"serverless-post-function":true,"zipkin":true,"proxy-rewrite":true,"ext-plugin-post-req":true,"serverless-pre-function":true,"clickhouse-logger":true,"tcp-logger":true,"authz-keycloak":true,"openid-connect":true,"uri-blocker":true,"real-ip"
 :true,"opa":true,"proxy-control":true,"csrf":true,"basic-auth":true,"authz-casbin":true,"server-info":true,"proxy-mirror":true,"limit-conn":true,"limit-req":true,"sls-logger":true,"fault-injection":true,"azure-functions":true,"proxy-cache":true,"grpc-web":true,"mocking":true,"wolf-rbac":true,"datadog":true,"file-logger":true,"cors":true,"rocketmq-logger":true,"request-validation":true,"example-plugin":true}, context: init_worker_by_lua*
   labindia01_apisix.1.l475yve866q8@xxxx    | 2022/05/09 09:44:03 [warn] 43#43: *3 [lua] plugin.lua:223: load_stream(): new plugins: {"limit-conn":true,"ip-restriction":true,"mqtt-proxy":true}, context: init_worker_by_lua*
   labindia01_apisix.1.l475yve866q8@xxxx    | 2022/05/09 09:44:03 [warn] 47#47: *1 [lua] plugin.lua:223: load_stream(): new plugins: {"limit-conn":true,"ip-restriction":true,"mqtt-proxy":true}, context: init_worker_by_lua*
   labindia01_apisix.1.l475yve866q8@xxxx    | 2022/05/09 09:44:03 [warn] 44#44: *2 [lua] plugin.lua:223: load_stream(): new plugins: {"limit-conn":true,"ip-restriction":true,"mqtt-proxy":true}, context: init_worker_by_lua*
   
   As a matter of fact, apisix-dashboard  and apisix containers can ping labindia01_etcd(hostname) 
   
   ```
   /usr/local/apisix-dashboard # ping labindia01_etcd
   PING labindia01_etcd (10.0.32.212): 56 data bytes
   64 bytes from 10.0.32.212: seq=0 ttl=64 time=0.223 ms
   64 bytes from 10.0.32.212: seq=1 ttl=64 time=0.067 ms
   64 bytes from 10.0.32.212: seq=2 ttl=64 time=0.081 ms
   ```
   
   ```
   labindia01_apisix:/usr/local/apisix# ping labindia01_etcd
   PING labindia01_etcd (10.0.32.212): 56 data bytes
   64 bytes from 10.0.32.212: seq=0 ttl=64 time=0.079 ms
   64 bytes from 10.0.32.212: seq=1 ttl=64 time=0.067 ms
   64 bytes from 10.0.32.212: seq=2 ttl=64 time=0.068 ms
   64 bytes from 10.0.32.212: seq=3 ttl=64 time=0.083 ms
   ```
   
   However, when we define labindia01_etcd instead of container IP in config.yaml, apisix container doesnt come up. 
   
   ```
   etcd:
     host:                           # it's possible to define multiple etcd hosts addresses of the same etcd cluster.
       - "http://10.0.32.212:2379"     # multiple etcd address, if your etcd cluster enables TLS, please use https scheme,
       # e.g. https://127.0.0.1:2379.
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tzssangglass commented on issue #7008: bug:

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #7008:
URL: https://github.com/apache/apisix/issues/7008#issuecomment-1121151900

   > As a matter of fact, apisix-dashboard and apisix containers can ping labindia01_etcd(hostname)
   
   domain name resolution with ping is different from that with APISIX.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] github-actions[bot] closed issue #7008: request help: APISIX cannot resolve hostname as etcd endpoint in docker

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #7008: request help: APISIX cannot resolve hostname as etcd endpoint in docker
URL: https://github.com/apache/apisix/issues/7008


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] github-actions[bot] commented on issue #7008: request help: APISIX cannot resolve hostname as etcd endpoint in docker

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7008:
URL: https://github.com/apache/apisix/issues/7008#issuecomment-1527314925

   This issue has been marked as stale due to 350 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tokers commented on issue #7008: bug:

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #7008:
URL: https://github.com/apache/apisix/issues/7008#issuecomment-1120859759

   Have you ever signed in to the APISIX container and cat the `/etc/hosts`? You can edit the ETCD address to the IP address in APISIX `config.yaml` so that this container can run normally.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] github-actions[bot] commented on issue #7008: request help: APISIX cannot resolve hostname as etcd endpoint in docker

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7008:
URL: https://github.com/apache/apisix/issues/7008#issuecomment-1546612689

   This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tzssangglass commented on issue #7008: bug:

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #7008:
URL: https://github.com/apache/apisix/issues/7008#issuecomment-1121146595

   hi @prajith-nair I think you can ref: https://github.com/qwxingzhe/apisix-docker-compose/pull/2 to solve your problem


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] prajith-nair commented on issue #7008: request help: APISIX cannot resolve hostname as etcd endpoint in docker

Posted by GitBox <gi...@apache.org>.
prajith-nair commented on issue #7008:
URL: https://github.com/apache/apisix/issues/7008#issuecomment-1121180922

   @tzssangglass  - The changes suggested in https://github.com/qwxingzhe/apisix-docker-compose/pull/2/commits/355212182e0e334a8e51cd483819134e6a284c27 is already part of my configuration. Would you like to deploy using the docker-compose.yml file shared by me and give it a try. 
   
   Please be advised my setup uses overlay network as opposed to driver: bridge the one in https://github.com/qwxingzhe/apisix-docker-compose/pull/2/commits/355212182e0e334a8e51cd483819134e6a284c27# 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tzssangglass commented on issue #7008: request help: APISIX cannot resolve hostname as etcd endpoint in docker

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #7008:
URL: https://github.com/apache/apisix/issues/7008#issuecomment-1121800638

   > @tzssangglass - The changes suggested in [qwxingzhe/apisix-docker-compose@3552121](https://github.com/qwxingzhe/apisix-docker-compose/commit/355212182e0e334a8e51cd483819134e6a284c27) is already part of my configuration. Would you like to deploy using the docker-compose.yml file shared by me and give it a try.
   > 
   > Please be advised my setup uses overlay network as opposed to driver: bridge the one in [qwxingzhe/apisix-docker-compose@3552121](https://github.com/qwxingzhe/apisix-docker-compose/commit/355212182e0e334a8e51cd483819134e6a284c27)
   
   Unfortunately, I don't have enough machines to support building a docker overlay network.
   
   @leslie-tsang Can you help with this?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org