A one-yuan student cloud was installed on Tencent Cloud, and everything was normal until the configuration of tomcat began to have various inexplicable problems. The most inexplicable thing is that the tomcat is started, the port is listening normally, and the security group also allows the port, and then the problem comes.
When you visit the tomcat homepage with a browser, you will find it is super slow. The browser has been waiting for the server's response. From here, it can be seen that port 8080 can be accessed, but the server does not return data. (This problem tossed for a few days)
Later, I searched for countless information on the Internet and finally found a blog (click here) explaining the reason. Tomcat8.0 has a bug on Tencent Cloud ubuntu14.04.
Multiple startups and shutdowns cause the thread to block when a random number is generated, and then get stuck.
Solution:
**tomcat bin/ catalina.sh added **
JAVA_OPTS="$JAVA_OPTS -Djava.security.egd=file:/dev/./urandom"
Then the problem is solved, and the access speed is normal.
Recommended Posts