Comments (8)
from sofa-rpc-boot-projects.
按照demo中配置rest协议, 启动后报错
RPC-02306: 没有获得服务[com.jsmfbank.sse.facade.RestService:1.0]的调用地址,请检查服务是否已经推送
from sofa-rpc-boot-projects.
本地访问rest接口正常:http://localhost:8341/webapi/restService/1001
from sofa-rpc-boot-projects.
@wangxiaotao00 本地 zk 起了吗? 报错日志也提供下.
入门文档中有提到这个.
您可以直接在工程下找到本文档的示例代码。注意,示例代码中需要本地安装 zookeeper 环境,如果没有安装.需要将application.properties中的com.alipay.sofa.rpc.registry.address 配置注释掉.走本地文件注册中心的方式
from sofa-rpc-boot-projects.
没有zk,配置文件中注释了。
完整错误日志如下:
2018-05-05 11:50:43.892 INFO 7024 --- [ main] c.j.s.s.SpringBootSseApplication : Started SpringBootSseApplication in 57.374 seconds (JVM running for 57.696)
Exception in thread "main" com.alipay.sofa.rpc.core.exception.SofaRouteException: RPC-02306: 没有获得服务[com.jsmfbank.sse.facade.RestService:1.0]的调用地址,请检查服务是否已经推送
at com.alipay.sofa.rpc.client.AbstractCluster.noAvailableProviderException(AbstractCluster.java:419)
at com.alipay.sofa.rpc.client.AbstractCluster.select(AbstractCluster.java:391)
at com.alipay.sofa.rpc.client.FailoverCluster.doInvoke(FailoverCluster.java:64)
at com.alipay.sofa.rpc.client.AbstractCluster.invoke(AbstractCluster.java:286)
at com.alipay.sofa.rpc.client.ClientProxyInvoker.invoke(ClientProxyInvoker.java:83)
at com.alipay.sofa.rpc.proxy.jdk.JDKInvocationHandler.invoke(JDKInvocationHandler.java:74)
at com.sun.proxy.$Proxy51.sayRest(Unknown Source)
at com.jsmfbank.sse.springbootsse.SpringBootSseApplication.main(SpringBootSseApplication.java:27)
from sofa-rpc-boot-projects.
在调用之前睡一下线程试试。如 sample 中的例子,在调用之前加入 Thread.sleep :
RestService restService = (RestService) applicationContext.getBean("restServiceReference");
Thread.sleep(5000)
String result = restService.sayRest("rest");
from sofa-rpc-boot-projects.
可以了,谢谢
from sofa-rpc-boot-projects.
@wangxiaotao00 好的,稍后相关用例我们做一下优化.
from sofa-rpc-boot-projects.
Related Issues (20)
- Add sort pom maven plugin for master.
- Add nacos client support in pom
- Add disable tracing configuration via Spring Boot's application.properties
- 使用consul作为注册中心,但是服务能发布,消费者却订阅失败,提示如下 HOT 1
- Curator 版本和 sofa-rpc 的 Curator 版本不一致导致依赖冲突 HOT 2
- cherry pick from 5.x
- 如何添加全局的ProviderConfig.Parameters HOT 3
- sofa-rpc是否有计划升级nacos版本? HOT 3
- SofaBootRpcAutoConfiguration中的configureProcessorMap处理不支持自定义registry HOT 6
- SofaBootRpcAutoConfiguration中的所有@bean没有@Conditional
- sofareigstry按文档版本 无法注册
- rpc扩展注册中心Bug
- update sofaboot 3.1.4
- 全局 timeout 设置
- 发布dubbo协议实现dubbo过滤器不生效 HOT 2
- jax.rs 包原生的@Provider无效,自定义rest api annotation不生效 HOT 5
- AbstractInterfaceConfig抽象类中存在validation(jsr303验证)如何设置为true HOT 2
- sofaboot发布dubbo协议端口占用启动不报错 HOT 2
- update rpc 554 HOT 1
- Some ideas about using RPC with SOFABoot HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sofa-rpc-boot-projects.