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/05/12 01:22:45 UTC

[GitHub] [apisix] vincentwc opened a new issue #4221: request help: 路由设置失败,希望通过访问apisix最终路由到10.101.42.163:8082/user/hello这个地址

vincentwc opened a new issue #4221:
URL: https://github.com/apache/apisix/issues/4221


   ### 路由设置访问失败
   
   ### 10.101.42.163 服务器上面部署web应用 ,地址10.101.42.163:8082/user/hello
           10.255.249.3上面部署的是apisix
   创建Route如下: 
   
   ```
   {
       "uri": "/user/hello",
       "upstream": {
           "type": "roundrobin",
           "nodes": {
               "10.101.42.163:8082": 1
           }
       }
   }
   ```
   
   配置UpStream如下:
   
   ```
   {
     "type": "roundrobin",
     "nodes": {
       "10.101.42.163:8082": 1
     }
   }
   ```
   
   路由上游绑定如下:
   
   ```
   {
       "uri": "/user/hello",
       "upstream_id": upstreamid
   }
   ```
   
   访问
   
   10.255.249.3:9080/user/hello 
   无响应,没有正确的路由到 10.101.42.163:8082/user/hello这个地址上来,请帮忙打来指点一下
   
   
   
   * apisix version (cmd: `apisix version`): 2.5
   * OS (cmd: `uname -a`): Linux csf-2 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
   * OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`): nginx/1.16.1
   * etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):  3.4.0
   * apisix-dashboard version, if have:  2.5
   * luarocks version, if the issue is about installation (cmd: `luarocks --version`): 3.4.0
   


-- 
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] [apisix] Firstsawyou edited a comment on issue #4221: request help: 路由设置失败,希望通过访问apisix最终路由到10.101.42.163:8082/user/hello这个地址

Posted by GitBox <gi...@apache.org>.
Firstsawyou edited a comment on issue #4221:
URL: https://github.com/apache/apisix/issues/4221#issuecomment-839368919


   You can directly create a route for proxy access like this:
   
   ```shell
   curl http://127.0.0.1:9280/apisix/admin/routes/1  -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "uri": "/user/hello",    
       "upstream": {
           "type": "roundrobin",
           "nodes": {
               "10.101.42.163:8082": 1
           }
       }
   }'
   ```
   ```shell
   curl http://10.255.249.3:9080/user/hello
   ```
   
   This way you don't have to create upstream objects separately.


-- 
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] [apisix] Firstsawyou commented on issue #4221: request help: 路由设置失败,希望通过访问apisix最终路由到10.101.42.163:8082/user/hello这个地址

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


   You can directly create a route for proxy access like this:
   
   ```shell
   curl http://127.0.0.1:9280/apisix/admin/routes/1  -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "uri": "/user/hello",    
       "upstream": {
           "type": "roundrobin",
           "nodes": {
               "10.101.42.163:8082": 1
           }
       }
   }'
   ```
   


-- 
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] [apisix] vincentwc commented on issue #4221: request help: 路由设置失败,希望通过访问apisix最终路由到10.101.42.163:8082/user/hello这个地址

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


   check and find my server firewall is on state,so can't redirect to myu local computer


-- 
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] [apisix] vincentwc closed issue #4221: request help: 路由设置失败,希望通过访问apisix最终路由到10.101.42.163:8082/user/hello这个地址

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


   


-- 
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] [apisix] Firstsawyou edited a comment on issue #4221: request help: 路由设置失败,希望通过访问apisix最终路由到10.101.42.163:8082/user/hello这个地址

Posted by GitBox <gi...@apache.org>.
Firstsawyou edited a comment on issue #4221:
URL: https://github.com/apache/apisix/issues/4221#issuecomment-839368919


   You can directly create a route for proxy access like this:
   
   ```shell
   curl http://127.0.0.1:9280/apisix/admin/routes/1  -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "uri": "/user/hello",    
       "upstream": {
           "type": "roundrobin",
           "nodes": {
               "10.101.42.163:8082": 1
           }
       }
   }'
   ```
   ```shell
   curl http://10.255.249.3:9080/user/hello
   ```


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