* Newbie problems
@ 2010-03-16 10:09 Matt Davies
2010-03-16 18:10 ` Eric Wong
0 siblings, 1 reply; 2+ messages in thread
From: Matt Davies @ 2010-03-16 10:09 UTC (permalink / raw)
To: mongrel-unicorn
Hello everyone
I'm trying out Unicorn at the moment, I've used nginx and passenger extensively for some time now but I fancy a change :-).
Here's the specs
nginx version: nginx/0.7.65
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.2.0]
unicorn (0.97.0)
rails 2.3.5
bundler 0.9.7
When I run unicorn_rails from within the app root it all starts fine, and nginx proxies the requests over to unicorn, all hunky dorey.
But, I can't get unicorn to start properly with a config file, even if the file is empty.
Here's the error I'm getting back when trying to start unicorn_rails
sudo unicorn_rails -c /path/to/unicorn.rb -E production -D -d
{:app=>
#<Proc:0x000000010118dd80@/usr/local/lib/ruby/gems/1.8/gems/unicorn-0.97.0/bin/unicorn_rails:120>,
:unicorn_options=>
{:config_file=>"/path/to/unicorn.rb",
:listeners=>[]},
:daemonize=>true}
Exception `Errno::EEXIST' at /usr/local/lib/ruby/1.8/fileutils.rb:243 - File exists - tmp/cache
Exception `Errno::EEXIST' at /usr/local/lib/ruby/1.8/fileutils.rb:243 - File exists - tmp/pids
Exception `Errno::EEXIST' at /usr/local/lib/ruby/1.8/fileutils.rb:243 - File exists - tmp/sessions
Exception `Errno::EEXIST' at /usr/local/lib/ruby/1.8/fileutils.rb:243 - File exists - tmp/sockets
Exception `EOFError' at /usr/local/lib/ruby/gems/1.8/gems/unicorn-0.97.0/lib/unicorn/launcher.rb:45 - end of file reached
master failed to start, check stderr log for details
I've switched logging on in the config file like so
logger Logger.new("log/unicorn.log")
all that shows in that log is
I, [2010-03-16T10:01:08.250818 #1824] INFO -- : listening on addr=0.0.0.0:8080 fd=5
Nginx however is throwing this error
2010/03/16 09:21:42 [error] 1539#0: *1 kevent() reported that connect() failed (61: Connection refused) while connecting to upstream, client: ipaddress, server: machinename, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "machinename"
I'm sure I must be doing something very silly, I've searched the mailing list but can't find anything that is specific to this issue.
If anyone can help I'd be most appreciative.
Regards
Matt
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Newbie problems
2010-03-16 10:09 Newbie problems Matt Davies
@ 2010-03-16 18:10 ` Eric Wong
0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2010-03-16 18:10 UTC (permalink / raw)
To: unicorn list
Matt Davies <mjdavies@glam.ac.uk> wrote:
> Hello everyone
>
> I'm trying out Unicorn at the moment, I've used nginx and passenger extensively for some time now but I fancy a change :-).
>
> Here's the specs
>
> nginx version: nginx/0.7.65
> ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.2.0]
> unicorn (0.97.0)
> rails 2.3.5
> bundler 0.9.7
>
> When I run unicorn_rails from within the app root it all starts fine, and nginx proxies the requests over to unicorn, all hunky dorey.
>
> But, I can't get unicorn to start properly with a config file, even if the file is empty.
>
> Here's the error I'm getting back when trying to start unicorn_rails
>
> sudo unicorn_rails -c /path/to/unicorn.rb -E production -D -d
> {:app=>
> #<Proc:0x000000010118dd80@/usr/local/lib/ruby/gems/1.8/gems/unicorn-0.97.0/bin/unicorn_rails:120>,
> :unicorn_options=>
> {:config_file=>"/path/to/unicorn.rb",
> :listeners=>[]},
> :daemonize=>true}
> Exception `Errno::EEXIST' at /usr/local/lib/ruby/1.8/fileutils.rb:243 - File exists - tmp/cache
> Exception `Errno::EEXIST' at /usr/local/lib/ruby/1.8/fileutils.rb:243 - File exists - tmp/pids
> Exception `Errno::EEXIST' at /usr/local/lib/ruby/1.8/fileutils.rb:243 - File exists - tmp/sessions
> Exception `Errno::EEXIST' at /usr/local/lib/ruby/1.8/fileutils.rb:243 - File exists - tmp/sockets
> Exception `EOFError' at /usr/local/lib/ruby/gems/1.8/gems/unicorn-0.97.0/lib/unicorn/launcher.rb:45 - end of file reached
> master failed to start, check stderr log for details
Hi Matt,
Was there anything else in the stderr output? Does starting
unicorn_rails without "-D" work (or show you more info)? Daemonizing
will redirect stderr to /dev/null unless you explicitly set
"stderr_path" in your config file.
> I've switched logging on in the config file like so
>
> logger Logger.new("log/unicorn.log")
>
> all that shows in that log is
>
> I, [2010-03-16T10:01:08.250818 #1824] INFO -- : listening on addr=0.0.0.0:8080 fd=5
If your application fails to load, the application probably spews
the error messages to stderr instead of the Unicorn logger, which
is only for Unicorn-only messages.
> Nginx however is throwing this error
>
> 2010/03/16 09:21:42 [error] 1539#0: *1 kevent() reported that connect() failed (61: Connection refused) while connecting to upstream, client: ipaddress, server: machinename, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "machinename"
Try getting more info out of stderr first, since there appears to
be a problem with the startup.
But after that, what happens when you hit http://127.0.0.1:8080/ with
curl from that host?
> I'm sure I must be doing something very silly, I've searched the mailing list but can't find anything that is specific to this issue.
No worries. Also, if you leave out the -D switch, you can try
truss/strace/dtrace-ing the process if you still don't get enough
information.
--
Eric Wong
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-03-16 18:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-16 10:09 Newbie problems Matt Davies
2010-03-16 18:10 ` Eric Wong
Code repositories for project(s) associated with this public inbox
https://yhbt.net/unicorn.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).