0

I created amazon EMR cluster with one master and one slave.
I installed Tomcat on my master instance.
I replaced all "8080" with "8686" and "localhost" with "0.0.0.0" in /conf/server.xml.
I started tomcat instance and can see below output of command "netstat -anltp | grep "LISTEN".

tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN - tcp 0 0 172.31.28.158:22222 0.0.0.0:* LISTEN 5209/as tcp 0 0 172.31.28.158:50000 0.0.0.0:* LISTEN 5213/as tcp 0 0 172.31.28.158:50001 0.0.0.0:* LISTEN 5210/as tcp 0 0 172.31.28.158:50002 0.0.0.0:* LISTEN 5212/as tcp 0 0 172.31.28.158:50003 0.0.0.0:* LISTEN 5211/as tcp 0 0 172.31.28.158:33333 0.0.0.0:* LISTEN 5213/as tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN - tcp6 0 0 :::8443 :::* LISTEN 1478/java tcp6 0 0 :::8444 :::* LISTEN 1478/java tcp6 0 0 :::8321 :::* LISTEN 1478/java tcp6 0 0 127.0.0.1:8005 :::* LISTEN 6114/java tcp6 0 0 172.31.28.158:9000 :::* LISTEN 4059/java tcp6 0 0 :::8009 :::* LISTEN 6114/java tcp6 0 0 172.31.28.158:9001 :::* LISTEN 4098/java tcp6 0 0 :::9100 :::* LISTEN 4098/java tcp6 0 0 :::9101 :::* LISTEN 4059/java tcp6 0 0 :::8686 :::* LISTEN 6114/java tcp6 0 0 :::10004 :::* LISTEN 4734/java tcp6 0 0 :::22 :::* LISTEN - 

I created security group with inbound "custom TCP rule" for port "8686" to access tomcat instance from outside.
But still I can't access tomcat instance from my local desktop or do "telnet 8686"

Please help.
Thanks.
~Ajit

4
  • Make sure that you add the rule to the security group the EMR master belongs to. Commented Apr 16, 2014 at 14:39
  • Yes, I already did :-( Commented Apr 18, 2014 at 3:43
  • It seems like it's listening on ipv6. Try to disable it with the following parameter: -Djava.net.preferIPv4Stack=true Commented Apr 20, 2014 at 8:13
  • @SNeumann - Can you please let me know how to do that on Amazon EMR? Commented Apr 21, 2014 at 5:15

2 Answers 2

1

It's working for all .
Just need to change security group as below.

Inbound type protocol port range source All TCP TCP 0 - 65535 0.0.0.0/0 

Thanks for all your help.

Sign up to request clarification or add additional context in comments.

Comments

0

You should force Tomcat to work with IPv4. Check out the answer here: https://serverfault.com/questions/390840/how-does-one-get-tomcat-to-bind-to-ipv4-address

There's nothing specific to EMR to fix here.

1 Comment

Please see my comment below.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.