Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Starting service mongodb fail on Permission denied: "/sys/devices/system/node/node1"

Tags:

mongodb

i got a problem with mongo on a ubuntu server precise 12.04, after apt-get install mongodb-10gen, when i try "mongo", got this error :

terminate called after throwing an instance of 'boost::filesystem3::filesystem_error'
what():  boost::filesystem::status: Permission denied: "/sys/devices/system/node/node1"
Aborted

I tried to look "/sys/devices/system/node/node1" permissions but it seems not to exist.

Anyone got an idea?

like image 869
Rfeigen Avatar asked Aug 24 '13 08:08

Rfeigen


3 Answers

Did you install on a OVH server?

I had the same issue today, and it turned out to be a kernel issue (I chose a "approved by OVH kernel"). Installing a stock Ubuntu kernel solved the issue.

like image 87
Simon Avatar answered Nov 14 '22 14:11

Simon


I had the same issue on an OVH server, but I didn't want to reinstall with another kernel...

My workaround was to create a group "sysfs" and add "mongodb" user to this group.

Then I did several "chgrp sysfs ..." and "chmod g+rx ..." so that sysfs group can have read access to the directories needed by mongodb:

  • /sys/devices/system/node
  • /sys/dev/block/
  • /sys/devices/virtual/block/md1/queue

Indeed /sys/devices/system/node/node1 doesn't exist, but read access on /sys/devices/system/node was enough.

Note the "mongo" client has the same restriction, so all the users who need it must be added to "sysfs" group as well.

like image 8
cyril Avatar answered Nov 14 '22 14:11

cyril


I had the same issue with an OVH debian and solved the problem in a surprisingly simple way: chmod 755 on /sys/devices/system/node/node1 and parent directories.

like image 2
Nytux Avatar answered Nov 14 '22 14:11

Nytux