Select to view content in your preferred language

Fail to start the server machine. Required port 4000 already in use,

2266
8
Jump to solution
11-06-2013 09:26 AM
JamalNUMAN
Legendary Contributor
Fail to start the server machine. Required port 4000 already in use,

As I restarted my machine, all the services get stopped. I wanted to restart them but I got the message below

[ATTACH=CONFIG]28904[/ATTACH]


What might be the issue here?


Thank you

Best

Jamal
----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
NidhinKarthikeyan
Honored Contributor
Jamal,


You have to stop ArcGIS Server service in windows services panel and start it.

View solution in original post

0 Kudos
8 Replies
NidhinKarthikeyan
Honored Contributor
Jamal,


You have to stop ArcGIS Server service in windows services panel and start it.
0 Kudos
JamalNUMAN
Legendary Contributor
Jamal,


You have to stop ArcGIS Server service in windows services panel and start it.


Many thanks Nidhin for the help,

I restarted the machine and it works fine.

Next time, I�??ll be stopping and restarting the ArcGIS Server and see the effect

Best

Jamal
----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
JamalNUMAN
Legendary Contributor
Jamal,


You have to stop ArcGIS Server service in windows services panel and start it.



Many thank Nidhin for the help. It works fine.

Stopping\restarting the ArcGIS Server provides the solution for this issue.

[ATTACH=CONFIG]29217[/ATTACH], [ATTACH=CONFIG]29218[/ATTACH], [ATTACH=CONFIG]29219[/ATTACH]

Best

Jamal
----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
AdrianMarsden
Honored Contributor
I got this same issue when I stopped and started the service using a .bat file and net stop and net start - should this be an issue?  If so, is there a safe way to stop and start the service on a schedule?

ACM
0 Kudos
WilliamCraft
MVP Alum
If something is still holding on to the port, then a process isn't getting terminated like it should when you stop ArcGIS Server.  After doing the NET STOP but before doing the NET START, try doing something like this in the batch file:

taskkill /IM ArcSOC.exe
TIMEOUT /T 5
taskkill /IM ArcSOC.exe /F /t
taskkill /IM ArcGIS.exe
TIMEOUT /T 5
taskkill /IM ArcGIS.exe /F /t
taskkill /IM ArcGISServer.exe
TIMEOUT /T 5
taskkill /IM ArcGISServer.exe /F /t



To schedule the stop/start, run the batch file via Task Scheduler but make sure it is set to run even while the user account for the task is not logged in. 


Another way to troubleshoot this is to rule out anything else that might be using port 4000 (and the other ports used by AGS).  To do this, stop ArcGIS Server and kill all its processes and then run netstat -a -o -n > c:\temp\port_use.txt from the command line.  Look for any entries in the resulting port_use.txt file that seem to be using the ports in question.  If something else is consuming that port, then there may be a conflict with AGS.
0 Kudos
AdrianMarsden
Honored Contributor
Cheers - not sure if the server restart helped or your extra lines.  But I'll leave them all in.  I added a IISRESET for good measure!

I am doing this as I have some tasks that need exclusive locks on layers and it is easier to shut the whole thing down.
0 Kudos
JamalNUMAN
Legendary Contributor
Cheers - not sure if the server restart helped or your extra lines.  But I'll leave them all in.  I added a IISRESET for good measure!

I am doing this as I have some tasks that need exclusive locks on layers and it is easier to shut the whole thing down.


Thanks William and Adrian for the help

Best

Jamal
----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
JamalNUMAN
Legendary Contributor
Cheers - not sure if the server restart helped or your extra lines.  But I'll leave them all in.  I added a IISRESET for good measure!

I am doing this as I have some tasks that need exclusive locks on layers and it is easier to shut the whole thing down.


Thanks Adrian. I�??ll try �??iisrest�?� and see if it works.


Best

Jamal
----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos