Skip to content

./stack.sh fails to connect to mysql #1

@pablosjv

Description

@pablosjv

Hello, I'm new to OpenStack. I've been trying to use Dockstack to learn and test some small deployments. I think is a very cool idea to have a small dev environment in a container on your local machine 👍

I run first make build, which goes smoothly. Then I executed make run. It seems that the ./stack.sh command is failing when trying to connect to the database. I don't understand the ./stack.sh script, so I don't know what is happening. I put the output bellow:

+stack.sh:main:1008                        configure_database
+lib/database:configure_database:128       configure_database_mysql
+lib/databases/mysql:configure_database_mysql:61  local my_conf mysql slow_log
+lib/databases/mysql:configure_database_mysql:62  echo_summary 'Configuring and starting MySQL'
+stack.sh:echo_summary:433                 [[ -t 3 ]]
+stack.sh:echo_summary:433                 [[ True != \T\r\u\e ]]
+stack.sh:echo_summary:439                 echo -e Configuring and starting MySQL
2018-02-09 11:09:20.967 | Configuring and starting MySQL
+lib/databases/mysql:configure_database_mysql:64  is_ubuntu
+functions-common:is_ubuntu:462            [[ -z deb ]]
+functions-common:is_ubuntu:465            '[' deb = deb ']'
+lib/databases/mysql:configure_database_mysql:65  my_conf=/etc/mysql/my.cnf
+lib/databases/mysql:configure_database_mysql:79  is_fedora
+functions-common:is_fedora:435            [[ -z Ubuntu ]]
+functions-common:is_fedora:439            '[' Ubuntu = Fedora ']'
+functions-common:is_fedora:439            '[' Ubuntu = 'Red Hat' ']'
+functions-common:is_fedora:440            '[' Ubuntu = RedHatEnterpriseServer ']'
+functions-common:is_fedora:441            '[' Ubuntu = CentOS ']'
+functions-common:is_fedora:441            '[' Ubuntu = OracleServer ']'
+functions-common:is_fedora:442            '[' Ubuntu = Virtuozzo ']'
+lib/databases/mysql:configure_database_mysql:79  is_suse
+functions-common:is_suse:450              [[ -z Ubuntu ]]
+functions-common:is_suse:454              [[ Ubuntu =~ (openSUSE) ]]
+functions-common:is_suse:454              [[ Ubuntu == \S\U\S\E\ \L\I\N\U\X ]]
+lib/databases/mysql:configure_database_mysql:87  sudo mysqladmin -u root password secret
mysqladmin: connect to server at '127.0.0.1' failed
error: 'Can't connect to MySQL server on '127.0.0.1' (111)'
Check that mysqld is running on 127.0.0.1 and that the port is 3306.
You can check this by doing 'telnet 127.0.0.1 3306'
+lib/databases/mysql:configure_database_mysql:87  true
+lib/databases/mysql:configure_database_mysql:90  sudo mysql -uroot -psecret -h127.0.0.1 -e 'GRANT ALL PRIVILEGES ON *.* TO '\''root'\''@'\''%'\'' identified by '\''secret'\'';'
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)
+lib/databases/mysql:configure_database_mysql:1  exit_trap
+stack.sh:exit_trap:510                    local r=1
++stack.sh:exit_trap:511                    jobs -p
+stack.sh:exit_trap:511                    jobs=
+stack.sh:exit_trap:514                    [[ -n '' ]]
+stack.sh:exit_trap:520                    '[' -f /tmp/tmp.oZEVMePGQz ']'
+stack.sh:exit_trap:521                    rm /tmp/tmp.oZEVMePGQz
+stack.sh:exit_trap:525                    kill_spinner
+stack.sh:kill_spinner:424                 '[' '!' -z '' ']'
+stack.sh:exit_trap:527                    [[ 1 -ne 0 ]]
+stack.sh:exit_trap:528                    echo 'Error on exit'
Error on exit
+stack.sh:exit_trap:530                    type -p generate-subunit
+stack.sh:exit_trap:531                    generate-subunit 1518173927 634 fail
+stack.sh:exit_trap:533                    [[ -z /opt/stack/logs ]]
+stack.sh:exit_trap:536                    /devstack/tools/worlddump.py -d /opt/stack/logs
World dumping... see /opt/stack/logs/worlddump-2018-02-09-110921.txt for details
+stack.sh:exit_trap:545                    exit 1
Makefile:40: recipe for target 'run' failed
make: *** [run] Error 1

Thank you very much

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions