No meu Ubuntu eu instalei o tomcat e a aplicação web implementada. Eu iniciei o tomcat e tentei acessar do windows como abaixo:
http://<54.85.125.1:8080>/manager
Estou recebendo uma saída assim:
could not connect to 54.85.125.1:8080
Em seguida, executei o comando sudo ufw enable
, para habilitar o firewall no Ubuntu, mas mesmo assim ainda não consigo conectar-me à máquina remota.
Qualquer um por favor me ajude
Eu executei o netstat -a no meu cmd
ubuntu@ip-172-31-20-201:~$ netstat -a
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:ssh *:* LISTEN
tcp 0 0 *:http *:* LISTEN
tcp 0 0 ip-172-31-20-201.ec:ssh mail.pagesolution:18414 ESTABLISHED
tcp 0 0 ip-172-31-20-201.ec:ssh mail.pagesolution:64067 ESTABLISHED
tcp 0 0 ip-172-31-20-201.:58381 ec2-54-186-216-161:4505 ESTABLISHED
tcp 0 320 ip-172-31-20-201.ec:ssh mail.pagesolution:18178 ESTABLISHED
tcp 0 0 ip-172-31-20-201.ec:ssh mail.pagesolution:64065 ESTABLISHED
tcp6 0 0 [::]:ssh [::]:* LISTEN
tcp6 0 0 [::]:8009 [::]:* LISTEN
tcp6 0 0 [::]:http-alt [::]:* LISTEN
tcp6 0 0 localhost:http-alt localhost:43938 TIME_WAIT
tcp6 0 0 ip6-localhost:51788 ip6-localhost:52644 TIME_WAIT
tcp6 0 0 ip6-localhost:57361 ip6-localhost:57173 TIME_WAIT
tcp6 0 0 localhost:8009 localhost:39078 TIME_WAIT
tcp6 0 0 localhost:49296 localhost:8005 TIME_WAIT
udp 0 0 *:bootpc *:*
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 7432 /var/run/acpid.socket
unix 2 [ ACC ] STREAM LISTENING 5867 @/com/ubuntu/upstart
unix 2 [ ACC ] STREAM LISTENING 7250 /var/run/dbus/system_bus_socket
unix 8 [ ] DGRAM 7299 /dev/log
unix 2 [ ACC ] SEQPACKET LISTENING 6070 /run/udev/control
unix 2 [ ACC ] STREAM LISTENING 58324 /var/run/salt/minion/minion_event_0419609a49f1eec5f4394428f9cebbb5_pub.ipc
unix 2 [ ACC ] STREAM LISTENING 58326 /var/run/salt/minion/minion_event_0419609a49f1eec5f4394428f9cebbb5_pull.ipc
unix 3 [ ] STREAM CONNECTED 126113
unix 3 [ ] STREAM CONNECTED 126112
unix 3 [ ] STREAM CONNECTED 126092
unix 3 [ ] STREAM CONNECTED 126091
unix 2 [ ] DGRAM 125836
unix 2 [ ] DGRAM 125830
unix 3 [ ] STREAM CONNECTED 123313
unix 3 [ ] STREAM CONNECTED 123312
unix 2 [ ] DGRAM 123174
unix 3 [ ] STREAM CONNECTED 121839
unix 3 [ ] STREAM CONNECTED 121838
unix 2 [ ] DGRAM 121700
unix 2 [ ] DGRAM 11061
unix 3 [ ] STREAM CONNECTED 7570 /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 7569
unix 2 [ ] DGRAM 7418
unix 3 [ ] STREAM CONNECTED 7276 /var/run/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 7275
unix 3 [ ] STREAM CONNECTED 7274
unix 3 [ ] STREAM CONNECTED 7273
unix 3 [ ] STREAM CONNECTED 6557 @/com/ubuntu/upstart
unix 3 [ ] STREAM CONNECTED 6556
unix 3 [ ] DGRAM 6110
unix 3 [ ] DGRAM 6109
unix 3 [ ] STREAM CONNECTED 6045 @/com/ubuntu/upstart
unix 3 [ ] STREAM CONNECTED 6042
e executado ps -ax no ubuntu
ubuntu@ip-172-31-20-201:~$ ps -ax
4479 ? S 0:00 /usr/sbin/apache2 -k start
4480 ? S 0:00 /usr/sbin/apache2 -k start
4481 ? S 0:00 /usr/sbin/apache2 -k start
4487 ? S 0:00 /usr/sbin/apache2 -k start
4579 ? S 0:00 /usr/sbin/apache2 -k start
17348 ? Ss 0:17 /usr/sbin/apache2 -k start
e também executou o telnet localhost 8080 no ubuntu
ubuntu@ip-172-31-20-201:~$ telnet localhost 8080
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.
Eu não tenho nenhum arquivo como /etc/init.d/tomcatX restart.I começou servidor como abaixo
ubuntu@ip-172-31-20-201:~$ sudo /opt/apache-tomcat-7.0.53/bin/startup.sh
Using CATALINA_BASE: /opt/apache-tomcat-7.0.53
Using CATALINA_HOME: /opt/apache-tomcat-7.0.53
Using CATALINA_TMPDIR: /opt/apache-tomcat-7.0.53/temp
Using JRE_HOME: /usr
Using CLASSPATH: /opt/apache-tomcat-7.0.53/bin/bootstrap.jar:/opt/apache-tomcat-7.0.53/bin/tomcat-juli.jar
Tomcat started.