olacabs / jackhammer

Jackhammer - One Security vulnerability assessment/management tool to solve all the security team problems.
https://jch.olacabs.com/userguide
Other
718 stars 162 forks source link

Jackhammer Web Dies Exit 1 (Mac OSX) #43

Open MindNinja opened 7 years ago

MindNinja commented 7 years ago

I am running the current version of Docker and just pulled and ran Jackhammer. I have a Mac, and when I do: sh ./docker-build.sh It seems to build properly but when I open a browser to http://localhost:5000 it can not connect. The docker-compose ps shows: Name Command State Ports

jackhammer-db docker-entrypoint.sh mysqld Up 0.0.0.0:3306->3306/tcp
jackhammer_redis_1 docker-entrypoint.sh redis ... Up 0.0.0.0:32770->6379/tcp jackhammer_web_1 bash -c mkdir -p tmp/pids ... Exit 1

I re-ran sh ./docker-build.sh as "sudo sh ./docker-build.sh" and it came up and ran. The web was available and it worked.

I shut down the docker and jackhammer and have tried every way from sunday today and it I get the exit 1 on the web and it never comes up fully (both as root and not).

MindNinja commented 7 years ago

Here is the logs file... Looks like it can't connect to the sqldb... What's the resolution?

Attaching to jackhammer_web_1, jackhammer-db, jackhammer_redis_1 web_1 | /root/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rb-readline-0.5.1/lib/readline.rb:458: warning: already initialized constant Readline::HISTORY web_1 | /root/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rb-readline-0.5.1/lib/readline.rb:486: warning: already initialized constant Readline::FILENAME_COMPLETION_PROC web_1 | /root/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rb-readline-0.5.1/lib/readline.rb:517: warning: already initialized constant Readline::USERNAME_COMPLETION_PROC web_1 | /root/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rb-readline-0.5.1/lib/readline.rb:523: warning: already initialized constant Readline::VERSION web_1 | rake aborted! web_1 | Mysql2::Error: Can't connect to MySQL server on 'mysqldb' (111) web_1 | /root/.rbenv/versions/2.3.0/bin/bundle:23:in load' web_1 | /root/.rbenv/versions/2.3.0/bin/bundle:23:in

' web_1 | Tasks: TOP => db:migrate web_1 | (See full trace by running task with --trace)

superdaigo commented 7 years ago

I faced the same issue. And here's my solution. https://github.com/olacabs/jackhammer/pull/42

MindNinja commented 7 years ago

Not sure what your actual solution is from looking at that thread?

With all regards and respect, Luke Stephens

Tek Security Group LLC Chief Bad Guy/President luke.stephens@teksecgrp.com/(c) 919-740-1850 Skype: thelukestephens - Facebook: /teksecgrp - Twitter: @teksecgrp www.teksecgrp.com - www.badguyfu.net We act bad, so bad things don't happen

On Wed, Jun 14, 2017 at 11:23 AM, Daigo Sakamoto notifications@github.com wrote:

I faced the same issue. And here's my solution.

42 https://github.com/olacabs/jackhammer/pull/42

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/olacabs/jackhammer/issues/43#issuecomment-308466342, or mute the thread https://github.com/notifications/unsubscribe-auth/AHwuM6xQeH5yYP6-oyYaLCRVjzAmuXLIks5sD_rsgaJpZM4N5-i0 .

superdaigo commented 7 years ago

It's a pull request, not just a thread. It will be solved once they merge my pull request. https://github.com/olacabs/jackhammer/pull/42/files

The reason of the error is connecting MySQL server before initializing it. I changed docker-build.sh script to wait for the initialization.

docker-compose exec mysqldb sh -c 'while ! mysqladmin ping --silent; do sleep 1; done'

Also, removed bundle exec rake db:migrate from docker-compose.yml is needed. Database migration should not be there.

I made another change that is removed RAILS_ENV=production due to duplication.

MindNinja commented 7 years ago

Man, they need to really get that in the build... It works! thank you!!

With all regards and respect, Luke Stephens

Tek Security Group LLC Chief Bad Guy/President luke.stephens@teksecgrp.com/(c) 919-740-1850 Skype: thelukestephens - Facebook: /teksecgrp - Twitter: @teksecgrp www.teksecgrp.com - www.badguyfu.net We act bad, so bad things don't happen

On Thu, Jun 15, 2017 at 12:56 AM, Daigo Sakamoto notifications@github.com wrote:

It's a pull request, not a thread. It will be solved once they merge my pull request. https://github.com/olacabs/jackhammer/pull/42/files

The reason of the error is connecting MySQL server before initializing it. I changed docker-build.sh script to wait for the initialization.

docker-compose exec mysqldb sh -c 'while ! mysqladmin ping --silent; do sleep 1; done'

Also, removing bundle exec rake db:migrate from docker-compose.yml is needed. Database migration should not be there.

I made another change that is removing RAILS_ENV=production due to duplication.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/olacabs/jackhammer/issues/43#issuecomment-308628647, or mute the thread https://github.com/notifications/unsubscribe-auth/AHwuMwkOrDnQhtmAuPB5eTHNeXaUD1j7ks5sELl3gaJpZM4N5-i0 .