-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rpc provider应用重启后问题 #178
Comments
我尝试使用QuickStartClient和QuickStartServer重现你的问题,没有出现这个问题 1.启动QuickStartServer 使用的是bolt协议 你说的这个可以怎么重现 对了,我使用的sofa-rpc版本是5.4.0,windows环境下1.8的jdk |
1.首先我是本地两个应用 分别是QuickStartServer,QuickStartClient ,注册中心用的是zookeeper |
现在解决这个问题 我这边需要重启client才能重新调用服务 |
我发现有可能是因为客户端还是使用了直连的方式 可是我的客户端也做了如下的配置 |
rpc-sofa-boot-starter 我使用得不多呢,不太清楚具体原因, 同时我也有看到你到sofa-rpc-boot-project项目下发起你的提问 相信官方人员或其他热心开发者很快就能帮助你解决你的问题 |
@jinchaoxiang 我通过你的描述复现了你的问题,使用 zookeeper 做服务发现时可以先去掉 consumer 的 setDirectUrl 配置,去掉后可正常通过 zookeeper 服务发现找到重启后的 QuickStartServer 地址,这两个配置的冲突点我再确认下。 |
setDirectUrl这个配置我没有显示配置 就是说默认是开启的 我需要显示配置false关掉吗 |
@jinchaoxiang |
那我用的是springboot项目的maven包 用的是yaml配置 |
@JervyShi |
无解了 |
可以把你这个项目工程的代码上传到你的github仓库,方便问题的重现 |
@jinchaoxiang 代码上传我们跑下看看。你用的是zookeeper做注册中心是吧?
|
@ujjboy |
eepay项目的SpringUtil没有上传吧 存在com.ransyh的web包下的 |
在integral中加了web.jar包 这些类都在这个jar中 |
建议你将rpc部分代码抽离出来,不要与你自己的服务器有关联, 同时也建议不要将自己的服务器IP暴露出来,以免遭受有心人利用 这样问题才会比较好排查 |
服务重启时,客户端没有及时删除链接信息导致。服务关闭时,尝试等待一段时间再重启。 |
Your question
更新rpc provider应用时,是否需要优雅关闭
因为我在本地每当重启rpc provider应用后,rpc consumer就找不到对应的服务了,不知道是不是没有使用优雅关闭的问题
2018-06-14 09:21:12.575 WARN 2316 --- [rker-1-thread-1] c.a.remoting.DefaultConnectionManager : Remove and close the last connection in ConnectionPool with poolKey 172.16.249.78:12200
这是重启rpc provider应用的info
Your scenes
describe your use scenes (why need this feature)
Your advice
describe the advice or solution you'd like
Environment
java -version
):uname -a
):The text was updated successfully, but these errors were encountered: