Reputation: 2203
I have a Tomcat Server 7.0.54 running on port 6584 on an Amazon EC2 instance.
The server runs fine for a while but suddenly it seems to close the port on which it listens.
When it is running normally netstat -lnp | grep <pid_of_tomcat>
gives me
tcp6 0 0 127.0.0.1:8005 :::* LISTEN 22999/java
tcp6 0 0 :::8009 :::* LISTEN 22999/java
tcp6 0 0 :::6584 :::* LISTEN 22999/java
When it suddenly stops working, the tomcat instance is still running and there is enough memory on the machine. But netstat -lnp | grep <pid_of_tomcat>
only gives me
tcp6 0 0 127.0.0.1:8005 :::* LISTEN 22999/java
This suggests that tomcat is no longer listening on the port.
How can I explain why this happens? How can I debug the situation?
Upvotes: 1
Views: 267
Reputation: 363
-Xrunhprof:cpu=samples,interval=10,depth=8
to your JAVA_OPTS, and check the
"java.profile.txt" file generated when it happens again.
(if you need to change some arguments, refer to this)Upvotes: 1
Reputation: 922
Couple of thing which you can do for this is as below.
Adjusted "{tomcat_home}/bin/setenv.sh" with the following:
export CATALINA_OPTS="-Djava.net.preferIPv4Stack=true"
Upvotes: 1
Reputation: 2996
Check If there is any cron job running at system level for apt-packages. if yes then remove this cron job. I think this is the problem.
Upvotes: 0
Reputation: 6110
Upvotes: 1