You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/06/15 09:10:45 UTC

[GitHub] [incubator-apisix] vimilai opened a new issue #1716: request help: plugin was unvalid

vimilai opened a new issue #1716:
URL: https://github.com/apache/incubator-apisix/issues/1716


   ### Issue description
   我在用apisix的时候自定义编写了插件,但是插件不生效,烦请看下附件是我的配置cdd-radix.lua(在faq.zip) 是我的插件代码,请帮忙看下有什么问题,图在faq.zip里
   环境 linux centos
   安装方式 : npm -ivh  apisix-1.3-0.el7.noarch.rpm     version1.3
   
   **安装插件**
   [faq.zip](https://github.com/apache/incubator-apisix/files/4779185/faq.zip)
   
   1.在/usr/local/apisix/apisix/plugins 下面添加了 cdd-radix.lua 图一所示
   
   2.在/usr/local/apisix/conf 下修改 config.yaml  图二所示添加- cdd-radix
   **应用插件** 
   curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "uri": "/order-service",
       "plugins": {
           "cdd-radix": {
               "uri_prefix": "/order-service",
               "auth_uri": ["/order-service/refund/:refund/*"]
   			}
       },
       "upstream": {
           "type": "roundrobin",
           "nodes": {
               "192.168.124.1:11003": 1
           }
       }
   }'
   **返回 :{"error_msg":"unknown plugin [cdd-radix]"}   另外apisix stop/reload/restart 都试了执行无效** 
   
   ### Environment
   
   
   
   * apisix version (cmd: `apisix version`):1.3
   * OS:centos7
   
   


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

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



[GitHub] [incubator-apisix] membphis commented on issue #1716: request help: plugin was unvalid

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1716:
URL: https://github.com/apache/incubator-apisix/issues/1716#issuecomment-646112112


   > the 'init()' method was invalid?
   
   please provide your case, you can create a PR for this case. I think we can close this issue first.


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

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



[GitHub] [incubator-apisix] moonming commented on issue #1716: request help: plugin was unvalid

Posted by GitBox <gi...@apache.org>.
moonming commented on issue #1716:
URL: https://github.com/apache/incubator-apisix/issues/1716#issuecomment-644550581


   @vimilai can you create a PR for this issue? We can see all the changes in this way. I don't see any problems from the issue description.


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

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



[GitHub] [incubator-apisix] vimilai commented on issue #1716: request help: plugin was unvalid

Posted by GitBox <gi...@apache.org>.
vimilai commented on issue #1716:
URL: https://github.com/apache/incubator-apisix/issues/1716#issuecomment-644598931


   sorry,I found  that the plugin start  has some error in error.log, So I  was rewrite the lua script,it's success,In additon ,the 'init()'  method was invalid? it's must be wrote 'init_worker()'?      


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

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



[GitHub] [incubator-apisix] membphis closed issue #1716: request help: plugin was unvalid

Posted by GitBox <gi...@apache.org>.
membphis closed issue #1716:
URL: https://github.com/apache/incubator-apisix/issues/1716


   


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

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