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
I have a problem with sofa. Please help me to have a look #3461
Comments
Did you enable the sofa plugin? |
I'll have a look. |
|
thank you |
please tell me your shenyu version,zookeeper version and detail log. |
I also encountered the same situation, zk version tested 3.7 and 3.8 I find code: if (CommonUtils.isEmpty(providerInfos)) {
/**
* 如果注册中心没有provider,可能上下文中指定了provider
*
* 注册中心如果没有provider可用列表,需要识别上下文中是否存在直连Provider:
* 1. RpcInvokeContext.getContext().getTargetUrl()
*/
if (context != null) {
String targetIP = (String) context.getAttachment(RpcConstants.HIDDEN_KEY_PINPOINT);
if (StringUtils.isNotBlank(targetIP)) {
// 如果上下文指定provider,直接返回
ProviderInfo providerInfo = selectPinpointProvider(targetIP, providerInfos);
return providerInfo;
}
}
throw noAvailableProviderException(message.getTargetServiceUniqueName());
} else {
originalProviderInfos = new ArrayList<>(providerInfos);
} |
Is this the source code of sofa? Did you meet it, too? What's a good way now |
I didn't solve it |
1 similar comment
I didn't solve it |
This should be a bug |
Have you tried adding below dependencies in <dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-client</artifactId>
<version>4.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-framework</artifactId>
<version>4.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-recipes</artifactId>
<version>4.0.1</version>
</dependency> |
yes ! We are trying to fix it, if you are interested in this topic, please feel free to contribute~ |
I created a PR for this issue. Feel free to leave comment. |
The root cause is curator version incompatible. |
In version 2.4.3, there is this version of curator. I have tried it without any problem. but I have not tried it on the master branch |
You can pull the newest master branch and test again, it should be fixed. But pay attention, please don't use zk as data sync. I'll fix it in future PR. |
hi~ the version 2.4.3 is no problem. This question may be related to this pr see : https://github.com/apache/incubator-shenyu/pull/3388/files |
Well thank you. |
thank you. |
Hello, which version of ZK synchronization data is available |
Hi @Summary-wcj , the PR which fix the zk data sync issue has been merged. Now you can pull the master branch and use zk data sync~ |
Thank you very much. I have seen the updated records |
Question
I used the local startup method to test the interface of sofa. The following errors occurred. The registry used was zookeeper and the example provided on the official website was used
Error log printed by the gateway when called
2022-05-31 15:34:38 [boundedElastic-3] INFO org.apache.shenyu.plugin.base.AbstractShenyuPlugin - sofa selector success match , selector name :/sofa 2022-05-31 15:34:38 [boundedElastic-3] INFO org.apache.shenyu.plugin.base.AbstractShenyuPlugin - sofa rule success match , rule name :/sofa/findAll 2022-05-31 15:34:38 [boundedElastic-3] ERROR org.apache.shenyu.web.handler.GlobalErrorHandler - [b54a2486] Resolved [SofaRouteException: RPC-020060001: 没有获得服务[org.apache.shenyu.examples.sofa.api.service.SofaSingleParamService:1.0]的调用地址,请检查服务是否已经推送 ] for HTTP GET /sofa/findAll
Information on zookeeper
The text was updated successfully, but these errors were encountered: