Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to configure apache2 (it's configured inside Enfinity Suite), but something seems to go wrong with the configuration.

If I set:

Listen 86

It says:

(OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted.: make_sock: could not bind to address 0.0.0.0:86 no listening sockets available, shutting down

If I set:

Listen 127.0.0.1:86

It says:

(OS 10013) An attempt was made to access a socet in a way forbidden by its access pemissions. :make_sock: could not bind to address 127.0.0.1:86 no listening sockets available, shutting down

If I set a port higher than 450, lets say Listen 127.0.0.1:8080, it says:

(OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted.: make_sock: could not bind to address 0.0.0.0:450 no listening sockets available, shutting down

Can someone please clarify what's going on? (Some Windows policies?)

share|improve this question

migrated from superuser.com Oct 19 '10 at 20:38

This question came from our site for computer enthusiasts and power users.

    
You may want to post this at serverfault.com –  qroberts Oct 19 '10 at 17:12
    
@qroberts, PLEASE do not ask folks to repost their question. Questions will be moved automatically if applicable. Thanks! (Apart from that: Server Fault is for system administrators and IT professionals, people who manage or maintain computers in a professional capacity.) –  Arjan Oct 19 '10 at 19:39
    
@Arjan, thanks for editing) –  Denys S. Oct 19 '10 at 19:51

3 Answers 3

up vote 2 down vote accepted

Probably your apache process will run with an effective user different than the user starting it. Make sure, that the user starting it has the permission to create listening sockets (for ports <1024 this should only be root). Also make sure, that the port you want to use is not already taken (with netstat -an ).

It don't have a clue about the difference of the error messages.

share|improve this answer
    
The actual thing was that my administrator configured apache and started it (being a different user) so I had no chance binding to the same ports. Though I still don't get why while specifying 8080 apache tried 450. –  Denys S. Oct 27 '10 at 7:02

Yeah, you're supposed to start apache as root and it lowers its own rights, but it has to be root so it can bind to ports less than 1024 as mentioned above.

you can also try netstat -nap | grep LISTEN in linux and look for something listening on that port and the -p will tell you which program is already bound to that port. if not using linux, there are other tools like lsof that will tell you this information just not as cleanly.

share|improve this answer
    
The OP mentioned "Some windows policies" so this is probably Apache2 on Windows. –  sysadmin1138 Oct 27 '10 at 1:49
    
ahh right. Missed that. They can of course install cygwin. Solves all sorts of I-can't-do-that-in-windows-easily problems. :-) –  Stu Nov 8 '10 at 19:17

Those errors you're getting are from Winsock. A quick primer:

  • OS 10013: Access denied
  • OS 10048: Address already in use

You do need to be running Apache2 as an Administrator-equivalent user in order to bind to ports under 1000, but your attempt to bind to :8080 should have worked even as a normal user. It is possible that something else is camping that port and you got unlucky. You can find out what that is by running netstat -ano |find "LIST" from a cmd prompt (note that's not -anp like with Linux). That will give you the process ID of what's camping that port, which you can then look up in Task Manager.

An outside possibility is that what you're seeing is an attempt to launch Apache2 twice for some reason. The first instance correctly binds to the right ports, but the second instance can't because the first one is stuck on it. If this is the case, you may have some doubled-up log-files with timestamps really close together.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.