Memcached Running as Root?
Hi,
I built Membase and am running as a non-root user. When I launch ns_server via start.sh, I get a message that memcached cannot run as root (without -u flag). However, I am NOT running as root. Why would I get this error message? Is there some configuration I need to do to indicate the user that is running?
Thank you.
-Jon
Hi Perry,
It looks like it is actually the rlimit problem for open files. I read on the forum that the solution is to edit:
/etc/security/limits.conf
to:
membase hard nofile 10240
membase hard core unlimited
On the x86 system I am using, I don't have write permissions for files in the etc directory. Is there another workaround to fix this?
Thank you.
-Jon
Jon, you built this from source right? I'll have to check, but I think those commands only come into play when using our pre-build binaries. They are exectued in the /etc/init.d/membase-server script which you likely don't have since you built from source and are not "installing" Membase on your system.
Can you send over the command that you're running and the error message that is being produced?
Hi Perry,
I'm running ./start.sh from the ns_server directory. The error message I'm getting is "failed to set rlimit for open files."
I am benchmarking a non-x86 machine against an x86. On the non-x86 I was getting the same error message (above) and was able to modify the file in /etc. This eliminated the error. However, on the x86 I don't have write permissions for the /etc directory. I built both of these (x86 and non x86) from source so it appears that it does in fact eliminate the error.
Are there any other workarounds?
-Jon
The rlimit is used for controlling how many open file descriptors (and therefore connections) the server can support. For testing purposes, you should be able to comment out the 'rlimit' command inside of start.sh and it will just use what the system has set for a default.
Let me know if that helps.
Perry
Hi Perry,
There is no rlimit command in the version of start.sh that I have.
start.sh only has the following
cd dirname $0
./start_shell.sh -noshell </dev/null
Could this be due to the fact that I built from source?
-Jon
I don't think it's because you built from source...but more than you're unable to modify the rlimits on your system.
There should be the rlimit command in the 'start_shell.sh' script?
Jon, can you send over the command that you're running and the error that you're getting?
Perry
Forum support is great for free but sometimes you need a guaranteed response time and dedicated resources for your questions or issues.
Consider purchasing enterprise-level support from Couchbase: http://www.couchbase.com/products-and-services/overview
Call or email "sales -at- couchbase-dot- com" today!