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 quite a beginner with administration, and I've not had problems with my VPS before. But after having trouble with an upstart-bug, which I was able to solve, I had to reboot the system, and since then I cannot open any ports > 1000 any more, even with root.

I only need those for redis and mongodb, and only so my server can communicate with them locally (no outside listening). I get this error for mongodb, for example:

ERROR: listen(): bind() failed errno:99 Cannot assign requested address for socket: 127.0.0.1:27017

I haven't changed anything in the configs at all, merely installed the upstart patch. I don't even know how to find the actual problem.

Anyone can help me? I will provide additional logs or whatever if someone told me which.

share|improve this question
add comment

3 Answers

up vote 2 down vote accepted

Please try the following :

  • netstat -ap to see if something is listening on that port (27017)
  • you could go with "ps aux | grep mongodb " if the apllication is already oppened .

If the above doesn't work , please let me know on which OS is the host so that I can troubleshoot this better (aka use specific OS commands ).

Regards, Alex H

share|improve this answer
    
I've tried those. Mongo is not running and there's no other process hogging the port. Same with redis (port 6379). My OS is Ubuntu 12.04. –  Lambda Dusk Mar 30 '12 at 12:39
    
Can you try to start Mongo , then restart apache ? IF that doesn't work look In apache error.log to see if there is any error (maybe a php initialize/compile error ? that apeared after the upgrade ?). –  Alex H Mar 30 '12 at 13:00
    
I cannot start mongo at all, as it will not open the port. What it does is start, then tries to open the port, fails, shuts down. Also, I have no apache installed/running. Only a node.js server. –  Lambda Dusk Mar 30 '12 at 13:05
    
Do you get more details in /var/log/mongodb/server1.log (or where you have mapped the logs for mongo ? –  Alex H Mar 30 '12 at 13:20
    
To test that you can't open ports over 1000 can you try to start mongodb with another port ? It should be something like ./mongod --port 391 , and with another port over 27001 ? –  Alex H Mar 30 '12 at 13:26
show 3 more comments

It might be appamour.. try to put it into complain mode

sudo aa-complain /usr/sbin/mongod

Then reload appamour

sudo invoke-rc.d apparmor reload

Then try to start mongo

share|improve this answer
    
Apparmor doesn't seem to be installed. –  Lambda Dusk Mar 30 '12 at 12:46
    
is somehow selinux installed? dpkg -l | grep selinux –  Mike Mar 30 '12 at 12:51
    
There seems to be a libselinux1 installed, version 2.0.98-1.1. Nothing else matching. –  Lambda Dusk Mar 30 '12 at 12:58
add comment

You should try to find out what port is open and listening by:

netstat -ltn

this will show all opened ports for listening (TCP ports only) Now. If is there some port You want to close in order to open it on your own, You should enter this command (as superuser):

fuser -k <port>/tcp

replace with number you want to close. Try it and tell us how it is going.

Hope this help.

share|improve this answer
    
Fun is, I can open the servers all right as Root, but not via the upstart job. –  Lambda Dusk Mar 30 '12 at 15:30
add comment

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.