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 2022/06/21 01:42:41 UTC

[GitHub] [apisix] mygaochunming opened a new issue, #7288: bug: when using skywaking plugin, the proxy-rewrite plugin will become invalid

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

   ### Current Behavior
   
   when using skywaking plugin, the proxy-rewrite plugin will become invalid
   
   ### Expected Behavior
   
   The two plugins can be used together
   
   ### Error Logs
   
   _No response_
   
   ### Steps to Reproduce
   
   When using default configurations, the proxy-rewrite plugin can be  responded correctly
   
   Default configurations:
   ```
   apisix:
     node_listen: 9080              # APISIX listening port
     enable_ipv6: false
   
     allow_admin:                  # http://nginx.org/en/docs/http/ngx_http_access_module.html#allow
       - 0.0.0.0/0              # We need to restrict ip access rules for security. 0.0.0.0/0 is for test.
   
     admin_key:
       - name: "admin"
         key: edd1c9f034335f136f87ad84b625c8f1
         role: admin                 # admin: manage all configuration data
                                     # viewer: only can view configuration data
       - name: "viewer"
         key: 4054f7cf07e344346cd3f287985e76a2
         role: viewer
   
     enable_control: true
     control:
       ip: "0.0.0.0"
       port: 9092
   
   etcd:
     host:                           # it's possible to define multiple etcd hosts addresses of the same etcd cluster.
       - "http://etcd:2379"     # multiple etcd address
     prefix: "/apisix"               # apisix configurations prefix
     timeout: 30                     # 30 seconds
   ```
   
   The route
   
   ```
   {
     "uri": "/testProxyRewrite",
     "name": "testProxyRewrite",
     "methods": [
       "GET",
       "POST",
       "PUT",
       "DELETE",
       "PATCH",
       "HEAD",
       "OPTIONS",
       "CONNECT",
       "TRACE"
     ],
     "plugins": {
       "proxy-rewrite": {
         "uri": "/demo2"
       }
     },
     "upstream": {
       "nodes": [
         {
           "host": "192.168.8.88",
           "port": 8083,
           "weight": 1
         }
       ],
       "timeout": {
         "connect": 6,
         "send": 6,
         "read": 6
       },
       "type": "roundrobin",
       "scheme": "http",
       "pass_host": "pass",
       "keepalive_pool": {
         "idle_timeout": 60,
         "requests": 1000,
         "size": 320
       }
     },
     "status": 1
   }
   ```
   
   When enabled the skywalking plugin , the proxy-rewrite plugin  will become invalid.
   
   Enabled skywalking plugin
   
   ```
   apisix:
     node_listen: 9080              # APISIX listening port
     enable_ipv6: false
   
     allow_admin:                  # http://nginx.org/en/docs/http/ngx_http_access_module.html#allow
       - 0.0.0.0/0              # We need to restrict ip access rules for security. 0.0.0.0/0 is for test.
   
     admin_key:
       - name: "admin"
         key: edd1c9f034335f136f87ad84b625c8f1
         role: admin                 # admin: manage all configuration data
                                     # viewer: only can view configuration data
       - name: "viewer"
         key: 4054f7cf07e344346cd3f287985e76a2
         role: viewer
   
     enable_control: true
     control:
       ip: "0.0.0.0"
       port: 9092
   
   etcd:
     host:                           # it's possible to define multiple etcd hosts addresses of the same etcd cluster.
       - "http://etcd:2379"     # multiple etcd address
     prefix: "/apisix"               # apisix configurations prefix
     timeout: 30                     # 30 seconds
   
   plugin_attr:
     skywalking:
       service_name: APISIX
       service_instance_name: "APISIX Instance Name"
       endpoint_addr: http://192.168.8.88:12800
   plugins:
     - skywalking
   ```
   
   And the route unchanged
   
   Then the proxy-rewrite plugin  become invalid.
   
   `{"timestamp":"2022-06-21T01:32:43.997+00:00","status":404,"error":"Not Found","path":"/testProxyRewrite"}`
   
   
   
   ### Environment
   
   - APISIX version (run `apisix version`): 2.14.0(using docker)
   - Operating system (run `uname -a`): Linux test-lxw 3.10.0-1127.el7.x86_64
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`): nginx version: openresty/1.19.9.1
   - etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`):
   - APISIX Dashboard version, if relevant:
   - Plugin runner version, for issues related to plugin runners:
   - LuaRocks version, for installation issues (run `luarocks --version`):
   
   
   ![image](https://user-images.githubusercontent.com/21029140/174698787-3cc4a40c-3170-4f5b-85a1-cb51cc3c3c69.png)
   


-- 
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-unsubscribe@apisix.apache.org.apache.org

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


[GitHub] [apisix] mygaochunming closed issue #7288: bug: when using skywaking plugin, the proxy-rewrite plugin will become invalid

Posted by GitBox <gi...@apache.org>.
mygaochunming closed issue #7288: bug: when using skywaking plugin, the proxy-rewrite plugin will become invalid
URL: https://github.com/apache/apisix/issues/7288


-- 
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-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] spacewander commented on issue #7288: bug: when using skywaking plugin, the proxy-rewrite plugin will become invalid

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #7288:
URL: https://github.com/apache/apisix/issues/7288#issuecomment-1161306484

   ```
   plugins:
     - skywalking
   ```
   You need to add all the plugins you need, instead of skywalking only. The `plugins` field should include all the plugins you need.
   
   See: https://apisix.apache.org/docs/apisix/plugins/skywalking#how-to-enable


