Newbie problems

Matt Davies mjdavies at
Tue Mar 16 06:09:51 EDT 2010

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
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


all that shows in that log is

I, [2010-03-16T10:01:08.250818 #1824]  INFO -- : listening on addr= 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: "", 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.



More information about the mongrel-unicorn mailing list