Skip to content
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

readme中brpc用法有点问题 #18

Open
sjj3086786 opened this issue Sep 17, 2019 · 2 comments
Open

readme中brpc用法有点问题 #18

sjj3086786 opened this issue Sep 17, 2019 · 2 comments

Comments

@sjj3086786
Copy link

./bin/run_client.sh "127.0.0.1:8051,127.0.0.1:8052,127.0.0.1:8053" hello world
这个url格式brpc不认,要改成"list://127.0.0.1:8051,127.0.0.1:8052,127.0.0.1:8053"

@wenweihu86
Copy link
Owner

wenweihu86 commented Sep 17, 2019

@sjj3086786 多谢指正~等master代码发布后,我修改下readme。

@haochencheng
Copy link

我改成 list后 ,报其他错误

 client git:(master) ./bin/run_client.sh "list://127.0.0.1:8051,127.0.0.1:8052,127.0.0.1:8053" hello world
2020-01-10 11:33:09,240 INFO [main]     register protocol:1 success
2020-01-10 11:33:09,305 INFO [main]     register protocol:29 success
2020-01-10 11:33:09,309 INFO [main]     register protocol:4 success
2020-01-10 11:33:09,314 INFO [main]     register protocol:3 success
2020-01-10 11:33:09,316 INFO [main]     register protocol:31 success
2020-01-10 11:33:09,316 INFO [main]     register protocol:28 success
2020-01-10 11:33:09,318 INFO [main]     register protocol:32 success
2020-01-10 11:33:09,319 INFO [main]     register protocol:33 success
2020-01-10 11:33:09,320 INFO [main]     register protocol:30 success
2020-01-10 11:33:09,321 INFO [main]     register load balance factory:RandomLoadBalanceFactory success
2020-01-10 11:33:09,322 INFO [main]     register load balance factory:RoundRobinLoadBalanceFactory success
2020-01-10 11:33:09,322 INFO [main]     register load balance factory:WeightLoadBalanceFactory success
2020-01-10 11:33:09,322 INFO [main]     register load balance factory:FairLoadBalanceFactory success
2020-01-10 11:33:09,340 INFO [main]     create thread:timeout-timer-thread-1
2020-01-10 11:33:09,343 INFO [main]     create thread:health-check-timer-thread-1
2020-01-10 11:33:09,348 INFO [main]     create thread:fairStrategy-timer-thread-1
2020-01-10 11:33:09,351 INFO [main]     create thread:client-work-thread-1
2020-01-10 11:33:09,351 INFO [main]     create thread:client-work-thread-2
2020-01-10 11:33:09,351 INFO [main]     create thread:client-work-thread-3
2020-01-10 11:33:09,352 INFO [main]     create thread:client-work-thread-4
2020-01-10 11:33:09,570 INFO [main]     create thread:client-io-thread-1
2020-01-10 11:33:09,586 INFO [main]     create thread:client-io-thread-2
2020-01-10 11:33:09,587 INFO [main]     create thread:client-io-thread-3
2020-01-10 11:33:09,588 INFO [main]     create thread:client-io-thread-4
2020-01-10 11:33:09,738 ERROR [main]    exception :
com.baidu.brpc.exceptions.RpcException: com.baidu.brpc.exceptions.RpcException: com.baidu.brpc.exceptions.RpcException: serviceInterface must not be set repeatedly, please use another RpcClient
        at com.baidu.brpc.client.BrpcProxy.intercept(BrpcProxy.java:267) [brpc-java-2.5.2.jar:?]
        at com.github.wenweihu86.raft.example.server.service.ExampleService$$EnhancerByCGLIB$$c1bbc38a.set(<generated>) [raft-java-example-1.9.0.jar:?]
        at com.github.wenweihu86.raft.example.client.ClientMain.main(ClientMain.java:36) [raft-java-example-1.9.0.jar:?]
Caused by: com.baidu.brpc.exceptions.RpcException: com.baidu.brpc.exceptions.RpcException: serviceInterface must not be set repeatedly, please use another RpcClient
        at com.baidu.brpc.client.RpcFuture.get(RpcFuture.java:165) ~[brpc-java-2.5.2.jar:?]
        at com.baidu.brpc.interceptor.LoadBalanceInterceptor.rpcCore(LoadBalanceInterceptor.java:91) ~[brpc-java-2.5.2.jar:?]
        at com.baidu.brpc.interceptor.LoadBalanceInterceptor.invokeRpc(LoadBalanceInterceptor.java:74) ~[brpc-java-2.5.2.jar:?]
        at com.baidu.brpc.interceptor.LoadBalanceInterceptor.aroundProcess(LoadBalanceInterceptor.java:53) ~[brpc-java-2.5.2.jar:?]
        at com.baidu.brpc.interceptor.DefaultInterceptorChain.intercept(DefaultInterceptorChain.java:43) ~[brpc-java-2.5.2.jar:?]
        at com.baidu.brpc.interceptor.AbstractInterceptor.aroundProcess(AbstractInterceptor.java:35) ~[brpc-java-2.5.2.jar:?]
        at com.baidu.brpc.interceptor.ClientTraceInterceptor.aroundProcess(ClientTraceInterceptor.java:40) ~[brpc-java-2.5.2.jar:?]
        at com.baidu.brpc.interceptor.DefaultInterceptorChain.intercept(DefaultInterceptorChain.java:43) ~[brpc-java-2.5.2.jar:?]
        at com.baidu.brpc.client.BrpcProxy.intercept(BrpcProxy.java:265) ~[brpc-java-2.5.2.jar:?]
        ... 2 more
Caused by: com.baidu.brpc.exceptions.RpcException: serviceInterface must not be set repeatedly, please use another RpcClient
        at com.baidu.brpc.protocol.standard.BaiduRpcProtocol.decodeResponse(BaiduRpcProtocol.java:162) ~[brpc-java-2.5.2.jar:?]
        at com.baidu.brpc.protocol.standard.BaiduRpcProtocol.decodeResponse(BaiduRpcProtocol.java:70) ~[brpc-java-2.5.2.jar:?]
        at com.baidu.brpc.client.handler.ClientWorkTask.run(ClientWorkTask.java:65) ~[brpc-java-2.5.2.jar:?]
        at com.baidu.brpc.utils.ThreadPool.consume(ThreadPool.java:131) ~[brpc-java-2.5.2.jar:?]
        at com.baidu.brpc.utils.ThreadPool.access$000(ThreadPool.java:37) ~[brpc-java-2.5.2.jar:?]
        at com.baidu.brpc.utils.ThreadPool$1.run(ThreadPool.java:79) ~[brpc-java-2.5.2.jar:?]
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-all-4.1.36.Final.jar:4.1.36.Final]
        at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_181]
Exception in thread "main" com.baidu.brpc.exceptions.RpcException: com.baidu.brpc.exceptions.RpcException: com.baidu.brpc.exceptions.RpcException: serviceInterface must not be set repeatedly, please use another RpcClient
        at com.baidu.brpc.client.BrpcProxy.intercept(BrpcProxy.java:276)
        at com.github.wenweihu86.raft.example.server.service.ExampleService$$EnhancerByCGLIB$$c1bbc38a.set(<generated>)
        at com.github.wenweihu86.raft.example.client.ClientMain.main(ClientMain.java:36)
Caused by: com.baidu.brpc.exceptions.RpcException: com.baidu.brpc.exceptions.RpcException: serviceInterface must not be set repeatedly, please use another RpcClient
        at com.baidu.brpc.client.RpcFuture.get(RpcFuture.java:165)
        at com.baidu.brpc.interceptor.LoadBalanceInterceptor.rpcCore(LoadBalanceInterceptor.java:91)
        at com.baidu.brpc.interceptor.LoadBalanceInterceptor.invokeRpc(LoadBalanceInterceptor.java:74)
        at com.baidu.brpc.interceptor.LoadBalanceInterceptor.aroundProcess(LoadBalanceInterceptor.java:53)
        at com.baidu.brpc.interceptor.DefaultInterceptorChain.intercept(DefaultInterceptorChain.java:43)
        at com.baidu.brpc.interceptor.AbstractInterceptor.aroundProcess(AbstractInterceptor.java:35)
        at com.baidu.brpc.interceptor.ClientTraceInterceptor.aroundProcess(ClientTraceInterceptor.java:40)
        at com.baidu.brpc.interceptor.DefaultInterceptorChain.intercept(DefaultInterceptorChain.java:43)
        at com.baidu.brpc.client.BrpcProxy.intercept(BrpcProxy.java:265)
        ... 2 more
Caused by: com.baidu.brpc.exceptions.RpcException: serviceInterface must not be set repeatedly, please use another RpcClient
        at com.baidu.brpc.protocol.standard.BaiduRpcProtocol.decodeResponse(BaiduRpcProtocol.java:162)
        at com.baidu.brpc.protocol.standard.BaiduRpcProtocol.decodeResponse(BaiduRpcProtocol.java:70)
        at com.baidu.brpc.client.handler.ClientWorkTask.run(ClientWorkTask.java:65)
        at com.baidu.brpc.utils.ThreadPool.consume(ThreadPool.java:131)
        at com.baidu.brpc.utils.ThreadPool.access$000(ThreadPool.java:37)
        at com.baidu.brpc.utils.ThreadPool$1.run(ThreadPool.java:79)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.lang.Thread.run(Thread.java:748)
2020-01-10 11:33:09,745 INFO [Thread-1] Brpc do clean work...
2020-01-10 11:33:09,745 INFO [Thread-1] invoke shutdownGlobalThreadPools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants