views:

70

answers:

0

Hi,

I fail to deploy my ruby (v1.8.7) rails (v2.3.5) application on Snow Leopard (10.6.3).

After "cap deploy", the Mongrel-cluster (v1.1.5) fails to start up with the following output in mongrel.*.log:

** Daemonized, any open files are closed.  Look at tmp/pids/mongrel.8000.pid and log/mongrel.8000.log for info.
** Starting Mongrel listening at 127.0.0.1:8000
** Initiating groups for "pixtur":"staff".
/Users/pixtur/.gem/ruby/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:63:in `initgroups': Invalid argument (Errno::EINVAL)
 from /Users/pixtur/.gem/ruby/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:63:in `change_privilege'
 from /Users/pixtur/.gem/ruby/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:144:in `listener'
 from /Users/pixtur/.gem/ruby/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:99:in `cloaker_'
 from /Users/pixtur/.gem/ruby/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:in `call'
 from /Users/pixtur/.gem/ruby/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:in `initialize'
 from /Users/pixtur/.gem/ruby/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in `new'
 from /Users/pixtur/.gem/ruby/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in `run'
 from /Users/pixtur/.gem/ruby/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in `run'
 from /Users/pixtur/.gem/ruby/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
 from /usr/bin/mongrel_rails:19:in `load'
 from /usr/bin/mongrel_rails:19

Manually starting the cluster (locally via ssh) with...

mongrel_rails start -C config/webserver/mongrel_cluster.yml

...works just fine.

The mongrel-config looks like this:

--- 
user: pixtur
cwd: /Users/pixtur/www/rapidfeedback/current
port: "8000"
environment: production
group: staff
address: 127.0.0.1

My deploy looks like this:

require 'mongrel_cluster/recipes'

set :application, "rapid_feedback"
set :mongrel_conf, "/Users/pixtur/www/rapidfeedback/current/config/webserver/mongrel_cluster.yml"
set :scm, :subversion
set :scm_user, "thmann"
set :scm_password, Proc.new { Capistrano::CLI.password_prompt("SVN 
password for #{scm_user}, please: ") } 
set :repository, Proc.new { "--username #{scm_user} --password #{scm_password} --no-auth-cache https://svni1.xxxxxxxxxxxxxxxxxxxxxxx/trunk" } 
set :deploy_to, "/Users/pixtur/www/rapidfeedback"
set :user, "pixtur"
set :use_sudo, true
set :uploaded_image_directory, "public/images/uploaded"
set :downloads_directory, "public/downloads"

default_run_options[:pty] = true


role :app, "xx-xxxx-macmini"
role :web, "xx-xxxx--macmini"
role :db,  "xx-xxxx--macmini", :primary => true

ssh_options[:keys] = %w( /Users/pixtur/.ssh/id_rsa )

after 'deploy:symlink', 'rapidfeedback:share:uploaded'

namespace :rapidfeedback do
  namespace :share do
    desc "Share the public thumbnail storage"
    task :uploaded do
      run "rm -rf #{current_path}/#{uploaded_image_directory}"
      run "ln -s #{shared_path}/#{uploaded_image_directory}  #{current_path}/#{uploaded_image_directory}"      
    end    

    desc "Setup all required cache directories"
    task :setup do
      run "mkdir -p #{shared_path}/#{uploaded_image_directory}"
    end
  end
end

I struggled quite a bit with this problem and googled for similar problems, but without success. Any hints, assumptions or suggestions, what this error might by related to, are very appreciated.

tom