Reputation:
I have J2EE application and I want to change the port number of my tomcat server.
I have changed the Connector
tag to
<Connector port="8091" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
But its still giving error Port is already used
.
Do we need to change somewhere else too ?
Upvotes: 2
Views: 3786
Reputation: 21
I had the same issue until I figured that I had a "CATALINA_HOME" environment variable pointing to another tomcat folder. So changing the port in the server.xml file had no effect since it wasn't the one readed at startup.
I simply removed (using REM) this line in startup.bat :
REM if not "%CATALINA_HOME%" == "" goto gotHome
Upvotes: 1
Reputation: 29
See if you are not using doors in another program. The default ports in server.xml is as follows:
Tomcat admin port : 8005 HTTP/1.1 : 8080 AJP/1.3 : 8009
I believe that will resolve this problem.
Upvotes: 0
Reputation: 2102
may be your 8091 port is occupied try from command port how many ports are in use using netstat -ano
which will give you already used port
Upvotes: 2
Reputation: 48057
There are three ports in default tomcat installations: 8005, 8009 and 8080. You'll need to change all of them.
Just search for port=
in server.xml and change all the values.
Upvotes: 2