mubix / WhiteChapel

password cracking front end
58 stars 21 forks source link

OSX Support Broken? #4

Open noncetonic opened 11 years ago

noncetonic commented 11 years ago

Here's what I get when running ruby app.rb

/Users/connection/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:762:in initialize': Connection refused - connect(2) (Errno::ECONNREFUSED) from /Users/connection/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:762:inopen' from /Users/connection/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:762:in block in connect' from /Users/connection/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/timeout.rb:54:intimeout' from /Users/connection/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/timeout.rb:99:in timeout' from /Users/connection/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:762:inconnect' from /Users/connection/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:755:in do_start' from /Users/connection/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net/http.rb:744:instart' from /Users/connection/.rvm/gems/ruby-1.9.3-p194/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in transmit' from /Users/connection/.rvm/gems/ruby-1.9.3-p194/gems/rest-client-1.6.7/lib/restclient/request.rb:64:inexecute' from /Users/connection/.rvm/gems/ruby-1.9.3-p194/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in execute' from /Users/connection/.rvm/gems/ruby-1.9.3-p194/gems/rest-client-1.6.7/lib/restclient.rb:84:indelete' from /Users/connection/.rvm/gems/ruby-1.9.3-p194/gems/tire-0.5.4/lib/tire/http/client.rb:35:in delete' from /Users/connection/.rvm/gems/ruby-1.9.3-p194/gems/tire-0.5.4/lib/tire/index.rb:25:indelete' from app.rb:29:in block (2 levels) in <main>' from /Users/connection/.rvm/gems/ruby-1.9.3-p194/gems/tire-0.5.4/lib/tire/index.rb:8:ininstance_eval' from /Users/connection/.rvm/gems/ruby-1.9.3-p194/gems/tire-0.5.4/lib/tire/index.rb:8:in initialize' from /Users/connection/.rvm/gems/ruby-1.9.3-p194/gems/tire-0.5.4/lib/tire/dsl.rb:102:innew' from /Users/connection/.rvm/gems/ruby-1.9.3-p194/gems/tire-0.5.4/lib/tire/dsl.rb:102:in index' from app.rb:28:inblock in

' from /Users/connection/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.3/lib/sinatra/base.rb:1306:in class_eval' from /Users/connection/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.3/lib/sinatra/base.rb:1306:inhelpers' from /Users/connection/.rvm/gems/ruby-1.9.3-p194/gems/sinatra-1.3.3/lib/sinatra/base.rb:1660:in block (2 levels) in delegate' from app.rb:22:in
'

Contents of my elastic.rb are just a copy of the example config

mandreko commented 11 years ago

It looks like it's having issues connecting to your elasticsearch database perhaps. Have you made sure elasticsearch is installed and running?

On OSX, you can 'brew install elasticsearch', and then to run it on demand, "launchctl load ~/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist"

mubix commented 11 years ago

@mandreko thanks for the assist, will add those to the readme!

mubix commented 11 years ago

@connection did this solve your issue?

noncetonic commented 11 years ago

This works now although elasticsearch does not automatically start on login :

On Mountain Lion Running "launchctl load ~/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist" gives me the following:

launchctl: Couldn't stat("/Users/connection/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist"): No such file or directory nothing found to load

noncetonic commented 11 years ago

Alright found the cause of this so I'm posting here for adding into the readme. After installing elastic search through homebrew you need to run the following command to create the appropriate symlink to the elasticsearch plist file:

ln -sfv /usr/local/opt/elasticsearch/*.plist ~/Library/LaunchAgents

mandreko commented 11 years ago

Very interesting. I did not have to do that, as the installation of elastic search seemed to do it for me. I wonder why they are different.

mrmanc commented 10 years ago

I just found I had to perform the linking myself with elasticsearch v1.0.1, but after carefully reading the output of brew install elasticsearch it does say that the link command should be called before using launchctl.

To have launchd start elasticsearch at login:
    ln -sfv /usr/local/opt/elasticsearch/*.plist ~/Library/LaunchAgents
Then to load elasticsearch now:
    launchctl load ~/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist

Including the error I got to aid people searching for a fix.

$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist
launchctl: Couldn't stat("/Users/mark/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist"): No such file or directory
nothing found to load