Tomcat6 Installation Failing

  • Posted February 6, 2015

Hi, I have a problem in installing apache tomcat6 in this Doplet, Am following the same procedure as i did in other server (Plesk) but when i open on browser ( shows web not available. When i invoke command to see services and port used i see port 8080 used by mysqld and port 80 used by java. How can i rectify the issue in order to use port 8080 without affecting server.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

As the error indicates, a port can only be used by a single application at once. In order to resolve the problem, you’ll need to change the port number for one or the other. To change the port that Tomcat is listening on, edit your server.xml and find the “Connector” section. On Ubuntu, the configuration file can be found at /etc/tomcat7/server.xml (edit the version number as needed). It should look like:

    <Connector port="8080" protocol="HTTP/1.1" 
           redirectPort="8443" />

Change 8080 to a different number and restart Tomcat for the changes to take effect.

Though, it is unusual that MySql is listening on port 8080. By default, it listens on port 3306. If you’d like to adjust the port that it is running on, edit the file /etc/mysql/my.conf and change the port number in this section:

# * Basic Settings
user            = mysql
pid-file        = /var/run/mysqld/
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
basedir         = /usr
datadir         = /var/lib/mysql
tmpdir          = /tmp
lc-messages-dir = /usr/share/mysql

Again, remember to restart MySql for the changes to take effect.

For more information on getting Tomcat up and running on Ubuntu check out: