Change tomcat accessing port
- Goto tomcat>conf folder
- Edit
server.xml
- Search "Connector port"
- Replace "8080" by
your port number
- Restart tomcat server.
You are done!.
=====================================
Navigate to /tomcat-root/conf folder. Within you will find the server.xml file.
Open the server.xml in your preferred editor. Search the below similar statement (not exactly same as below will differ)
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
Going to give the port number to 9090
<Connector port="9090" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
Save the file and restart the server. Now the tomcat will listen at port 9090
===================================================================
Several ports (8005, 8080, 8009) required by Tomcat Server at localhost are already in use
If you are running on windows try this in the command line prompt:
netstat -ano
This will show all ports in use and the process id PID # of the process that is using that port. Then Ctrl+Alt+Del and open Task Manager to see which process is that.
You can then choose either to close/stop it or configure your server to use another port. To check if the new choosen port (let's say 8010) is available do this:
netstat -ano | grep 8010
If it does not return any lines then you are fine.
To change the port go to the Server view, open server.xml and change the port there. Mine has this entry:
Connector port="8010" protocol="AJP/1.3" redirectPort="8443"
========================================================================
Port 80 is being used by SYSTEM (PID 4), what is that?
check for services running on
netstat -o -n -a |findstr 0.0.:8080
--------------------------------
Also, try stopping "SQL Server Reporting Services (MSSQLSERVER)", that apparently defaults to 80. I did that and port 80 freed up. PID identified the culprit as "System", but apparently that System can mean multiple things.
--------------------------------------------------------
There are many services, which can listen port 80 on windows.
Luckily you can detect and stop them all running simple console command:
NET stop HTTP
Disable Unnecessary System Services Locally
-
Open the Computer Management interface.
-
In the console tree, expand Services and Applications and select Services.
-
From the right-hand pane, select a service to disable. Right-click on the selected service and select Properties.
-
The Properties dialog box for the selected services will appear. From the Startup type: drop down menu, select Disabled.
-
Under Service status: click on the Stop button.
-
Click the OK button.
===================================================
- Select “Default Web Site” from the left tree in IIS manager.
- Click Bindings from the right sidebar to open a dialog box.
- Select “http” record from the grid and hit Edit.
- Enter your choice of port number in “Port” Text box and hit OK.
==============================
No comments:
Post a Comment