Tomcat 8 not working on Centos/Fedora
I’m having trouble making work Apache Tomcat on Centos & Fedora.
Y just dowloaded it from the official site the file apache-tomcat-8.5.24.tar.gz & untar-ed it
I also downloaded the official JAVA jre-8u161-linux-x64.rpm from Oracle.
Everything look well.
This is a copy of my command window.
Last login: Fri Jan 19 21:19:58 2018 from 184.108.40.206
[root@tomcat ~]# java -version
java version “1.8.0161”
Java™ SE Runtime Environment (build 1.8.0161-b12)
Java HotSpot™ 64-Bit Server VM (build 25.161-b12, mixed mode)
Now I go to the location I have untar-ed tomcat 8
[root@tomcat bin]# ./startup.sh
Using CATALINABASE: /tmp/tr/tomc
Using CATALINAHOME: /tmp/tr/tomc
Using CATALINATMPDIR: /tmp/tr/tomc/temp
Using JREHOME: /usr
Using CLASSPATH: /tmp/tr/tomc/bin/bootstrap.jar:/tmp/tr/tomc/bin/tomcat-juli.jar
And finally to test everything is fine
[root@tomcat bin]# wget localhost:8080
–2018-01-19 21:31:15– http://localhost:8080/
Resolving localhost (localhost)… ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:8080… connected.
HTTP request sent, awaiting response…
And it remains like this forever. Let alone if I try to access from my web browser.
Any solution to this problem?
What’s funny is the very first time it worked fine for just once but when this started to happen i restored the server from a Snapshot and restarted all the installation process.
This how I know it isn’t requiring jdk instead of jre. And since I am trying to access from the local droplet it doesn´t look like the problem is any firewall.
I also followed some tutorial and added to the end of catalina.sh
(The line fi was already there)
JAVAOPTS= “$JAVAOPTS -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses”
I started several fresh linux (Centos and Fedora) instalations and the problem persists.
Thanks in advance for any help since I need to have a production server working as soon as the end of this month.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×