title: Openstack/Packstack install error on CentOS 7
body: <p>For the past few days, I've been trying to install Openstack with Packstack on Centos 7 running through Oracle's Virtual Box on my linux distro. I've downloaded the CentOS 7 DVD image, and installed the server with gui type (including some some features that I now can't remember) and ran these commands as root:</p>
  <pre><code>systemctl disable firewalld
  systemctl stop firewalld
  systemctl disable NetworkManager
  systemctl stop NetworkManager
  systemctl enable network
  systemctl start network
  </code></pre>
  <p>At first, internet worked fine. After disabling and stopping the NetworkManager service, I couldn't access the internet anymore; I've edited the config file <code>/etc/sysconfig/network-scripts/ifcfg-enp0s3</code> so that now it looks like this:</p>
  <pre><code>TYPE=Ethernet
  PROXY_METHOD=no
  DNS=yes
  BROWSER_ONLY=no
  BOOTPROTO=dhcp
  DEFROUTE=yes
  IPV4_FAILURE_FATAL=no
  IPV6INIT=yes
  IPV6_AUTOCONF=yes
  IPV6_DEFROUTE=yes
  IPV6_FAILURE_FATAL=no
  IPV6_ADDR_GEN_MODE=stable-privacy
  NAME=enp0s3
  NM_CONTROLLED=no
  UUID=1ce94676-c997-4772-9253-a3ac48a7814f
  DEVICE=enp0s3
  ONBOOT=yes
  HWADDR=08:00:27:A5:FA:0F
  DNS1=208.67.222.222
  DNS2=208.67.220.220
  PEERDNS=no
  DOMAIN=localdomain
  </code></pre>
  <p>And the <code>/etc/resolv.conf</code> file (which was empty btw) and added the lines:</p>
  <pre><code>nameserver 208.67.222.222
  nameserver 208.67.220.220
  search localdomain
  </code></pre>
  <p>After this, internet seems to be working fine on the VM, so I began installing packstack with the following commands (as root as always):</p>
  <pre><code>yum install -y centos-release-openstack-train
  dnf update -y  //dnf wasn't present, so I installed it.
  dnf install -y openstack-packstack
  </code></pre>
  <p>There had been no issues to this point. Sorry for the long post, I'm trying to include everything I did.
  Now, when I run (as root) <code>packstack --allinone</code> to install packstack I get the following output:</p>
  <pre><code>[root@localhost smaug]# packstack --allinone
  Welcome to the Packstack setup utility
   
  The installation log file is available at: /var/tmp/packstack/20210701-104910-If_Lz5/openstack-setup.log
   
  Installing:
  Clean Up                                             [ DONE ]
  Discovering ip protocol version                      [ DONE ]
  Setting up ssh keys                                  [ DONE ]
  Preparing servers                                    [ DONE ]
  Pre installing Puppet and discovering hosts' details [ DONE ]
  Preparing pre-install entries                        [ DONE ]
  Setting up CACERT                                    [ DONE ]
  Preparing AMQP entries                               [ DONE ]
  Preparing MariaDB entries                            [ DONE ]
  Fixing Keystone LDAP config parameters to be undef if empty[ DONE ]
  Preparing Keystone entries                           [ DONE ]
  Preparing Glance entries                             [ DONE ]
  Checking if the Cinder server has a cinder-volumes vg[ DONE ]
  Preparing Cinder entries                             [ DONE ]
  Preparing Nova API entries                           [ DONE ]
  Creating ssh keys for Nova migration                 [ DONE ]
  Gathering ssh host keys for Nova migration           [ DONE ]
  Preparing Nova Compute entries                       [ DONE ]
  Preparing Nova Scheduler entries                     [ DONE ]
  Preparing Nova VNC Proxy entries                     [ DONE ]
  Preparing OpenStack Network-related Nova entries     [ DONE ]
  Preparing Nova Common entries                        [ DONE ]
  Preparing Neutron API entries                        [ DONE ]
  Preparing Neutron L3 entries                         [ DONE ]
  Preparing Neutron L2 Agent entries                   [ DONE ]
  Preparing Neutron DHCP Agent entries                 [ DONE ]
  Preparing Neutron Metering Agent entries             [ DONE ]
  Checking if NetworkManager is enabled and running    [ DONE ]
  Preparing OpenStack Client entries                   [ DONE ]
  Preparing Horizon entries                            [ DONE ]
  Preparing Swift builder entries                      [ DONE ]
  Preparing Swift proxy entries                        [ DONE ]
  Preparing Swift storage entries                      [ DONE ]
  Preparing Gnocchi entries                            [ DONE ]
  Preparing Redis entries                              [ DONE ]
  Preparing Ceilometer entries                         [ DONE ]
  Preparing Aodh entries                               [ DONE ]
  Preparing Puppet manifests                           [ DONE ]
  Copying Puppet modules and manifests                 [ DONE ]
  Applying 192.168.112.221_controller.pp
  192.168.112.221_controller.pp:                    [ ERROR ]              
  Applying Puppet manifests                         [ ERROR ]
   
  ERROR : Error appeared during Puppet run: 192.168.112.221_controller.pp
  Notice: /Stage[main]/Nova::Db::Sync/Exec[nova-db-sync]/returns: Error: (pymysql.err.OperationalError) (1045, u&quot;Access denied for user 'nova'@'192.168.112.221' (using password: YES)&quot;) (Background on this error at: http://sqlalche.me/e/e3q8)
  You will find full trace in log /var/tmp/packstack/20210701-104910-If_Lz5/manifests/192.168.112.221_controller.pp.log
  Please check log file /var/tmp/packstack/20210701-104910-If_Lz5/openstack-setup.log for more information
  Additional information:
   * Parameter CONFIG_NEUTRON_L2_AGENT: You have chosen OVN Neutron backend. Note that this backend does not support the VPNaaS or FWaaS services. Geneve will be used as the encapsulation method for tenant networks
   * A new answerfile was created in: /root/packstack-answers-20210701-104911.txt
   * Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
   * File /root/keystonerc_admin has been created on OpenStack client host 192.168.112.221. To use the command line tools you need to source the file.
   * To access the OpenStack Dashboard browse to http://192.168.112.221/dashboard .
  Please, find your login credentials stored in the keystonerc_admin in your home directory.
  </code></pre>
  <p>It seems a DBAPI Operational Error, as pointed by <code>http://sqlalche.me/e/e3q8</code>, but that seemed off for some reason (I didn't even complete the installation of openstack through packstack and the error message points to a kind of runtime error to my knowledge). Investigating the log file <code>/var/tmp/packstack/20210701-104910-If_Lz5/manifests/192.168.112.221_controller.pp.log</code> gave the following result:</p>
  <pre><code>[1;33mWarning: /Stage[main]/Aodh::Deps/Anchor[aodh::service::end]: Skipping because of failed dependencies[0m
  [1;33mWarning: /Stage[main]/Placement::Deps/Anchor[placement::service::end]: Skipping because of failed dependencies[0m
  [1;33mWarning: /Stage[main]/Keystone::Cron::Fernet_rotate/Cron[keystone-manage fernet_rotate]: Skipping because of failed dependencies[0m
  [1;31mError: Failed to apply catalog: Execution of '/usr/bin/openstack domain list --quiet --format csv' returned 1: Unable to establish connection to http://127.0.0.1:5000/v3/domains?: HTTPConnectionPool(host='127.0.0.1', port=5000): Max retries exceeded with url: /v3/domains (Caused by NewConnectionError('&lt;urllib3.connection.HTTPConnection object at 0x7ff001fce090&gt;: Failed to establish a new connection: [Errno 111] Connection refused',)) (tried 36, for a total of 170 seconds)[0m
  </code></pre>
  <p>If I try to connect with <code>telnet localhost 5000</code> I'm greeted by the following:</p>
  <pre><code>Trying ::1...
  telnet: connect to address ::1: Connection refused
  Trying 127.0.0.1...
  telnet: connect to address 127.0.0.1: Connection refused
  </code></pre>
  <p>However, everything seems fine if I connect normally without specifying the port.
  If the connection is refused,I thought, then port 5000 is not open/nothing is listening on it. And so tried to open it and move on with the installation.
  Here lies the arcanum: no matter what I do, the connection is always refused.
  I tried to open the port to the loopback and the main internet device (enp0s3), but nothing. I tried, even if it dind't make sense, to restart the firewalld service to add the port with <code>firewall-cmd --zone=public --add-port=5000/tcp --permanent</code> and still the connection was refused with telnet.</p>
  <p><code>iptables-save | grep 5000</code> yields the following:</p>
  <pre><code>-A INPUT -i lo -p tcp -m tcp --dport 5000 -j ACCEPT
  -A INPUT -i enp0s3 -p tcp -m tcp --dport 5000 -j ACCEPT
  -A INPUT -p tcp -m multiport --dports 5000 -m comment --comment &quot;001 keystone incoming keystone&quot; -j ACCEPT
  </code></pre>
  <p>Looking at this, there seems to be rules that allow communication on port 5000, but the connection is refused still and the install of openstack keeps halting.
  To add some more info <code>lsof -i :5000</code>, <code>ss -antup | grep 5000</code> and <code>netstat -lntu | grep 5000</code> do not produce any output, so this means (If I understand correctly) that no process is listening on that port and/or that port is still closed.
  I'm confused on what to do, can you help?</p>
  <h2>Thanks,</h2>