Open antisnatchor opened 11 years ago
Ah, my issue looks similar to this one, which was closed but not solved (I think?): https://github.com/Snorby/snorby/issues/191
I've managed to find a way to fix this, downgrading the daemons version:
changed GemFile with: gem 'daemons', '~> 1.0.10'
This version of daemons is fine as Thin requires daemons >= 1.0.9.
Then run: bundle update daemons
Then running again: RAILS_ENV=production bundle exec rake snorby:setup
there are not errors anymore, and I can run: bundle exec rails server -e production
Cheers for the fix, nobody else cared about #191 and they simply closed it without even having replied to it... -1
Trying to run configure snorby 2.6.1 on OpenBSD 5.x, with ruby 1.9.3.
-bash-4.2$ RAILS_ENV=production bundle exec rake snorby:setup Jammit Warning: Asset compression disabled -- Java unavailable. No time_zone specified in snorby_config.yml; detected time_zone: GB 53545e3e4c5cxxxxxxxxxa6a6dd52fd76f2 ERROR 1007 (HY000) at line 1: Can't create database 'snorby'; database exists [datamapper] Finished auto_upgrade! for :default repository 'snorby'
write': closed stream (IOError) from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active_support/buffered_logger.rb:109:in
block (2 levels) in flush' from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active_support/buffered_logger.rb:108:ineach' from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active_support/buffered_logger.rb:108:in
block in flush' from internal:prelude:10:insynchronize' from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active_support/buffered_logger.rb:107:in
flush' from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.1.12/lib/rails/application/bootstrap.rb:40:inblock (2 levels) in <module:Bootstrap>' /usr/local/lib/ruby/gems/1.9.1/gems/daemons-1.1.9/lib/daemons/daemonize.rb:140:in
close': Bad file descriptor (Errno::EBADF) from /usr/local/lib/ruby/gems/1.9.1/gems/daemons-1.1.9/lib/daemons/daemonize.rb:140:inblock in close_io' from /usr/local/lib/ruby/gems/1.9.1/gems/daemons-1.1.9/lib/daemons/daemonize.rb:138:in
each' from /usr/local/lib/ruby/gems/1.9.1/gems/daemons-1.1.9/lib/daemons/daemonize.rb:138:inclose_io' from /usr/local/lib/ruby/gems/1.9.1/gems/daemons-1.1.9/lib/daemons/daemonize.rb:75:in
call_as_daemon' from /usr/local/lib/ruby/gems/1.9.1/gems/daemons-1.1.9/lib/daemons/application.rb:259:instart_proc' from /usr/local/lib/ruby/gems/1.9.1/gems/daemons-1.1.9/lib/daemons/application.rb:296:in
start' from /usr/local/lib/ruby/gems/1.9.1/gems/daemons-1.1.9/lib/daemons/controller.rb:70:inrun' from /usr/local/lib/ruby/gems/1.9.1/gems/daemons-1.1.9/lib/daemons.rb:197:in
block in run_proc' from /usr/local/lib/ruby/gems/1.9.1/gems/daemons-1.1.9/lib/daemons/cmdline.rb:109:incall' from /usr/local/lib/ruby/gems/1.9.1/gems/daemons-1.1.9/lib/daemons/cmdline.rb:109:in
catch_exceptions' from /usr/local/lib/ruby/gems/1.9.1/gems/daemons-1.1.9/lib/daemons.rb:196:inrun_proc' from /usr/local/lib/ruby/gems/1.9.1/gems/delayed_job-2.1.4/lib/delayed/command.rb:81:in
run_process' from /usr/local/lib/ruby/gems/1.9.1/gems/delayed_job-2.1.4/lib/delayed/command.rb:75:inblock in daemonize' from /usr/local/lib/ruby/gems/1.9.1/gems/delayed_job-2.1.4/lib/delayed/command.rb:73:in
times' from /usr/local/lib/ruby/gems/1.9.1/gems/delayed_job-2.1.4/lib/delayed/command.rb:73:indaemonize' from /home/suricata/snorby-2.6.1/script/delayed_job:5:in
my snorby_config.yaml is: development: domain: localhost:3000 wkhtmltopdf: /usr/local/bin/wkhtmltopdf mailer_sender: 'snorby@snorby.org'
test: domain: localhost:3000 wkhtmltopdf: /usr/local/bin/wkhtmltopdf mailer_sender: 'snorby@snorby.org'
production: domain: 'demo.snorby.org' wkhtmltopdf: /usr/local/bin/wkhtmltopdf mailer_sender: 'snorby@snorby.org'
my database.yaml config is: snorby: &snorby adapter: mysql username: "snorby" password: "xyz" host: localhost
production: database: snorby <<: *snorby
Can you please help me understand what is going on?