Page 1 of 1
Tomcat cannot open on port 8080
Posted: Fri Jan 30, 2015 3:52 pm
by yogi
I installed Vesta on Ubuntu 14.04 x64. After which I installed Tomcat from the terminal. However, I cannot access tomcat using port 8080. Is there a solution for this?
I am sorry if this has been already asked in the forums, but I couldn't find any answer by searching the forums. If a thread/post exits with the info, can someone direct me there, please.
Thank you
Edit: I forgot to mention that I also changed the connector port from 8080 to 8082 in tomcats server.xml. I found out that vesta has firewall to drop/add ports, but when I tried adding 8082, vesta stopped working. The reason I went with 8082, was that when I researched to see which ports were being used by vesta, 8082 wasn't on the list.
Re: Tomcat cannot open on port 8080
Posted: Fri Jan 30, 2015 5:17 pm
by yogi
It seems that I had to modify few thing in catalina.sh by changing the JAVA_OPTS value in /etc/default/tomcat7 for it to load. I thought it was because of the vesta, but it seems it's not and now tomcat is working fine. I guess it's the issue with DigitalOcean VPS.
Note: I had to add "-Djava.security.egd=file:/dev/./urandom" in the above mentioned file.
Nevertheless, issue resolved
Steps I took if anyone stumbles into same problem as me:
1. cd to /etc/default
2. sudo nano tomcat7 [or you can use vim]
3. add "-Djava.security.egd=file:/dev/./urandom" in the "JAVA_OPTS" field and save
4. restart tomcat
Also to change the port that tomcat uses (there many resources you can read online about it, but for a quick summary)
1. cd to /etc/tomcat7
2. sudo nano server.xml
3. edit the line that represents something like this:
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
change "8080" to whichever port you want tomcat to use
4. restart tomcat
Re: Tomcat cannot open on port 8080
Posted: Wed Mar 18, 2015 5:27 am
by tawhid111
can someone help me with an step by step guide ?
Re: Tomcat cannot open on port 8080
Posted: Wed Mar 18, 2015 12:57 pm
by skurudo
Post above from yogi not complete?
Re: Tomcat cannot open on port 8080
Posted: Wed Mar 18, 2015 5:56 pm
by tawhid111
i changed the tomcat port but the other step i cant seem to understand properly whats the correct directory to change that ? thats why i need a step by step guide
Re: Tomcat cannot open on port 8080
Posted: Wed Mar 18, 2015 10:12 pm
by tawhid111
what does vestacp port 8080 used for ?
how to can i set tomcat to run automatically ?
Re: Tomcat cannot open on port 8080
Posted: Thu Mar 19, 2015 5:47 pm
by skurudo
tawhid111 wrote:what does vestacp port 8080 used for ?
how to can i set tomcat to run automatically ?
8080 is for webserver apache2
read a guide for tomcat. if someone can answer better, it will be nice )
Re: Tomcat cannot open on port 8080
Posted: Sun Jan 17, 2016 11:13 pm
by oobydoo
find / -name sever.xml
when you find it
nano path you found sever.xml
change the ports
Why well each linux is differnt mine is centos 6.7 and a centos 7
we had to authbind the ports we changed to too
Google the rest
Re: Tomcat cannot open on port 8080
Posted: Mon Jan 18, 2016 6:23 am
by skurudo
Thanks, oobydoo ;-)