You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2020/08/20 03:50:18 UTC

[GitHub] [servicecomb-java-chassis] zhoudamin opened a new issue #1928: post请求用servicecomb的rest端口无法触发熔断

zhoudamin opened a new issue #1928:
URL: https://github.com/apache/servicecomb-java-chassis/issues/1928


   服务有2个端口,一个是tomcat的端口8080,一个是servicecomb给的rest端口8081。
   get请求用8081,就可以走servicecomb的框架触发熔断。
   问题:
   post请求用8081端口,报404:
   {
       "message": "Not Found"
   }
   但是在框架上测试,是可以触发熔断的:
   http://127.0.0.1:30103/testSchema/QryNetStatusController/app/data/v1.0.0/getNetStatus?userId=iot189&accessNumber=2314124
   所以,对于post请求,我应该用哪个端口,来触发框架的熔断机制?


----------------------------------------------------------------
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] [servicecomb-java-chassis] zhoudamin closed issue #1928: post请求用servicecomb的rest端口无法触发熔断

Posted by GitBox <gi...@apache.org>.
zhoudamin closed issue #1928:
URL: https://github.com/apache/servicecomb-java-chassis/issues/1928


   


----------------------------------------------------------------
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] [servicecomb-java-chassis] zhoudamin commented on issue #1928: post请求用servicecomb的rest端口无法触发熔断

Posted by GitBox <gi...@apache.org>.
zhoudamin commented on issue #1928:
URL: https://github.com/apache/servicecomb-java-chassis/issues/1928#issuecomment-677332961


   为啥对于POST的接口,java-chassis定义成了GET的。我调用的时候,OperationLocator这个类里面查询的属性只支持GET,造成我只可以用GET+8081才可以访问通。
   POST请求会报NOT Allow。我需要怎么才可以让他支持POST呢?需要我再在servicecomb初始化的时候,拦截一遍,把POST属性塞进去吗?


----------------------------------------------------------------
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] [servicecomb-java-chassis] liubao68 commented on issue #1928: post请求用servicecomb的rest端口无法触发熔断

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #1928:
URL: https://github.com/apache/servicecomb-java-chassis/issues/1928#issuecomment-676993064


   java-chassis 的 REST 只允许监听一个端口,不存在多个端口并存的情况。 你的情况可能是在tomcat里面启动了java-chassis,但是又没有引入 java-chassis 支持 tomcat的运行时, 而是直接启动了 vert.x HTTP 服务器, 那么只有 8081端口进入的请求才是java-chassis的 REST服务。 


----------------------------------------------------------------
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] [servicecomb-java-chassis] zhoudamin commented on issue #1928: post请求用servicecomb的rest端口无法触发熔断

Posted by GitBox <gi...@apache.org>.
zhoudamin commented on issue #1928:
URL: https://github.com/apache/servicecomb-java-chassis/issues/1928#issuecomment-677356140


   > 你的情况可能是在tomcat里面启动了java-chassis,
   
   
   
   > 你的情况可能是在tomcat里面启动了java-chassis,但是又没有引入 java-chassis 支持 tomcat的运行时, 而是直接启动了 vert.x HTTP 服务器
   
   我加了一个RestController,可以调用POST的接口了,但是只能用GET方式调用。定位原因如上


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