apache / apisix

The Cloud-Native API Gateway
https://apisix.apache.org/blog/
Apache License 2.0
13.96k stars 2.45k forks source link

bug: The command "apisix reload" sometimes causes the plugin's sock file to disappear #11347

Open GuoFlight opened 3 weeks ago

GuoFlight commented 3 weeks ago

Current Behavior

I keep executing the command "apisix reload".Sometimes, socket files for custom plug-ins disappear. Snipaste_2024-06-11_21-07-16

Expected Behavior

Apisix works properly, the socket file of the custom plugin will not disappear

Error Logs

2024/06/11 21:09:30 [warn] 1355996#1355996: 742942304 [lua] config_etcd.lua:171: main etcd watcher started, revision=1322, context: ngx.timer 2024/06/11 21:09:30 [warn] 1355994#1355994: 742942321 [lua] configetcd.lua:171: main etcd watcher started, revision=1322, context: ngx.timer 2024/06/11 21:09:55 [crit] 1355994#1355994: *742943773 connect() to unix:/usr/local/apisix/conf/apisix-920261.sock failed (2: No such file or directory), client: 10.192.7.232, server: , request: "GET / HTTP/2.0", host: "test.com" 2024/06/11 21:09:55 [error] 1355994#1355994: 742943773 [lua] init.lua:889: phasefunc(): failed to connect to the unix socket unix:/usr/local/apisix/conf/apisix-920261.sock: no such file or directory, client: 10.192.7.232, server: , request: "GET / HTTP/2.0", host: "test.com" 2024/06/11 21:09:55 [warn] 1355994#1355994: 742943773 [lua] init.lua:891: phasefunc(): Plugin Runner is wrong, allow degradation, client: 10.192.7.232, server: , request: "GET / HTTP/2.0", host: "test.com"

Steps to Reproduce

  1. Run apisix with plugin.
  2. Keeping executing the command "apisix reload && ls -l /usr/local/apisix/conf".
  3. You will find that the socket file has disappeared.

Environment

shreemaan-abhishek commented 3 weeks ago

does this lead to any unexpected behaviour?

GuoFlight commented 3 weeks ago

This led to the downgrade of the plugin. 2024/06/11 21:09:55 [warn] 1355994#1355994: *742943773 [lua] init.lua:891: phasefunc(): Plugin Runner is wrong, allow degradation, client: 10.192.7.232, server: , request: "GET / HTTP/2.0", host: "test.com"