Ask Your Question
0

devstack install fails with mysql connection refused

asked 2017-03-20 11:37:37 -0500

karntol gravatar image

updated 2017-03-20 16:08:31 -0500

Hi,

I am banging my head on this problem.

I am following this process on an utterly clean Ubuntu xenial VM. I have created a vagrant machine.

Then I followed this process to install everything on the VM: https://docs.openstack.org/developer/devstack/ (https://docs.openstack.org/developer/...)

I have added an extra line in the local.conf:

FIXED_RANGE=10.0.0.0/24

The error while running stack.sh is this:

+lib/databases/mysql:recreate_database_mysql:56  local db=glance
+lib/databases/mysql:recreate_database_mysql:57  mysql -uroot -psecret -h127.0.0.1 -e 'DROP DATABASE IF EXISTS glance;'
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:recreate_database_mysql:1  exit_trap
+./stack.sh:exit_trap:487                  local r=1
++./stack.sh:exit_trap:488                  jobs -p
+./stack.sh:exit_trap:488                  jobs=
+./stack.sh:exit_trap:491                  [[ -n '' ]]
+./stack.sh:exit_trap:497                  kill_spinner
+./stack.sh:kill_spinner:383               '[' '!' -z '' ']'
+./stack.sh:exit_trap:499                  [[ 1 -ne 0 ]]
+./stack.sh:exit_trap:500                  echo 'Error on exit'
Error on exit
+./stack.sh:exit_trap:501                  generate-subunit 1490014762 1437 fail
+./stack.sh:exit_trap:502                  [[ -z /opt/stack/logs ]]
+./stack.sh:exit_trap:505                  /home/stack/devstack/tools/worlddump.py -d /opt/stack/logs
World dumping... see /opt/stack/logs/worlddump-2017-03-20-132319.txt for details
+./stack.sh:exit_trap:511                  exit 1

When I lookup that function recreate_database_mysql , line 57, I see two mysql calls in there. When I run them by hand, they run fine.

I was about to learn openstack but I can't continue for the last two days and this is really irritating.

local.conf:

stack@ubuntu-xenial:~/devstack$ cat local.conf 
[[local|localrc]]
ADMIN_PASSWORD=secret
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD

FIXED_RANGE=10.0.0.0/24

manually it works fine:

stack@ubuntu-xenial:~/devstack$ mysql -uroot -psecret -h127.0.0.1 -e 'show databases'
mysql: [Warning] Using a password on the command line interface can be insecure.
+--------------------+
| Database           |
+--------------------+
| information_schema |
| keystone           |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
edit retag flag offensive close merge delete

Comments

can someone help out here, I am really waiting for it and I can't continue.. :(

karntol gravatar imagekarntol ( 2017-03-20 15:18:30 -0500 )edit

So installed mysql manually?

Karthik Prasad gravatar imageKarthik Prasad ( 2017-03-21 05:46:07 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2017-03-21 06:35:29 -0500

vgeorga gravatar image

Well, if it's not the first time you're trying to install DevStack, ./unstack.sh doesn't remove MySQl data and that sometimes can't result to errors during re-installations.

I would suggest trying:

1) ./clean.sh 2) ./unstack.sh 3) ./stack.sh

The clean.sh script will remove all packages installed by ./stack.sh during previous installations so your next installation will begin from scratch (re-download packages, re-install etc)

Or just manually remove MySQL and all it's dependencies before running ./stack.sh again.

Hope this helps.

edit flag offensive delete link more
0

answered 2017-03-20 21:18:21 -0500

tcpip gravatar image

Hello,

did you create the stack user?

regards

edit flag offensive delete link more

Comments

Yes. The prompt shows this stack user

karntol gravatar imagekarntol ( 2017-03-21 01:20:14 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2017-03-20 11:37:37 -0500

Seen: 18 times

Last updated: Mar 21