Idea configuration remote tomcat, cannot connect to run

idearemote tomcatwar

catalina.sh on configured Ali Cloud

export CATALINA_OPTS="-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=2222
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Djava.rmi.server.hostname=ip"

after starting tomcat, tomcat runs normally, and I take netstat-ef | grep 2222
to see that port 2222 is really open
but when I use idea under windows to run, I will always report an error

.
Error running "Server ip": Unable to connect to the Server ip:2222, reason: java.rmi.ConnectException: Connection refused to host: Server ip; nested exception is: java.net.ConnectException: Connection timed out: connect

and I check the backend of the Ali cloud server, and it is true that my host has established a connection with the Ali cloud server, but why does it keep reporting errors? There is no problem with the sftp in
remote tomcat, because I tested that the connection can be connected to the server.
Sorry that the picture
cannot be shown above. (complain that the current csdn is to copy dn. The first ten problems are all the same. )

Feb.10,2022
Menu