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 2022/05/31 03:38:04 UTC

[GitHub] [servicecomb-java-chassis] diwenzheng opened a new issue, #3021: 关于invocationContext对象 2.5.0 在多网卡下的空指针异常

diwenzheng opened a new issue, #3021:
URL: https://github.com/apache/servicecomb-java-chassis/issues/3021

    目前发现一个这样的问题,
   
   ![image](https://user-images.githubusercontent.com/60613511/171087894-5a2c48f8-2572-4b04-a8ab-c540e4ffde5e.png)
   
   
   一台MAC电脑上有两个网卡,一个网卡是192.168.3.188,另一个是3.133.通过ifconfig中只能看到3.188但是对于注册中心中去绑定ip的时候使用了3.133。我尝试使用java获取ip地址的方式,确实获取到了3.133这张网卡。


-- 
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: commits-unsubscribe@servicecomb.apache.org.apache.org

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


[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #3021: 关于invocationContext对象 2.5.0 在多网卡下的空指针异常

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

   没太看明白前面描述的内容与“但是使用ContextUtils.getInvoncationContext的数据均是空”之间是什么关系。你提供下你的用法吗?
   
   如果解决多网卡情况下,需要绑定IP的问题,可以参考: https://servicecomb.apache.org/references/java-chassis/zh_CN/build-provider/listen-address-and-publish-address.html


-- 
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: commits-unsubscribe@servicecomb.apache.org

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


[GitHub] [servicecomb-java-chassis] diwenzheng commented on issue #3021: 关于invocationContext对象 2.5.0 在多网卡下的空指针异常

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

   ![image](https://user-images.githubusercontent.com/60613511/171313078-6725b50b-7e78-4c9b-b003-e52ffff29495.png)
   ![image](https://user-images.githubusercontent.com/60613511/171313114-ff384f14-2562-4e1c-8523-7199af37da9c.png)
   在多网卡下默认写0.0.0.0程序应该是随机选取了一个网卡,如我上面所说.正常情况下,Controller方法进入的这个函数一定是有值的,但是在我上面的情况下,一定是空,且会导致我后续程序逻辑均为空指针异常。猜测多网卡下的逻辑,导致invocationContext对象获取的值可能是空。


-- 
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: commits-unsubscribe@servicecomb.apache.org

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


[GitHub] [servicecomb-java-chassis] diwenzheng commented on issue #3021: 关于invocationContext对象 2.5.0 在多网卡下的空指针异常

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

   还有一个疑问是我看官方有到2.7.2,之前想着后面有一个新项目,尝试使用2.7.2去构建,发现似乎你们已经移除了org.apache.servicecomb.swagger.invocation这整个包的逻辑。那么现在对于返回错误码应该怎么做?2.7.2的升级指导手册有吗。至少我看到Response,invocationContext 绝对数逻辑删除,这么大的基层逻辑改动是为了修复什么问题


-- 
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: commits-unsubscribe@servicecomb.apache.org

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


[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #3021: 关于invocationContext对象 2.5.0 在多网卡下的空指针异常

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

   没有移除 `org.apache.servicecomb.swagger.invocation这整个包的逻辑` 呀, 是不是什么地方弄错了? 2.5.0 -> 2.7.3 并没有大的变更, release notes里面有影响使用的变更: https://servicecomb.apache.org/references/java-chassis/zh_CN/featured-topics/upgrading.html


-- 
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: commits-unsubscribe@servicecomb.apache.org

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