我尝试直接用idea配置的remote tomcat去直接部署war包到我的阿里云,但是一直报超时错误,研究了很长时间,搜了很长时间也没找到原因
配置的阿里云上的catalina.sh
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"
启动tomcat后,tomcat运行正常,而且我拿netstat -ef | grep 2222
查看2222端口确实开启了
但是当我用windows下的idea去运行的时候,就是会一直报错
Error running '服务器ip': Unable to connect to the 服务器ip:2222, reason: java.rmi.ConnectException: Connection refused to host: 服务器ip; nested exception is: java.net.ConnectException: Connection timed out: connect
而且我查阿里云服务器后台,确实我主机跟阿里云服务器建立了一个连接,但是为什么一直报错啊。。。。。。。。。
remote tomcat里的sftp没有问题,因为我测试连接是可以连接到服务器的
抱歉不能上图
(吐槽一下现在的csdn就是复制dn一查问题前十个都是一样的。。。。。。)