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:

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.


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

  • 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. – Lanbo 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. – Lanbo 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

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

  • Apparmor doesn't seem to be installed. – Lanbo 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. – Lanbo Mar 30 '12 at 12:58

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.

  • Fun is, I can open the servers all right as Root, but not via the upstart job. – Lanbo Mar 30 '12 at 15:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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