getgrnam("root") failed

John Mccarthy lists at ruby-forum.com
Tue Apr 21 10:07:44 MSD 2009


John Mccarthy wrote:
> AMP Admin wrote:
>> Prolly shouldn't run this as root.
>> 
>> My guess would be to change user root root; to user nginx nginx; and see 
>> what happens.
> 
> 
> 
> 
> Thanks for the response.  It seems the problem was that on my Mac there 
> was no group 'root', so I put 'wheel' and nginx starts up.
> 
>> Prolly shouldn't run this as root.
> 
> Yeah, It seems that AWS only lets you SSH in to an EC2 instance as root, 
> so all of my capistrano code checkouts happen under root, so then my 
> mongrels need to be run as root so they can write to log files/folders. 
> I guess I can customize the cap task to switch user after SSH and before 
> checking out the repository.
> 
> Since I need to sudo /usr/local/nginx/sbin/nginx to start nginx, won't 
> that run it as root?
> 
> Using the same configuration, I get a 502 error when navigating to 
> http://localhost
> 
> The error log look like the following for each request:
> 2009/04/21 01:30:21 [error] 14504#0: *20 kevent() reported that 
> connect() failed (61: Connection refused) while connecting to upstream, 
> client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", 
> upstream: "http://0.0.0.0:8082/", host: "localhost:80"
> 2009/04/21 01:30:21 [error] 14504#0: *20 kevent() reported that 
> connect() failed (61: Connection refused) while connecting to upstream, 
> client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", 
> upstream: "http://0.0.0.0:8080/", host: "localhost:80"
> 2009/04/21 01:30:21 [error] 14504#0: *20 kevent() reported that 
> connect() failed (61: Connection refused) while connecting to upstream, 
> client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", 
> upstream: "http://0.0.0.0:8081/", host: "localhost:80"
> 2009/04/21 01:30:21 [error] 14504#0: *20 no live upstreams while 
> connecting to upstream, client: 127.0.0.1, server: localhost, request: 
> "GET / HTTP/1.1", upstream: "http://mongrel_cluster1/", host: 
> "localhost:80"
> 
> I get the nginx 502 Bad Gateway page.



I found the error.  In my mongrel_cluster.yml configuration file, I 
specified the address as localhost, instead of 0.0.0.0.

Thanks for your help!,
John
-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list