登录时提示如下错误信息:
2018-08-20 09:58:06 I/O exception (java.net.ConnectException) caught when processing request: connect: Address is invalid on local machine, or port is not valid on remote machine 2018-08-20 09:58:06 Retrying request 2018-08-20 09:58:06 I/O exception (java.net.ConnectException) caught when processing request: connect: Address is invalid on local machine, or port is not valid on remote machine 2018-08-20 09:58:06 Retrying request 2018-08-20 09:58:06 I/O exception (java.net.ConnectException) caught when processing request: connect: Address is invalid on local machine, or port is not valid on remote machine 2018-08-20 09:58:06 Retrying request
这个错误是因为jdk运行时使用的是ipv6导致的,可以通过添加jvm的参数配置解决,如下:
1.在tomcat\bin\catalina.bat文件中在set JAVA_OPT后面添加-Djava.net.preferIPv4Stack=true,保存文件
2.studio的“窗口——首选项——Studio配置——tomcat——添加到JVM参数”中添加-Djava.net.preferIPv4Stack=true,然后点击右下角的“应用”
需要注意的是添加这个配置后要重启tomcat
评一波