Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Membase | Membase Server 1.6.x

Memcached Running as Root?

7 replies [Last post]
  • Login or register to post comments
Mon, 02/14/2011 - 08:44
jon2718
Offline
Joined: 01/31/2011
Groups: None

 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

Top
  • Login or register to post comments
Mon, 02/14/2011 - 11:06
perry
Offline
Joined: 10/11/2010
Groups:

 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!

Top
  • Login or register to post comments
Mon, 02/14/2011 - 11:43
jon2718
Offline
Joined: 01/31/2011
Groups: None

 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

 

Top
  • Login or register to post comments
Mon, 02/14/2011 - 12:39
perry
Offline
Joined: 10/11/2010
Groups:

 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?

__________________

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!

Top
  • Login or register to post comments
Mon, 02/14/2011 - 13:13
jon2718
Offline
Joined: 01/31/2011
Groups: None

 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

Top
  • Login or register to post comments
Mon, 02/14/2011 - 14:09
perry
Offline
Joined: 10/11/2010
Groups:

 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

__________________

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!

Top
  • Login or register to post comments
Thu, 02/17/2011 - 11:16
jon2718
Offline
Joined: 01/31/2011
Groups: None

 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

Top
  • Login or register to post comments
Fri, 02/18/2011 - 17:01
perry
Offline
Joined: 10/11/2010
Groups:

 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?

__________________

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!

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker