Running into a connection refused problem or the page keeps loading is the same problem as shown in the figure:
solution:
a) The virtual machine centos is configured as follows: vi /etc/hosts
b) zookeeper closes the firewall
c ) Kill all zookeeper processes and restart zookeeper
Query all zookeeper processes: ps -ef|grep zookeeper
Kill the process: kill-9 port number
d) You can delete the tomcat plug-in of pom in the web project, add and then install it, delete the tomcat plug-in of pom in the service layer manager project, and add and install it
The database connection problem is solved as shown in the figure: