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

Support specified naming UDP push port for client #5439

Merged
merged 2 commits into from
Apr 22, 2021

Conversation

goodjava
Copy link
Contributor

@goodjava goodjava commented Apr 21, 2021

nacos+dubbo 以consumer端部署的时候如果部署在容器内(docker内).就会发现provider list 的更新频率变成自动跑的任务的更新频率,而且永远收不到udp的push信息,这是因为docker内部安装的应用需要提前通知他们使用什么端口,不然其实是隔离的(比如桥接模式).
简单描述就是:查询list列表的时候会上报udp端口,但nacos server 获取到变更后并不能通知到容器中 dubbo 的 consumer端
gggg
nv
fffff

Copy link
Collaborator

@KomachiSion KomachiSion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use nacos code style to reformat code.

@KomachiSion KomachiSion added the pending On hold due to dependency or release label Apr 22, 2021
@goodjava
Copy link
Contributor Author

Please use nacos code style to reformat code.

代码格式修正了

@KomachiSion KomachiSion added kind/enhancement Category issues or prs related to enhancement. and removed pending On hold due to dependency or release labels Apr 22, 2021
@KomachiSion KomachiSion changed the title Nacos client within docker container could not receive service change… Support specified naming UDP push port for client Apr 22, 2021
@KomachiSion KomachiSion merged commit 103e671 into alibaba:develop Apr 22, 2021
@KomachiSion KomachiSion added this to the 1.4.2 milestone Apr 22, 2021
@hujiang75277381
Copy link

请问,在一个机器上 存在多个nacos client 怎么办????大佬跪舔 。希望快速回复,等着上线。

@jefferson-chern
Copy link

nacos+dubbo 以consumer端部署的时候如果部署在容器内(docker内).就会发现provider list 的更新频率变成自动跑的任务的更新频率,而且永远收不到udp的push信息,这是因为docker内部安装的应用需要提前通知他们使用什么端口,不然其实是隔离的(比如桥接模式). 简单描述就是:查询list列表的时候会上报udp端口,但nacos server 获取到变更后并不能通知到容器中 dubbo 的 consumer端 gggg nv fffff

大佬,请问一下您那边怎么指定的push.receiver.udp.port,这个读取的是系统环境变量,但是我使用export设置push.receiver.udp.port不成功,因为变量名不支持含有.的特殊字符。请教一下怎么设置的

@jefferson-chern
Copy link

请问,在一个机器上 存在多个nacos client 怎么办????大佬跪舔 。希望快速回复,等着上线。

您那边怎么设置的push.receiver.udp.port

@hujiang75277381
Copy link

请问,在一个机器上 存在多个nacos client 怎么办????大佬跪舔 。希望快速回复,等着上线。

您那边怎么设置的push.receiver.udp.port

设置在jvm中, -Dpush.receiver.udp.port=10086

@jefferson-chern
Copy link

请问,在一个机器上 存在多个nacos client 怎么办????大佬跪舔 。希望快速回复,等着上线。

您那边怎么设置的push.receiver.udp.port

设置在jvm中, -Dpush.receiver.udp.port=10086

您好,我们开始也想着在jvm中设置 -Dpush.receiver.udp.port,但是发现设置不生效,因为 push.receiver.udp.port 是linux系统的环境变量,后来我们使用 设置环境变量的方式设置好了, 使用如下方式:
env push.receiver.udp.port=10086 java -jar xxx.jar

这种方式还支持一个机器上存在多个nacos client ,因为env设置的环境变量,仅仅在 env push.receiver.udp.port=10086 java -jar xxx.jar 这一行shell执行时生效,不同的xxx.jar使用不同的 push.receiver.udp.port 即可,如下:

nacos client1 对应:env push.receiver.udp.port=10086 java -jar 1.jar
nacos client2 对应:env push.receiver.udp.port=10087 java -jar 2.jar

@goodjava goodjava deleted the optimize_docker branch September 21, 2023 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Category issues or prs related to enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants