apisix-docker icon indicating copy to clipboard operation
apisix-docker copied to clipboard

transport: Error while dialing dial tcp 127.0.0.1:2379: connect: connection refused

Open jinxin231 opened this issue 1 year ago • 1 comments

When I start apisix-dashboard via docker, an error occurs.

"transport: Error while dialing dial tcp 127.0.0.1:2379: connect: connection refused"

This is my config

` version: "3"

services: apisix: image: apache/apisix:${APISIX_IMAGE_TAG:-3.9.0-debian} restart: always volumes: - ./apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro depends_on: - etcd ##network_mode: host ports: - "9180:9180/tcp" - "9080:9080/tcp" - "9091:9091/tcp" - "9443:9443/tcp" - "9092:9092/tcp" networks: apisix:

etcd: image: bitnami/etcd:3.5.11 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:

web1: image: nginx:1.19.0-alpine restart: always volumes: - ./upstream/web1.conf:/etc/nginx/nginx.conf ports: - "9081:80/tcp" environment: - NGINX_PORT=80 networks: apisix:

web2: image: nginx:1.19.0-alpine restart: always volumes: - ./upstream/web2.conf:/etc/nginx/nginx.conf ports: - "9082:80/tcp" environment: - NGINX_PORT=80 networks: apisix:

prometheus: image: prom/prometheus:v2.25.0 restart: always volumes: - ./prometheus_conf/prometheus.yml:/etc/prometheus/prometheus.yml ports: - "9090:9090" networks: apisix:

grafana: image: grafana/grafana:7.3.7 restart: always ports: - "3000:3000" volumes: - "./grafana_conf/provisioning:/etc/grafana/provisioning" - "./grafana_conf/dashboards:/var/lib/grafana/dashboards" - "./grafana_conf/config/grafana.ini:/etc/grafana/grafana.ini" networks: apisix:

networks: apisix: driver: bridge

volumes: etcd_data: driver: local `

and dashboard config

'conf: listen: host: 0.0.0.0 # manager api listening ip or host name port: 9000 # manager api listening port allow_list: # If we don't set any IP list, then any IP access is allowed by default. - 0.0.0.0/0 etcd: endpoints: # supports defining multiple etcd host addresses for an etcd cluster - "http://127.0.0.1:2379" # yamllint disable rule:comments-indentation # etcd basic auth info # username: "root" # ignore etcd username if not enable etcd auth # password: "123456" # ignore etcd password if not enable etcd auth mtls: key_file: "" # Path of your self-signed client side key cert_file: "" # Path of your self-signed client side cert ca_file: "" # Path of your self-signed ca cert, the CA is used to sign callers' certificates # prefix: /apisix # apisix config's prefix in etcd, /apisix by default log: error_log: level: warn # supports levels, lower to higher: debug, info, warn, error, panic, fatal file_path: logs/error.log # supports relative path, absolute path, standard output # such as: logs/error.log, /tmp/logs/error.log, /dev/stdout, /dev/stderr access_log: file_path: logs/access.log # supports relative path, absolute path, standard output # such as: logs/access.log, /tmp/logs/access.log, /dev/stdout, /dev/stderr # log example: 2020-12-09T16:38:09.039+0800 INFO filter/logging.go:46 /apisix/admin/routes/r1 {"status": 401, "host": "127.0.0.1:9000", "query": "asdfsafd=adf&a=a", "requestId": "3d50ecb8-758c-46d1-af5b-cd9d1c820156", "latency": 0, "remoteIP": "127.0.0.1", "method": "PUT", "errs": []} authentication: secret: secret # secret for jwt token generation. # NOTE: Highly recommended to modify this value to protect manager api. # if it's default value, when manager api start, it will generate a random string to replace it. expire_time: 3600 # jwt token expire time, in second users: # yamllint enable rule:comments-indentation - username: admin # username and password for login manager api password: admin - username: user password: user

plugins: # plugin list (sorted in alphabetical order)

  • api-breaker
  • authz-keycloak
  • basic-auth
  • batch-requests
  • consumer-restriction
  • cors
  • echo
  • fault-injection
  • grpc-transcode
  • hmac-auth
  • http-logger
  • ip-restriction
  • jwt-auth
  • kafka-logger
  • key-auth
  • limit-conn
  • limit-count
  • limit-req
  • openid-connect
  • prometheus
  • proxy-cache
  • proxy-mirror
  • proxy-rewrite
  • redirect
  • referer-restriction
  • request-id
  • request-validation
  • response-rewrite
  • serverless-post-function
  • serverless-pre-function
  • sls-logger
  • syslog
  • tcp-logger
  • udp-logger
  • uri-blocker
  • wolf-rbac
  • zipkin
  • server-info
  • traffic-split '

jinxin231 avatar May 11 '24 10:05 jinxin231

i am getting a similar error. "Request etcd endpoint 'http://127.0.0.1:2379/version' error, connection refused"

shrijit04 avatar May 19 '24 21:05 shrijit04

This issue has been marked as stale due to 30 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 [email protected] list. Thank you for your contributions.

github-actions[bot] avatar Jun 19 '24 10:06 github-actions[bot]

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.

github-actions[bot] avatar Jul 03 '24 10:07 github-actions[bot]

any resolutions for this issue?

RahulVerma989 avatar Jul 22 '24 11:07 RahulVerma989

i got the same problem...

wuks avatar Jul 26 '24 10:07 wuks

i'm having the same problem. does any solved this?

narnetolidema avatar Oct 14 '24 12:10 narnetolidema