[Webinar] Learn how to a build a cloud-first strategyRegister Now


Apachi Error  OS10048 (Port and IP address issue)

Posted on 2007-10-05
Medium Priority
Last Modified: 2008-01-09
I have the following error on starting Apachi, I am aware that I must change the port however what do I change the IP address to?  

<OS 10048>Only one usage of each socket address (protocal/network address/port) is
normally permitted. :make_sock: could not bind to address no listening
sockets available, shutting down.
Unable to open logs

NOTE: My PC is for development only and not a web server.
Question by:Ryan Bayne
  • 5
  • 4

Expert Comment

ID: 20022786
The IP address is telling us that apache is binding to all unassigned address at port 80. Try making the IP address in your httpd.conf file and then restart apache. The line should be similiar to this: Listen so you would change it to Listen
LVL 15

Expert Comment

ID: 20024079
what is your OS/Version?

Is is possible to see what is the current apache config for "Listen" directive.

recommendation from namol would cause Apache to start and would listen on (loopback), which should work if you are working on the server itself.  but if you are working a separate machine, then you may not be able to connect to apache.

by default the configuration should have:
Listen 80  

which would cause apache to bind to port 80/tcp on all active network interfaces running tcp/ip.


Author Comment

by:Ryan Bayne
ID: 20024322
I'm using XP and using Apachi and PHP for development and testing on this computer only. The files are uploaded to the server later. The apachi symbol should show in the tray yes because sometimes when I change the port to a random number and Start it I do not get an error yet I do not have that try icon.

This is the only two lines with one of them not active I changed the port to random numbers but it doesnt seem...
Listen 80

So is it a must that it uses port 80 I need to find out whats using that port and stop it but then what if that program needs port 80!
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

LVL 15

Expert Comment

ID: 20024464
>> #Listen
this would tells apache to bind to port 80/tcp on IP address  should be fine if your machine had a fix ip.  otherwise may cause problem if your ip is coming from DHCP.

>> Listen 80
would tell apache to listen to port 80/tcp on all active interface.

if apache failed to start -- the apache monitor in your windows stytray is shodwing red, then open a dos prompt, and do a "telnet localhost 80" assuming that your apache is running on port 80.

you should get a blank screen.  if any program is running on port 80.  otherwise you would get error:
Connecting To localhost...Could not open a connection to host on port 80 : Connect failed

alternately you could do a "netstat -n" to view the network connection:

  Proto  Local Address          Foreign Address        State
  TCP          TIME_WAIT

* in my case I had apache running (Listen 80 in the config file)

Or you could grab TCPview tool from microsoft -- which would let you see active program and any network connection.  nice tool.


Author Comment

by:Ryan Bayne
ID: 20027928
I'll bump the points up a little once again.
TCPView doesnt show port 80 being used or any port under a 4 digit number!

Could my error message be caused by something else. I would not have thought it would be this difficult to install and use a program on the same machine.
LVL 15

Expert Comment

ID: 20028236
no issue with the points.  however, bigger pts would lure more help. pts are like 'rewards' here :)

well I am a bit puzzled too.  Do you have Windows firewall running that may be preventing apache to bind to port 80.  If you do had it running, disable it for a while, or add exclusion to allow apache to listen on port 80.

I had ran apache on XPSP2 on a number of machine and so far things are good -- never ran into this kind of issue.

any other application/services that may be running -- firewall, antivirus, vpn client, etc.

Personally, I would try to reinstall.  I knew that this may not be a favorable choice sometimes, but it would be useful to ensure that we start from scratch.



Author Comment

by:Ryan Bayne
ID: 20028394
Ye I did consider reinstallation I just get the feeling thats not it. I do have a firewall running but then I assumed because I'm only developing on this machine and using Apachi PHP MySQL for development and testing that firewalls or my router to go even further, would not be an issue.

I'll go into all that see what happens when they are disabled thanks for the advice.
LVL 15

Accepted Solution

samri earned 1040 total points
ID: 20028572

if the firewall is on a separate device/machine, then it should not contribute to this problem.

I ran a search on Google - http://www.google.com/search?q=OS+10048+xp+apache+%22could+not+bind%22&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a

and followed two links -- which mentioned something about Skype.


If this may be related, or maybe other software that behave in similar manner -- so alternative would be to reconfigure that offending software to use different port (anything other than 80/tcp.  Or, get Aapche to Listen to different port.  

If you could not find the culprit -- then you need to sort out with setting apache to Listen to other port then -- let say "Listen 90".  This would not be too much issue with your development -- hopefully your web codes are using relative linking.  So instead of typing http://localhost/, now you need to use http://localhost:90/ (if port 90 is being used).

give it a go.


Author Comment

by:Ryan Bayne
ID: 20028777
OK One last question then I think we might be able to wrap this up/

http://localhost:90  allows Apachi to run START without error, but still the icon is not in the tray so thats a problem but that directory appears in the brower with the list of files so maybe its not!

PHP files display as '?' is this a problem with my PHP configuration because if so the
 http://localhost:90  is good and I'll dish out the points lol
LVL 15

Expert Comment

ID: 20029876
assuming that you had apache installed with the default option.  It would be installed in the following folder "C:\Program Files\Apache Software Foundation\Apache2.2"

Look in the folder "C:\Program Files\Apache Software Foundation\Apache2.2\bin"

there should be a file named "ApacheMonitor.exe"

Run this file -- this is the icon that you would have in the windows systray.

Copy or create a link to this file to your Startup folder to make ApacheMonitor to be running every time you login to the machine.

you could copy/shortcut into "C:\Documents and Settings\All Users\Start Menu\Programs\Startup" so that any user who logged in would get the icon.

the PHP portion -- are you saying you are seeing the PHP code instead of the "result" from the php?  if this is the case, probably the PHP setup/configuration is the problem.  relook at that.  THe readme that comes with PHP should give you some idea on how to setup apache and php together.



Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

865 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question