You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "Lanhild (via GitHub)" <gi...@apache.org> on 2023/04/04 21:39:51 UTC

[GitHub] [apisix-docker] Lanhild opened a new issue, #454: Cannot connect to etcd

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

   Using the same config as [here](), I'm having this error:
   ```
   apisix-dashboard_1  | {"level":"warn","ts":"2023-04-04T21:15:21.625Z","logger":"etcd-client","caller":"v3@v3.5.5/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0xc0001648c0/etcd:2379","attempt":0,"error":"rpc error: code = DeadlineExceeded desc = latest balancer error: last connection error: connection error: desc = \"transport: Error while dialing dial tcp 0.0.0.0:2379: connect: connection refused\""}
   ```
   
   This makes me unable to save anything in the dashboard. For example, when adding an upstream and clicking `Submit`, it loads forever.


-- 
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-docker] Lanhild commented on issue #454: Cannot connect to etcd

Posted by "Lanhild (via GitHub)" <gi...@apache.org>.
Lanhild commented on issue #454:
URL: https://github.com/apache/apisix-docker/issues/454#issuecomment-1505389754

   Hey @tanshunyuan ,
   the thing is that I'm using the exact same configuration from apache/apisix-docker. 
   Though, might the issue come from the fact that I migrated from ~2.15 to 3.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

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


[GitHub] [apisix-docker] Lanhild commented on issue #454: Cannot connect to etcd

Posted by "Lanhild (via GitHub)" <gi...@apache.org>.
Lanhild commented on issue #454:
URL: https://github.com/apache/apisix-docker/issues/454#issuecomment-1507186053

   Hi,
   That was it. Changing `ETCD_ADVERTISE_CLIENT_URLS` from `http://0.0.0.0:2379` to `http://etcd:2379` did solve it.
   Thank you!


-- 
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-docker] tanshunyuan commented on issue #454: Cannot connect to etcd

Posted by "tanshunyuan (via GitHub)" <gi...@apache.org>.
tanshunyuan commented on issue #454:
URL: https://github.com/apache/apisix-docker/issues/454#issuecomment-1506873190

   > Though, might the issue come from the fact that I migrated from ~2.15 to 3.0?
   
   I'm not really sure too, I didn't copy directly from [example/docker-compose.yml](https://github.com/apache/apisix-docker/blob/master/example/docker-compose.yml) instead I used [compose/docker-compose-master.yml](https://github.com/apache/apisix-docker/blob/master/compose/docker-compose-master.yaml) and retro-fitted the dashboard in as you see in my configuration below.
   
   For at the very least, using `ETCD_ADVERTISE_CLIENT_URLS: "http://etcd:2379"` helped resolve the connection error
   ```
     apisix:
       image: 'apache/apisix:3.2.0-debian'
       container_name: apisix
       restart: always
       volumes:
         - ./gateway-config/example/apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro
       depends_on:
         - etcd
       ports:
         - '9180:9180/tcp'
         - '9080:9080/tcp'
         - '9091:9091/tcp'
         - '9443:9443/tcp'
       networks:
         - apisix
     dashboard:
       image: 'apache/apisix-dashboard:3.0.1-alpine'
       container_name: dashboard
       restart: always
       volumes:
         - ./gateway-config/example/dashboard_conf/conf.yaml:/usr/local/apisix-dashboard/conf/conf.yaml:ro
       depends_on:
         - etcd
       ports:
         - '9000:9000/tcp'
       networks:
         - apisix
     etcd:
       image: bitnami/etcd:3.4.15
       container_name: etcd
       restart: always
       volumes:
         - etcd_data:/bitnami/etcd
       environment:
         ETCD_ENABLE_V2: 'true'
         ALLOW_NONE_AUTHENTICATION: 'yes'
         ETCD_ADVERTISE_CLIENT_URLS: 'http://etcd:2379'
         ETCD_LISTEN_CLIENT_URLS: 'http://0.0.0.0:2379'
       ports:
         - '2379:2379/tcp'
       networks:
         - apisix
   
   volumes:
     etcd_data:
       driver: local
   
   networks:
     apisix:
       driver: bridge
   ```


-- 
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-docker] Lanhild closed issue #454: Cannot connect to etcd

Posted by "Lanhild (via GitHub)" <gi...@apache.org>.
Lanhild closed issue #454: Cannot connect to etcd
URL: https://github.com/apache/apisix-docker/issues/454


-- 
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-docker] tanshunyuan commented on issue #454: Cannot connect to etcd

Posted by "tanshunyuan (via GitHub)" <gi...@apache.org>.
tanshunyuan commented on issue #454:
URL: https://github.com/apache/apisix-docker/issues/454#issuecomment-1505189798

   maybe you can try looking at https://github.com/apache/apisix-docker/blob/master/example/docker-compose.yml#L48-L61 specifically. It can be due etcd not exposing the right port, specifically the following
   
   ```
         ETCD_ENABLE_V2: "true"
         ALLOW_NONE_AUTHENTICATION: "yes"
         ETCD_ADVERTISE_CLIENT_URLS: "http://etcd:2379" <---
         ETCD_LISTEN_CLIENT_URLS: "http://0.0.0.0: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