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

Can not get plugin list

Open cataglyphis opened this issue 1 year ago • 22 comments

Issue description

  1. Can not get plugin list when visit: https://xxx.com/plugin/list

Expected behavior

  1. list all enabled plugins

How to Reproduce

  1. click Plugin in apisix dashboard homepage

Screenshots

image

Environment

  • apisix version (cmd: apisix version): 3.2.2
  • OS (cmd: uname -a):
  • OpenResty / Nginx version (cmd: nginx -V or openresty -V):
  • etcd version, if have (cmd: run etcd --version): 3.5.0
  • apisix-dashboard version, if have: 3.0.1
  • Browser version, if have:

Additional context

No response

cataglyphis avatar Jan 19 '24 03:01 cataglyphis

can you check whether etcd is healthy or check dashboard logs ? docker logs docker-apisix-apisix-dashboard-1 docker exec -it docker-apisix-apisix-dashboard-1 cat /usr/local/apisix-dashboard/logs/access.log docker exec -it docker-apisix-apisix-dashboard-1 cat /usr/local/apisix-dashboard/logs/error.log

hanqingwu avatar Jan 23 '24 07:01 hanqingwu

apisix dashboard log

2024-01-23T15:28:57.015631618+08:00 2024-01-23T07:28:57.015Z	filter/logging.go:45	/plugin/list	{"status": 304, "host": "apisix-xxx.bambu-lab.com", "query": "", "requestId": "", "latency": 0, "remoteIP": "61.169.76.178", "method": "GET", "errs": []}

2024-01-23T15:28:57.696833305+08:00 2024-01-23T07:28:57.696Z	filter/logging.go:45	/apisix/admin/plugins	{"status": 200, "host": "apisix-xxx.bambu-lab.com", "query": "all=true", "requestId": "", "latency": 0.000000002, "remoteIP": "61.169.76.178", "method": "GET", "errs": []}

2024-01-23T15:28:57.702280307+08:00 2024-01-23T07:28:57.702Z	filter/logging.go:45	/apisix/admin/global_rules/1	{"status": 200, "host": "apisix-xxx.bambu-lab.com", "query": "", "requestId": "", "latency": 0, "remoteIP": "61.169.76.178", "method": "GET", "errs": []}

2024-01-23T15:28:57.718622691+08:00 2024-01-23T07:28:57.718Z	filter/logging.go:45	/apisix/admin/global_rules/1	{"status": 200, "host": "apisix-xxx.bambu-lab.com", "query": "", "requestId": "", "latency": 0, "remoteIP": "61.169.76.178", "method": "GET", "errs": []}

2024-01-23T15:28:58.400529750+08:00 2024-01-23T07:28:58.400Z	filter/logging.go:45	/plugin/list	{"status": 304, "host": "apisix-xxx.bambu-lab.com", "query": "", "requestId": "", "latency": 0, "remoteIP": "61.169.76.178", "method": "GET", "errs": []}

2024-01-23T15:28:58.629927059+08:00 2024-01-23T07:28:58.629Z	filter/logging.go:45	/apisix/admin/global_rules/1	{"status": 200, "host": "apisix-xxx.bambu-lab.com", "query": "", "requestId": "", "latency": 0, "remoteIP": "61.169.76.178", "method": "GET", "errs": []}

2024-01-23T15:28:58.630160926+08:00 2024-01-23T07:28:58.630Z	filter/logging.go:45	/apisix/admin/plugins	{"status": 200, "host": "apisix-xxx.bambu-lab.com", "query": "all=true", "requestId": "", "latency": 0.000000001, "remoteIP": "61.169.76.178", "method": "GET", "errs": []}

2024-01-23T15:28:58.679658176+08:00 2024-01-23T07:28:58.679Z	filter/logging.go:45	/apisix/admin/global_rules/1	{"status": 200, "host": "apisix-xxx.bambu-lab.com", "query": "", "requestId": "", "latency": 0, "remoteIP": "61.169.76.178", "method": "GET", "errs": []}

2024-01-23T15:29:02.228708893+08:00 2024-01-23T07:29:02.228Z	filter/logging.go:45	/ping	{"status": 200, "host": "10.110.133.132:9000", "query": "", "requestId": "", "latency": 0, "remoteIP": "10.110.18.155", "method": "GET", "errs": []}

2024-01-23T15:29:02.228727595+08:00 2024-01-23T07:29:02.228Z	filter/logging.go:45	/ping	{"status": 200, "host": "10.110.133.132:9000", "query": "", "requestId": "", "latency": 0, "remoteIP": "10.110.18.155", "method": "GET", "errs": []}

no access / error log

