wodingyang opened a new issue, #7522:
URL: https://github.com/apache/apisix/issues/7522

   ### Current Behavior
   
   在测试log-rotate插件时发现,config-default.yaml中将该插件注释了,所以在config.yaml中配置
   plugins:
     - log-rotate 打开该插件
    重启apisixi后发现原先配置可用的路由全部失效。
   为了验证该问题,将本地apisix、openresty全部删除,只保留etcd以及已经配置好的参数,重新安装apisix2.13.2版本,问题依旧。
   
该问题已经发现一段时间,在这段时间使用与观察后,个人猜测在config.yaml中配置plugins打开指定插件是有问题的,只是大多数插件默认就是打开的所以忽视了该问题
   
   ### Expected Behavior
   
   _No response_
   
   ### Error Logs
   
   _No response_
   
   ### Steps to Reproduce
   
   1.在干净的环境中安装2.13.2版本的apisix
   2.执行初始化操作,配置config.yaml,配置如下:
   apisix:
     admin_key:
       - name: admin
         key: edd1c9f034335f136f87ad84b625c8f1  # using fixed API token has 
security risk, please update it when you deploy to production environment
         role: admin
     #extra_lua_path: "/home/apisix/plugin/?.lua"
   
   etcd:
     host:                           # it's possible to define multiple etcd 
hosts addresses of the same etcd cluster.
       - "http://192.168.68.114:2379";
       - "http://192.168.68.115:2379";
       - "http://192.168.68.116:2379";     # multiple etcd address, if your etcd 
cluster enables TLS, please use https scheme,
                                     # e.g. https://127.0.0.1:2379.
     prefix: /test                 # apisix configurations prefix
   
   #ext-plugin:
   #        cmd: ['java', '-jar', '-Xmx4g', '-Xms4g', 
'/usr/local/apisix/custom_plugins/plugin-runner-0.0.1.jar']
   
   #plugins:
   # - log-rotate
   
   plugin_attr:
     log-rotate:
       interval: 7200    # rotate interval (unit: second)
       max_kept: 24     # max number of log files will be kept
       enable_compression: false    # enable log file compression(gzip) or not, 
default false
   3.启动apisix,通过工具访问路由,返回200
   4.停止apisix,修改config.yaml
   apisix:
     admin_key:
       - name: admin
         key: edd1c9f034335f136f87ad84b625c8f1  # using fixed API token has 
security risk, please update it when you deploy to production environment
         role: admin
     #extra_lua_path: "/home/apisix/plugin/?.lua"
   
   etcd:
     host:                           # it's possible to define multiple etcd 
hosts addresses of the same etcd cluster.
       - "http://192.168.68.114:2379";
       - "http://192.168.68.115:2379";
       - "http://192.168.68.116:2379";     # multiple etcd address, if your etcd 
cluster enables TLS, please use https scheme,
                                     # e.g. https://127.0.0.1:2379.
     prefix: /test                 # apisix configurations prefix
   
   #ext-plugin:
   #        cmd: ['java', '-jar', '-Xmx4g', '-Xms4g', 
'/usr/local/apisix/custom_plugins/plugin-runner-0.0.1.jar']
   
   plugins:
     - log-rotate
   
   plugin_attr:
     log-rotate:
       interval: 7200    # rotate interval (unit: second)
       max_kept: 24     # max number of log files will be kept
       enable_compression: false    # enable log file compression(gzip) or not, 
default false
   5.重新启动apisix,通过工具访问路由,返回404
   
![2222](https://user-images.githubusercontent.com/75060224/180381126-5810938b-6971-4822-a429-2d698b68fcca.gif)
   
   
   ### Environment
   
   - APISIX version (run `apisix version`):2.13.2
   - Operating system (run `uname -a`):3.10.0-957.27.2.el7.x86_64 #1 SMP Mon 
Jul 29 17:46:05 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):1.21.4.0
   - etcd version, if relevant (run `curl 
http://127.0.0.1:9090/v1/server_info`):3.5
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to