apache / apisix-dashboard

Dashboard for Apache APISIX
https://apisix.apache.org/
Apache License 2.0
978 stars 519 forks source link

Can not get plugin list #2910

Open cataglyphis opened 7 months ago

cataglyphis commented 7 months ago

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

Additional context

No response

hanqingwu commented 7 months ago

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

cataglyphis commented 7 months ago

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 #
hanqingwu commented 7 months ago

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 ?

cataglyphis commented 7 months ago

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 commented 7 months ago

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

apache/apisix-dashboard:3.0.1-alpine

cataglyphis commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

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...

harsh-rajput-vats commented 7 months ago

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
jialechan commented 7 months ago

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

apache/apisix-dashboard:3.0.0-alpine is ok

harsh-rajput-vats commented 7 months ago

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

anjia0532 commented 7 months ago

same to me. downgrade to 3.0.0 to fixit

andytael commented 7 months ago

Same for me, downgrade to 3.0.0 solved the problem

cataglyphis commented 5 months ago

Any updates on this issue?

bfyxzls commented 2 months ago

my custom plugins not display on this plugin page,bug I can get custom plugin on apisix-admin interface.

cataglyphis commented 2 months ago

Any update on this issue?

luistilingue commented 1 month ago

same here. 3.0.1 isn't listing plugins. 3.0.0 is working fine.

ochive commented 2 weeks ago

same to me. downgrade to 3.0.0 to fixit

cataglyphis commented 2 weeks ago

Maybe nobody maintenance apisix-dashboard anymore~~~

anjia0532 commented 1 week ago

add plugins to config.yaml (same as apisix config.yaml)

https://github.com/apache/apisix-dashboard/blob/ad697c643908faf99fb33a0970f6d95573fcca87/api/conf/conf.yaml#L94-L174

luistilingue commented 1 week ago

add plugins to config.yaml (same as apisix config.yaml)

https://github.com/apache/apisix-dashboard/blob/ad697c643908faf99fb33a0970f6d95573fcca87/api/conf/conf.yaml#L94-L174

Perfect, @anjia0532 . It worked with 3.0.1. I think this issue could be closed, then.

andytael commented 1 week ago

No It can't be closed, the issues still remains