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

Nacos 服务端版本升级到2.0.3版本,客户端存在有某些服务器不能连接grpc端口的问题 #8250

Closed
jsonpang opened this issue Apr 25, 2022 · 9 comments
Labels
area/Client Related to Nacos Client SDK good first issue Good for newcomers kind/enhancement Category issues or prs related to enhancement.

Comments

@jsonpang
Copy link

Issue Description

Type: bug report or feature request

Describe what happened (or what feature you want)

Nacos 服务端版本升级到2.0.3版本,客户端也升级相应的版本,部署出现提示
image
在出现上述提示的机器中已经做了tcp和http连通性测试 都是连接通 服务端8848 改成了9001 所以端口漂移为10001 也改过非默认 情况是一样的
image
并且客户端抓包分析了 已经握手了 然后客户端马上发了一个rst
image
在服务端抓包
image

Describe what you expected to happen

希望可以所有服务器都能正常使用,目前是只能换到能正常连接grpc 的服务器使用,觉得这个问题很奇怪,并且在我的k8s环境也出现了同样的问题,某个node 上的pod 不能连接部署在k8s 的nacos 服务 同样的报错
客户端版本引用截图
image
不知道是否升级版本可以解决此问题

How to reproduce it (as minimally and precisely as possible)

Tell us your environment

环境是
<spring.cloud.version>Hoxton.SR12</spring.cloud.version>
<spring.cloud.alibaba.version>2.2.7.RELEASE</spring.cloud.alibaba.version>

org.springframework.boot
spring-boot-starter-parent
2.3.12.RELEASE

Anything else we need to know?

@KomachiSion
Copy link
Collaborator

我认为这并非代码问题,而是环境问题,有些可以有些不可以说明肯定是那个不可以的环境本身存在问题,导致了链接一直被rst

@jsonpang
Copy link
Author

我认为这并非代码问题,而是环境问题,有些可以有些不可以说明肯定是那个不可以的环境本身存在问题,导致了链接一直被rst

对比了一下 机器的配置 所有的网络都是同一内网下,然后端口也是通的,想看看有没有其他排查的思路

@KomachiSion
Copy link
Collaborator

有没有vip或者slb之类的中间层进行转发? 有的话可能是那个导致的。

@soento
Copy link

soento commented May 6, 2022

我也遇到这个问题了,用源码调试发现下面3000毫秒没有响应倒是servercheck返回空,导致grpc的Connection为空,无法拉去nacosserver的配置。而超时时间是硬编码写死的,如果改为30000就能正常启动项目。另外这个catch中的异常在日志/root/logs/nacos目录下的文件中没有记录。nacos client中类似超时,connection为空的异常在日志文件中都没有,很难排查,希望后续版本优化。。。。。。。
image

@KomachiSion KomachiSion added area/Client Related to Nacos Client SDK kind/enhancement Category issues or prs related to enhancement. good first issue Good for newcomers and removed status/need feedback labels May 9, 2022
@KomachiSion KomachiSion added this to the 2.1.1 milestone May 9, 2022
@alibaba alibaba deleted a comment from PheakTracg May 13, 2022
@alibaba alibaba deleted a comment from PheakTracg May 13, 2022
@alibaba alibaba deleted a comment from To617617 May 13, 2022
@jsonpang
Copy link
Author

**soento ** commented 12天前

你是怎么改成30000的呢?

@ethanwanggg
Copy link

他是源码吧

@wuchubuzai2018
Copy link
Contributor

我想提交这个GrpcClient代码中的serverCheck的PR是否可以呢?
Payload response = responseFuture.get(3000L, TimeUnit.MILLISECONDS);

主要是增加这个3000的一个常量和一个方法进行获取 ,这样就和该类中的其他属性判断一致了,
private static final long DEFAULT_SERVERCHECK_TIMEOUT = 3000L;
private int serverCheckTimeout() {
String serverCheckTimeout = System
.getProperty("nacos.remote.grpc.servercheck.timeout", String.valueOf(DEFAULT_SERVERCHECK_TIMEOUT));
return Integer.parseInt(serverCheckTimeout);
}
Payload response = responseFuture.get(serverCheckTimeout(), TimeUnit.MILLISECONDS);

@PASUPULAK
Copy link

Hii

@KomachiSion
Copy link
Collaborator

Move to #9013

@KomachiSion KomachiSion removed this from the 2.1.2 milestone Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/Client Related to Nacos Client SDK good first issue Good for newcomers kind/enhancement Category issues or prs related to enhancement.
Projects
None yet
Development

No branches or pull requests

6 participants