Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mysql2::Error: Can't connect to MySQL server on 'mysqldb' #99

Open
harie0x opened this issue May 18, 2018 · 1 comment
Open

Mysql2::Error: Can't connect to MySQL server on 'mysqldb' #99

harie0x opened this issue May 18, 2018 · 1 comment

Comments

@harie0x
Copy link

harie0x commented May 18, 2018

I had done the fresh installation of jackhammer in kali linux latest version and i see the following error after the installation.

root@kali:~/jackhammer# docker logs -f jackhammer_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
/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
/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
/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
rake aborted!
Mysql2::Error: Can't connect to MySQL server on 'mysqldb' (111)
/root/.rbenv/versions/2.3.0/bin/bundle:23:in load' /root/.rbenv/versions/2.3.0/bin/bundle:23:in

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

oot@kali:~/jackhammer# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
fe6a8bd8570b jackhammer_web "figlet -k -w 500 ..." 34 seconds ago Exited (0) 32 seconds ago jackhammer_web_run_4
8b279a5c244c jackhammer_web "rake db:seed" 38 seconds ago Exited (7) 35 seconds ago jackhammer_web_run_3
5ef4dfe86cbd jackhammer_web "rake db:migrate" 42 seconds ago Exited (7) 40 seconds ago jackhammer_web_run_2
d6f40d1c76ee jackhammer_web "rake db:create" 48 seconds ago Exited (7) 44 seconds ago jackhammer_web_run_1
90d829bdace5 jackhammer_web "bash -c 'mkdir -p..." 51 seconds ago Exited (1) 14 seconds ago jackhammer_web_1
8accdcd59ebf redis "docker-entrypoint..." 53 seconds ago Up 51 seconds 0.0.0.0:32768->6379/tcp jackhammer_redis_1
70aa9f035387 mysql "docker-entrypoint..." 53 seconds ago Up 13 seconds (health: starting) 0.0.0.0:3306->3306/tcp jackhammer-db
a8fcf2d5f9ab ff7dec5fe3d4 "/bin/sh -c 'wget ..." About an hour ago Exited (8) 36 minutes ago quirky_cray

---> Running in 3525fb0259c6
---> 2134a8974b52
Removing intermediate container 3525fb0259c6
Step 49/50 : WORKDIR /home/app
---> c1b5a2fdb3a1
Removing intermediate container 929695f41507
Step 50/50 : EXPOSE 3000
---> Running in 562f48db353f
---> 6cb5f780d22a
Removing intermediate container 562f48db353f
Successfully built 6cb5f780d22a
Successfully tagged jackhammer_web:latest
WARNING: Image for service web was built because it did not already exist. To rebuild this image you must use docker-compose build or docker-compose up --build.
Creating jackhammer_redis_1 ... done
Creating jackhammer-db ... done
Creating jackhammer_web_1 ... done
Starting jackhammer_redis_1 ... done
Starting jackhammer-db ... done

Could not find gem 'mocha (> 0.14.0)' in any of the gem sources listed in your Gemfile.
Run bundle install to install missing gems.
Starting jackhammer_redis_1 ... done
Starting jackhammer-db ... done
Could not find gem 'mocha (
> 0.14.0)' in any of the gem sources listed in your Gemfile.
Run bundle install to install missing gems.
Starting jackhammer_redis_1 ... done
Starting jackhammer-db ... done
Could not find gem 'mocha (~> 0.14.0)' in any of the gem sources listed in your Gemfile.
Run bundle install to install missing gems.
Starting jackhammer-db ... done
Starting jackhammer_redis_1 ... done

@kmadhusudhan
Copy link
Contributor

mysql docker take sometime to come up.please wait sometime and run sh docker-build.sh again it will work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants