yhs0092 commented on issue #1271: microservice.yaml文件配置的端口没有被监听
URL: 
https://github.com/apache/servicecomb-java-chassis/issues/1271#issuecomment-510466071
 
 
   
如果你是把ServiceComb-Java-Chassis和SpringBoot结合开发服务,底层的HTTP服务器是SpringBoot内嵌的Tomcat的话,看看是否是Tomcat监听的端口和microservice.yaml里配置的ServiceComb-Java-Chassis监听的端口不一致?
   
   ServiceComb-Java-Chassis支持的REST传输方式有 Rest over Vertx 和 Rest over 
Servlet,分别对应 `org.apache.servicecomb.transport.rest.vertx.VertxRestTransport` 和 
`org.apache.servicecomb.transport.rest.servlet.ServletRestTransport` ,这两个都是 
`org.apache.servicecomb.core.Transport`的实现类,通过Spring Bean机制加载。
   
我们默认选取的是`VertxRestTransport`,但是如果没有加载到这个Bean,或者我们发现你指定的端口(`servicecomb.rest.address`配置项)被占用了,那么我们会转而使用`ServletRestTransport`传输方式。
   如果你没有引入Rest over 
Vertx组件,但是`servicecomb.rest.address`配置的监听地址又和Tomcat之类的服务器实际的监听地址不一致,就有可能导致如你的异常日志所显示的问题。

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to