tomcat bind ipv4 port

Open catalina.sh in the <tomcat>/bin directory and add the following:

JAVA_OPTS="$JAVA_OPTS -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses=true "

add here

 

(Restart the process after saving. If ipv4 is still not bound, remove the content added in catalina.sh, then create a new setenv.sh in the <tomcat>/bin directory, and then add the following content:

JAVA_OPTS="$JAVA_OPTS -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses=true ")

 

(restart the process after saving)

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325847957&siteId=291194637