From: Eric Wong <normalperson@yhbt.net>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Subject: Re: Newbie problems
Date: Tue, 16 Mar 2010 18:10:28 +0000 [thread overview]
Message-ID: <20100316181028.GA20824@dcvr.yhbt.net> (raw)
In-Reply-To: <8EF8E22C-951C-481E-B539-9226CB4CBA1E@glam.ac.uk>
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
prev parent reply other threads:[~2010-03-16 18:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-16 10:09 Newbie problems Matt Davies
2010-03-16 18:10 ` Eric Wong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/unicorn/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100316181028.GA20824@dcvr.yhbt.net \
--to=normalperson@yhbt.net \
--cc=mongrel-unicorn@rubyforge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).