sofastack / sofastack/sofastack.tech
It is recommended to add a timeout option to the client code in the quick start of the sofa-rpc official website document.
Open
Nobody has claimed this yet.
- Dominant language
- SCSS
- Stars
- 110
- Forks
- 191
- PR merge metrics
- No merged PRs in 30d
Description
建议 sofa-rpc 官网文档 快速开始 中Client代码增加超时选项
- 官网文档 快速开始
- 这个文档中client的代码没有.setConnectTimeout() 导致有可能跑demo的时候超时导致提示服务不可用
Exception in thread "main" com.alipay.sofa.rpc.core.exception.SofaRouteException: RPC-020020009: 当前服务[sofaRPC.HelloService:1.0]的地址[bolt://127.0.0.1:12200,]不可用,或指定的地址不在可用的地址列表中
at com.alipay.sofa.rpc.client.AbstractCluster.unavailableProviderException(AbstractCluster.java:496)
at com.alipay.sofa.rpc.client.AbstractCluster.select(AbstractCluster.java:453)
at com.alipay.sofa.rpc.client.FailoverCluster.doInvoke(FailoverCluster.java:65)
at com.alipay.sofa.rpc.client.AbstractCluster.invoke(AbstractCluster.java:297)
at com.alipay.sofa.rpc.client.ClientProxyInvoker.invoke(ClientProxyInvoker.java:83)
at sofaRPC.HelloService_proxy_0.sayHello(HelloService_proxy_0.java)
at sofaRPC.QuickStartClient.main(QuickStartClient.java:23)
- 而github中对应demo的client代码中含有.setConnectTimeout()
- 建议将官网代码添加setConnectTimeout
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked SOFA-RPC website Quick Start section, specifically the client implementation, and compare it with the corresponding GitHub demo client mentioned in the issue. Update the website example to include the timeout option, then verify that the documented client matches the demo and avoids the reported connection-timeout failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100