Page 1 of 1

Apache Port Is Always Changing

PostPosted: 06. December 2012 07:58
by allupinya
XAMPP was working fine before but now something happened and I can't figure out what's wrong. There are two processes started and port numbers are not stable. I think it's searching for the port 80 starting from 1 and increasing. When apache is first started the port number is 80 but then it starts to change. What might be the possible reasons? Here is the screenshot of the control panel: Image

XAMPP version is 1.8.0. The server is Windows Server 2008. If port is changed to 8080, it's working. I checked the port 80 and here's the result: Image

Re: Apache Port Is Always Changing

PostPosted: 13. December 2012 16:48
by andyjh122
I have this same problem.

Re: Apache Port Is Always Changing

PostPosted: 13. December 2012 22:11
by andyjh122
I can post similar screen shots using TCPView.

It looks like there are multiple connections with the same remote port being opened.

They get into a timed_wait or closed_wait state and never close.

Then the server stops responding to subsequent requests. It doesn't crash since if you close those connections it will respond again.

Getting to the point of crashing/not accepting new connections happens with varying intervals from a fresh restart of the server.

Could be 2 days, could be 2 hours.

This didn't happen in Apache 2.2, and I'm using the same web apps from then...

Re: Apache Port Is Always Changing

PostPosted: 13. December 2012 22:12
by andyjh122
Also, looks like it's walking up the ports instead of using an already open port...

Maybe it's Ajax related?

Re: Apache Port Is Always Changing

PostPosted: 14. December 2012 07:04
by allupinya
I figured out what's wrong with my system. You may have the same issue. Microsoft SQL Server Reporing Service was enabled and using the port 80. That was why apache can't get port 80. Try "netstat -ao" command and get PID of the process that is using the port 80. Open task manager and check what program is using that PID. If it's SYSTEM then it's a Microsoft service. Now try to find what service is responsible and disable it. You may also kill the process but it wouldn't be a good solution I think.

Re: Apache Port Is Always Changing

PostPosted: 14. December 2012 12:11
by andyjh122
Thanks allupinya,

No this is happening on both 80 and 443 and i don't have any other services running on those ports but apache.

did netstat -ao, and both ports are indeed apache...

thanks!

Re: Apache Port Is Always Changing

PostPosted: 17. December 2012 09:47
by allupinya
Is there any error message when you start httpd.exe from the command line?

Re: Apache Port Is Always Changing

PostPosted: 06. August 2014 10:28
by speziality
I had a similar problem,
but the port changing didn't start right away when I opened my localhost ,
it began as soon as I opened Wordpress in the browser (regular WP installation in the htdocs folder...),

I eventually found out it was related to the RSS plugin:
deactivating it and reactivating made the port switching problem disappear (same settings...)

I don't know why it was happening since the feed address was pointing to the same url it's pointing now...
but know everything's cool al usual,

if anybody has got an explanation please post otherwise good luck & success

Re: Apache Port Is Always Changing

PostPosted: 07. August 2014 11:26
by speziality
UPDATE:
once I finished the xampp session I left the WP configuration as it was in the beginning ...

when I reopened Xampp the problem came up again...

the only solution found so far is to deactivate - reactivate RSSplugin