Tomcat refuses to work on port 8080
amazon-ec2, tomcat
Solution
Login AWS Console and navigate to Security groups.
- Remove the HTTP (80) if there is one.
- Select custom TCP rule and enter the port as "8080"
- Click on apply rule.
Add DNS Name :8080
It should work now.
Problem
Sorry if this question has been asked before. I have an Amazon instance (Ubuntu Server 12.04.1 LTS) and installed Tomcat version (Apache Tomcat/6.0.36). It works as expected on port 80, but not on port 8080. (Not working means "Can not connect to Web Application Manager"). - My Security Group configuration has port 8080 opened for http* ``` 22 (SSH) 0.0.0.0/0 Delete 80 (HTTP) 0.0.0.0/0 Delete 8080 (HTTP*) 0.0.0.0/0 Delete ``` - I have both jdk and jre installed, even I do not know why I need jdk if tomcat running on port 8080. - I have configured tomcat to bind on IPV4 address by having ``` <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" address="0.0.0.0"/> ``` at server.xml and adding ``` JAVA_OPTS="$JAVA_OPTS -Djava.net.preferIPv4Stack=true" echo $JAVA_OPTS ``` to setenv.sh Runnung netstat -ln gives me ``` Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:8005 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:8009 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN tcp6 0 0 :::22 :::* LISTEN udp 0 0 0.0.0.0:68 0.0.0.0:* Active UNIX domain sockets (only servers) Proto RefCnt Flags Type State I-Node Path unix 2 [ ACC ] STREAM LISTENING 5886 @/com/ubuntu/upstart unix 2 [ ACC ] STREAM LISTENING 7285 /var/run/dbus/system_bus_socket unix 2 [ ACC ] SEQPACKET LISTENING 6077 /run/udev/control unix 2 [ ACC ] STREAM LISTENING 7397 /var/run/acpid.socket ``` Running `wget http://localhost:8080` gives me ``` --2013-04-11 11:20:40-- http://localhost:8080/ Resolving localhost (localhost)... 127.0.0.1 Connecting to localhost (localhost)|127.0.0.1|:8080... connected. HTTP request sent, awaiting response... 200 OK Length: 7446 (7.3K) [text/html] Saving to: `index.html' 100%[=====================================================================================================================================================================>] 7,446 --.-K/s in 0s 2013-04-11 11:20:40 (294 MB/s) - `index.html' saved [7446/7446] ``` So, did I miss anything? Thanks!!