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 2021/11/29 06:19:21 UTC

[GitHub] [apisix] dongyudan opened a new issue #5633: bug: enable skywalking plugin , the route rewrite is not affected

dongyudan opened a new issue #5633:
URL: https://github.com/apache/apisix/issues/5633


   ### Issue description
   
   **1、route instance properties**
   {
     "uri": "/sk2/hello",
     "name": "test skywalking",
     "methods": [
       "GET",
       "POST",
       "PUT",
       "DELETE",
       "PATCH",
       "HEAD",
       "OPTIONS",
       "CONNECT",
       "TRACE"
     ],
     "host": "192.168.42.104",
     "plugins": {
       "proxy-rewrite": {
         "uri": "/hello"
       },
       "skywalking": {
         "disable": false,
         "sample_ratio": 1
       }
     },
     "upstream_id": "382869453731268977",
     "status": 1
   }
   
   **2、apisix config** 
   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
   plugins:
       - skywalking
   plugin_attr:
     skywalking:
       service_name: Dane
       service_instance_name: "Dane Instance Name"
       endpoint_addr: http://127.0.0.1:12800
       report_interval: 10
   
   ### Environment
   
   - apisix version (cmd: `apisix version`):2.10.2
   - OS (cmd: `uname -a`):centos7
   - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   - etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
   - apisix-dashboard version, if have:2.9
   - the plugin runner version, if the issue is about a plugin runner (cmd: depended on the kind of runner):
   - luarocks version, if the issue is about installation (cmd: `luarocks --version`):
   
   
   ### Steps to reproduce
   
   
   ![image](https://user-images.githubusercontent.com/11826929/143817162-392b49fc-066b-4d54-8172-de6ef05caecb.png)
   add new route, config static rewrite url "/hello"
   1、Open “skywalking”  plugin in the dashboard
   2、Test route  url  http://192.168.42.104:9080/sky/hello
   3、Return the  error message " There was an unexpected error (type=Not Found, status=404)",
   4、Debug up-stream service,found request url  is not rewrite still  is "/sky/hello"
   5、Disable “skywalking‘’ plugin  in the dashboard
   6、Retest route  url  http://192.168.42.104:9080/sky/hello
   7、Return the right data
   
   ### Actual result
   
   Route url the same as up stream service node url ,rewrite never happened
   
   ### Error log
   
   Whitelabel Error Page
   This application has no explicit mapping for /error, so you are seeing this as a fallback.
   
   Mon Nov 29 11:27:26 CST 2021
   There was an unexpected error (type=Not Found, status=404).
   No message available
   
   ### Expected result
   
   url  is rewrite to "/hello",return the right message .


-- 
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] dongyudan commented on issue #5633: bug: enable skywalking plugin , the route rewrite is not affected

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


   > Have you checked whether the skywalking service is normal? According to the error message you provided, this is more like an exception thrown by a spring framework?
   
   spring boot service is normal,enable skywalking plugin,the proxy-rewrite plugin is not valid. disable skywalking plugin,the proxy-rewrite plugin work normally


-- 
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 #5633: bug: enable skywalking plugin , the route rewrite is not affected

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


   @dongyudan consider it solved, feel free to reopen this.


-- 
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 #5633: bug: enable skywalking plugin , the route rewrite is not affected

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


   I can't reproduce your problem on the master branch.
   
   Here are my reproduction steps.
   
   1. route config:
   
   ```shell
   curl --location --request PUT 'http://127.0.0.1:9080/apisix/admin/routes/1' \
   --header 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' \
   --header 'Content-Type: application/json' \
   --data-raw '{
       "plugins": {
           "proxy-rewrite": {
               "uri": "/get"
           },
           "skywalking": {
               "sample_ratio": 1
           }
       },
       "upstream": {
           "nodes": {
               "httpbin.org:80": 1
           },
           "type": "roundrobin"
       },
       "uri": "/hello"
   }'
   ```
   
   2. skywalking config
   
   ```yaml
   plugin_attr:
     skywalking:
       service_name: APISIX
       service_instance_name: APISIX Instance Name
       endpoint_addr: http://127.0.0.1:12800
   ```
   
   3. test proxy by APISIX. the uri `/hello` should rewrite by `proxy-rewrite` to `/get`
   
   ```
   $ curl http://127.0.0.1:9080/hello
   {
     "args": {},
     "headers": {
       "Accept": "*/*",
       "Host": "127.0.0.1",
       "Sw8": "1-MGMwNmQ4NjUtNGM5Zi00MTNjLTg4YWUtMjZlMjk1ODQ3YWQ1-MGMwNmQ4NjUtNGM5Zi00MTNjLTg4YWUtMjZlMjk1ODQ3YWQ1-1-QVBJU0lY-QVBJU0lYIEluc3RhbmNlIE5hbWU=-L2hlbGxv-dXBzdHJlYW0gc2VydmljZQ==",
       "User-Agent": "curl/7.64.1",
       "X-Amzn-Trace-Id": "Root=1-61a623d0-596b05d10f019de71b630319",
       "X-Forwarded-Host": "127.0.0.1"
     },
     "origin": "127.0.0.1, 180.118.191.92",
     "url": "http://127.0.0.1/get"
   }
   ```
   
   4. test use `/hello` to access `httpbin` should got 404
   
   ```
   $ curl http://httpbin.org:80/hello
   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
   <title>404 Not Found</title>
   <h1>Not Found</h1>
   <p>The requested URL was not found on the server.  If you entered the URL manually please check your spelling and try again.</p>
   ```
   
   you can see that `proxy-rewrite` and `skywalking` plugins work well.
   
   I think you may have been misled by some wrong configurations.


-- 
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 #5633: bug: enable skywalking plugin , the route rewrite is not affected

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


   the 404 code is returned by upstream, pls confirm that this address is available upstream.


-- 
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] shuaijinchao commented on issue #5633: bug: enable skywalking plugin , the route rewrite is not affected

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


   Have you checked whether the skywalking service is normal? According to the error message you provided, this is more like an exception thrown by a spring framework?


-- 
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] dongyudan commented on issue #5633: bug: enable skywalking plugin , the route rewrite is not affected

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


   >The upstream available
   
   


-- 
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 closed issue #5633: bug: enable skywalking plugin , the route rewrite is not affected

Posted by GitBox <gi...@apache.org>.
tzssangglass closed issue #5633:
URL: https://github.com/apache/apisix/issues/5633


   


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