-- 
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-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] mygaochunming commented on issue #7288: bug: when using skywaking plugin, the proxy-rewrite plugin will become invalid

Posted by GitBox <gi...@apache.org>.
mygaochunming commented on issue #7288:
URL: https://github.com/apache/apisix/issues/7288#issuecomment-1161506317

   ![image](https://user-images.githubusercontent.com/21029140/174767301-597a5cf4-bef9-4316-ac21-4fd088bb66e9.png)
   
   I think this will be treated as array, and will be overwrite as a whole
   
   ![image](https://user-images.githubusercontent.com/21029140/174767617-e49469b0-e828-47e1-9ecd-391d4e6443a6.png)
   
   
   and this will be overwrite not as a whole but specific item,such as just overwrite a single item
   
   ```
   plugin_attr:
     log-rotate:
       interval: 3600
   ```
   
   Am I right?


-- 
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-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] mygaochunming commented on issue #7288: bug: when using skywaking plugin, the proxy-rewrite plugin will become invalid

Posted by GitBox <gi...@apache.org>.
mygaochunming commented on issue #7288:
URL: https://github.com/apache/apisix/issues/7288#issuecomment-1161490309

   > ```
   > plugins:
   >   - skywalking
   > ```
   > 
   > You need to add all the plugins you need, instead of skywalking only. The `plugins` field should include all the plugins you need.
   > 
   > See: https://apisix.apache.org/docs/apisix/plugins/skywalking#how-to-enable
   
   Thanks very much. I have solved this problem.
   
   I have seen the "merge_conf" function, and I think the users' configurations will overwrite the default configurations under certain rules. But I don't quite understand what this code means
   
   https://github.com/apache/apisix/blob/fdd1cac7328879cb848f93bba4d3bb37c50dcdc7/apisix/cli/file.lua#L144
   
   Can you help to explain?
   


-- 
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-unsubscribe@apisix.apache.org

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


[GitHub] [apisix] tzssangglass commented on issue #7288: bug: when using skywaking plugin, the proxy-rewrite plugin will become invalid

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #7288:
URL: https://github.com/apache/apisix/issues/7288#issuecomment-1162563449

   As already discussed, this will not disable specific plugins.


-- 
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-unsubscribe@apisix.apache.org

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