/usr/local/apisix-dashboard # cd logs
/usr/local/apisix-dashboard/logs # ls
/usr/local/apisix-dashboard/logs # pwd
/usr/local/apisix-dashboard/logs
/usr/local/apisix-dashboard/logs # ls -al
total 8
drwxr-xr-x    2 root     root          4096 Apr 12  2023 .
drwxr-xr-x    1 root     root          4096 Apr 12  2023 ..
/usr/local/apisix-dashboard/logs #

cataglyphis avatar Jan 23 '24 07:01 cataglyphis

2024-01-23T15:28:58.400529750+08:00 2024-01-23T07:28:58.400Z filter/logging.go:45 /plugin/list {"status": 304, "host": "apisix-xxx.bambu-lab.com", "query": "", "requestId": "", "latency": 0, "remoteIP": "61.169.76.178", "method": "GET", "errs": []}

It show 304 code when you get /plugin/list, so can you clear you cookie or other cache then try again ? Or press Ctrl+F5 to force a refresh ?

hanqingwu avatar Jan 23 '24 07:01 hanqingwu

2024-01-23T15:28:58.400529750+08:00 2024-01-23T07:28:58.400Z filter/logging.go:45 /plugin/list {"status": 304, "host": "apisix-xxx.bambu-lab.com", "query": "", "requestId": "", "latency": 0, "remoteIP": "61.169.76.178", "method": "GET", "errs": []}

It show 304 code when you get /plugin/list, so can you clear you cookie or other cache then try again ? Or press Ctrl+F5 to force a refresh ?

still not working, and get plugins?all=true api return value is:

{
    "code": 0,
    "message": "",
    "data": null,
    "request_id": "532de6e9-80a1-4614-ac96-3ad4cd634d59"
}

cataglyphis avatar Jan 23 '24 08:01 cataglyphis

what 's your use apisix-dashboard version ? image version ? I will try to reproduce .

apache/apisix-dashboard:3.0.1-alpine

cataglyphis avatar Jan 23 '24 08:01 cataglyphis

And can you cat apisix-dashbaord conf in /usr/local/apisix-dashboard/conf/conf.yaml ?

/usr/local/apisix-dashboard/conf # cat conf.yaml
conf:
  listen:
    host: 0.0.0.0
    port: 9000
  etcd:
    prefix: "/apisix"
    endpoints:
      - apisix-etcd:2379
  log:
    error_log:
      level: warn
      file_path: /dev/stderr
    access_log:
      file_path: /dev/stdout
authentication:
  secret: secret
  expire_time: 3600
  users:
    - username: admin
      password: xxxxx

cataglyphis avatar Jan 23 '24 08:01 cataglyphis

https://github.com/apache/apisix-docker/blob/release/apisix-dashboard-3.0.1/example/dashboard_conf/conf.yaml Can you try to add plugins like this config.yaml ?

downgrade apisix dashboard to 3.0.0, all the plugins listed like below image

cataglyphis avatar Jan 23 '24 09:01 cataglyphis

So when you upgrade 3.0.1 , these plugins disappear ? I have tried apache/apisix-dashboard:3.0.1-alpine , but i can not reproduce empty plugin list .

hanqingwu avatar Jan 23 '24 09:01 hanqingwu

So when you upgrade 3.0.1 , these plugins disappear ? I have tried apache/apisix-dashboard:3.0.1-alpine , but i can not reproduce empty plugin list .

yes, and when I downgrade dashboard to 3.0.0, all plugins listed...

cataglyphis avatar Jan 23 '24 09:01 cataglyphis

Hi @hanqingwu, I am facing same issue of empty plugin list. I am running APISIX on local kubernetes cluster via Minikube on my Mac M1. Here are the image tags I am using:

Dashboard: apache/apisix-dashboard:latest APISIX: apache/apisix:3.7.0-debian initContainer for wait-etcd: busybox:1.28 etcd: bitnami/etcd:3.5.1-debian-10-r31

I have a created a repo and pushed all code to reproduce env: https://github.com/harsh-rajput-vats/apisix_bug

Screenshot 2024-01-25 at 5 43 48 PM Screenshot 2024-01-25 at 5 45 25 PM

harsh-rajput-vats avatar Jan 25 '24 12:01 harsh-rajput-vats

same issues, image: apache/apisix-dashboard:3.0.1-alpine,

apache/apisix-dashboard:3.0.0-alpine is ok

jialechan avatar Jan 25 '24 12:01 jialechan

@jialechan Thanks, Its working with apache/apisix-dashboard:3.0.0-alpine atleast.

harsh-rajput-vats avatar Jan 25 '24 12:01 harsh-rajput-vats

same to me. downgrade to 3.0.0 to fixit

anjia0532 avatar Feb 01 '24 10:02 anjia0532

Same for me, downgrade to 3.0.0 solved the problem

andytael avatar Feb 03 '24 17:02 andytael

Any updates on this issue?

cataglyphis avatar Apr 04 '24 12:04 cataglyphis