LimxWu opened a new issue, #367:
URL: https://github.com/apache/apisix-docker/issues/367

   I use the docker-compose demo of the official website, but the log shows 
that apisix does not use the etcd host in the configuration file. Here is my 
config and log
   config.yaml
   ```yaml
   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: edd1c9f034335f136f87ad84b625c8f1
         role: admin                 # admin: manage all configuration data
   
     etcd:
       host:                           # it's possible to define multiple etcd 
hosts addresses of the same etcd cluster.
         - "http://etcd:2379";     # multiple etcd address
       prefix: "/apisix"               # apisix configurations prefix
       timeout: 30                     # 30 seconds
   ```
   log
   ```
   Warning! Request etcd endpoint 'http://127.0.0.1:2379/version' error, 
connection refused, retry time=1
   Warning! Request etcd endpoint 'http://127.0.0.1:2379/version' error, 
connection refused, retry time=2
   /usr/local/openresty/luajit/bin/luajit ./apisix/cli/apisix.lua init
   /usr/local/openresty/luajit/bin/luajit ./apisix/cli/apisix.lua init_etcd
   Warning! Request etcd endpoint 'http://127.0.0.1:2379/version' error, 
connection refused, retry time=1
   Warning! Request etcd endpoint 'http://127.0.0.1:2379/version' error, 
connection refused, retry time=2
   ```
   I have checked docker-compose, there is the correct mapping config file.
   ```yaml
     apisix:
       container_name: apisix
       image: apache/apisix
       restart: always
       volumes:
         - ./apisix_log:/usr/local/apisix/logs
         - ./apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro
       depends_on:
         - etcd
       ports:
         - "9080:9080/tcp"
         - "9091:9091/tcp"
         - "9443:9443/tcp"
         - "9092:9092/tcp"
       environment:
         - ETCD_ADVERTISE_CLIENT_URLS=http://192.168.28.85: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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to