Welcome! Log In Create A New Profile

Advanced

getgrnam("root") failed

John Mccarthy
April 21, 2009 12:33AM
Hi, I'm a deployment newbie and ran into an error in my nginx config
file (pasted below). Any pointers are very much appreciated. I am
setting up NGINX on Mac OS 10.5.6 to test before deploying a Rails app
on an AWS Ubuntu Hardy ami. The error message is:

[emerg] 14296#0: getgrnam("root") failed in
/usr/local/nginx/conf/nginx.conf:1


My nginx.conf file looks like:

user root root;
worker_processes 4;

#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;

pid /usr/local/nginx/logs/nginx.pid;


events {
worker_connections 1024;
}


http {
include mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local]
$request '
'"$status" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /usr/local/nginx/logs/access.log main;

#sendfile on;
tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;

gzip on;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_proxied any;
gzip_disable "MSIE [1-6].(?!.*SV1)";
gzip_types text/plain text/html text/css application/x-javascript
text/xml application/xml application/xml+rss text/javascript;

include /etc/nginx/vhosts/*.conf;
}

-------------------------------------------------------------------------------


And my /etc/nginx/vhosts/site_name.conf looks like:

# Load balance to mongrels
upstream mongrel_cluster1 {
server 0.0.0.0:8040;
server 0.0.0.0:8041;
server 0.0.0.0:8042;
server 0.0.0.0:8043;
server 0.0.0.0:8044;
}

# Begin virtual host configuration
server {
listen 80;
server_name localhost;
root /Users/John/rails/site_name/public;
client_max_body_size 50M;
access_log /usr/local/nginx/logs/site_name.access.log main;
error_page 500 502 503 504 /50x.html;

# First rewrite rule for handling maintenance page
if (-f $document_root/system/maintenance.html) {
rewrite ^(.*)$ /system/maintenance.html last;
break;
}

location / {
index index.html index.htm;

# Forward info about the client and host
# Otherwise Rails app won't have access to it.
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_max_temp_file_size 0;

# Directly serve static content
location ~ ^/(images|javascripts|stylesheets)/ {
expires 10y;
}
if (-f $request_filename) {
break;
}

# Directly serve cached pages
if (-f $request_filename.html) {
rewrite (.*) $1.html break;
}

# Otherwise let Mongrel handle the request
if (!-f $request_filename) {
proxy_pass http://mongrel_cluster1;
break;
}
}

}

-------------------------------------------------------------------------------

Also, if I define two mongrel clusters, can I configure with an extra
proxy_pass statement as follows?:

upstream mongrel_cluster1 {
server 0.0.0.0:8040;
server 0.0.0.0:8041;
server 0.0.0.0:8042;

}
upstream mongrel_cluster2 {
server 0.0.0.0:8050;
server 0.0.0.0:8051;
server 0.0.0.0:8052;

}

# Otherwise let Mongrel handle the request
if (!-f $request_filename) {
proxy_pass http://mongrel_cluster1;
proxy_pass http://mongrel_cluster2;
break;
}


Thank you!,
John
--
Posted via http://www.ruby-forum.com/.
SubjectAuthorPosted

getgrnam("root") failed

John MccarthyApril 21, 2009 12:33AM

Re: RE: getgrnam("root") failed

Igor SysoevApril 21, 2009 03:12AM

Re: RE: getgrnam("root") failed

John MccarthyApril 21, 2009 02:07AM

Re: RE: getgrnam("root") failed

John MccarthyApril 21, 2009 01:38AM

RE: getgrnam("root") failed

AMP AdminApril 21, 2009 01:05AM

Logs Assistance

AMP AdminApril 21, 2009 01:30PM

Re: Logs Assistance

Igor SysoevApril 21, 2009 04:34PM

RE: Logs Assistance

AMP AdminApril 21, 2009 05:00PM

Re: Logs Assistance

Igor SysoevApril 22, 2009 07:50AM

RE: Logs Assistance

AMP AdminApril 22, 2009 09:53AM

Re: Logs Assistance

Igor SysoevApril 22, 2009 09:56AM

RE: Logs Assistance

AMP AdminApril 22, 2009 10:39AM

Re: Logs Assistance

Igor SysoevApril 22, 2009 10:45AM

RE: Logs Assistance

AMP AdminApril 22, 2009 11:47AM

Re: Logs Assistance

Igor SysoevApril 22, 2009 12:26PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 77
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 229 on August 01, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready