How can i do with this problem (apisix-dashboard run)

936 Views Asked by At

i install and run etcd ,apisix ; but run the apisix-dashboard had error like this。

{"level":"warn","ts":"2023-04-07T11:24:14.718Z","logger":"etcd-client","caller":"[email protected]/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0xc0005f6700/127.0.0.1:2379","attempt":0,"error":"rpc error: code = DeadlineExceeded desc = latest balancer error: last connection error: connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:2379: connect: connection refused""} Error: etcd get failed: context deadline exceeded enter image description here

the apisix-dashboard config.yaml like this: enter image description here

can any one help me ?

the etcd version:3.4.3 the apisix version :3.2.0-centos the apisix-dashboard versin:3.0.0-centos

2

There are 2 best solutions below

1
Gepardo On

This error indicates that apisix dashboard cannot connect to etcd. This error has several reasons. The first thing to check is that etcd is started properly. Although telnet shows that port 2379 is listening, it is not the reason that etcd is started correctly. If you have started apisix as docker, the situation will be different.

1
Fasih Haider On

Use the below configuration for apisix dashboard.

conf:
  listen:
    host: 0.0.0.0
    port: 9000
  etcd:
    endpoints:
      - etcd:2379
  log:
    error_log:
      level: warn
      file_path: /dev/stderr
    access_log:
      file_path: /dev/stdout
authentication:
  secert: secert
  expire_time: 3600
  users:
    - username: admin
      password: apisixadmin