Snorby / snorby

Ruby On Rails Application For Network Security Monitoring
Other
1k stars 226 forks source link

OpenBSD: daemonize.rb:140:in `close': Bad file descriptor (Errno::EBADF) #286

Open antisnatchor opened 11 years ago

antisnatchor commented 11 years ago

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'

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?

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

antisnatchor commented 11 years ago

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

hostingnuggets commented 11 years ago

Cheers for the fix, nobody else cared about #191 and they simply closed it without even having replied to it... -1