zookeeper cannot register the provider in Dubbo

I just came into contact with the dubbo framework and encountered such a problem in the process of self-learning to write a demo.

The provider service started normally, and the IDE did not prompt any errors during the startup process, but the text printing in the console did not appear. Finally, I checked it in zookeeper.

Use the command:

zkCli.sh -server ip名称:port名

After the link is successful, check whether there is a dubbo service in the root directory, and it turns out that there is only one zookeeper, which means that the provider has not registered successfully;

I searched a lot of methods on the Internet and still failed to solve it. In the end, I suddenly thought whether it would be caused by the firewall, so I just used the command:

service iptables stop

Turn off the firewall, restart the project, the console will print out the text, check that the dubbo service is available in zookeeper, and the consumer has successfully called the provider interface;

So in the end, simply turn off the Linux firewall completely, the command:

chkconfig iptables off

View firewall status:

chkconfig --list | grep iptables


#显示如下

iptables       	0:off	1:off	2:off	3:off	4:off	5:off	6:off

Start the consumer, the interface is successfully called;

Guess you like

Origin blog.csdn.net/tonglei111/article/details/89188586