Red Hat Linux EC2 instance behavior - AP south

0

I'm trying to run a Java Spring application. When I run the application on a North Virginia Red hat Linux server, it works fine. The same application does not even launch successfully on the AP South Red hat Linux server. I only have Java 17 and MySQL 8.x installed on both servers. So there is no difference in the software installed. The war file contains an embedded tomcat server. So I don't even have Tomcat installed on both servers. Both servers use a T2 micro EC2 instance since I'm still in the development phase.

Each time I stop and restart the AP south server and run the java -jar command, it gets stuck at a different point. It surely has nothing to do with my WAR file since the same WAR file runs on my laptop and the North Virginia Red Hat Linux server.

I have port 8080(for tomcat) open on both servers using the EC2 instance security groups. Is there a known issue with AP South that could be causing this? If you have any idea, please let me know.

North Virginia server(application launched successfully) Enter image description here

AP South server (application gets stuck at the handleFileUpload step. It gets stuck at a different point each time I stop and restart the server) Enter image description here

SaraE
asked 7 months ago335 views
2 Answers
0

Is it the same AMI on both - obviously the AMI ID won't be same (different regions) but the RHEL versions should match.

Also, check the kernel is at the same level on both, and that SELinux isn't enforcing on one and permissive on the other, the host-based firewall isn't blocking any ports, and it isn't something like being out of diskspace on one of them.

cat /etc/redhat-release
uname -a
sestatus
sudo firewall-cmd --list-all
df -h
df -i
java -version
mysql -V
profile picture
EXPERT
Steve_M
answered 7 months ago
0

Thanks a lot, Steve. It ended up being a memory issue. T2 micro in AP South does not seem to have 1 Gig allocated unlike North Virginia. I don't know why. I switched to T2 small in AP South and it fixed my issue. That is the reason the application was failing at different points each time.

Please see the images below.

North Virginia - Memory footprint. First command is Top North Virginia

Ap South - Memory footprint. First command is Top AP South

SaraE
answered 7 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions