Installing Openstack errors
Categories:
Troubleshooting Common OpenStack Installation Errors

Navigate and resolve frequent issues encountered during OpenStack deployments, focusing on DevStack and common configuration pitfalls.
Installing OpenStack, especially for the first time or in a development environment like DevStack, can be a complex process fraught with various errors. These issues often stem from misconfigurations, dependency problems, network glitches, or resource limitations. This article aims to provide a comprehensive guide to identifying and resolving some of the most common installation errors, helping you achieve a successful OpenStack deployment.
Understanding DevStack Installation Flow
DevStack is a popular script to quickly deploy a complete OpenStack environment for development and testing. While convenient, understanding its internal flow can be crucial for debugging. The script automates many steps, from cloning repositories to configuring services, and errors can occur at any stage. A typical DevStack installation involves setting up prerequisites, cloning the DevStack repository, configuring local.conf
, and finally running stack.sh
.
flowchart TD A[Start DevStack Installation] --> B{Check Prerequisites} B -->|Success| C[Clone Repositories] C --> D[Configure local.conf] D --> E[Run stack.sh] E --> F{Install & Configure Services} F -->|Success| G[OpenStack Ready] F -->|Failure| H[Error Detected] H --> I[Review Logs] I --> J[Troubleshoot & Retry] G --> K[Use OpenStack] J --> E
Simplified DevStack Installation Workflow
Common Errors and Their Solutions
Many errors during OpenStack installation are generic and can be resolved with systematic debugging. Here are some of the most frequently encountered issues and their recommended solutions.
/opt/stack/logs/stack.sh.log
or within the screen
session if you're running it interactively.1. Git Clone Failures or Repository Issues
One common problem is the failure to clone Git repositories, often due to network connectivity, firewall restrictions, or incorrect Git configurations. This can manifest as git clone
commands failing or hanging.
++ git clone https://opendev.org/openstack/nova /opt/stack/nova
Cloning into '/opt/stack/nova'...
fatal: unable to access 'https://opendev.org/openstack/nova/': Failed to connect to opendev.org port 443: Connection refused
Example of a Git clone failure in DevStack logs
1. Verify Network Connectivity
Ensure your machine has internet access. Try ping opendev.org
or curl https://opendev.org
to confirm.
2. Check Firewall Rules
If you're behind a corporate firewall, ensure that Git (port 9418) and HTTPS (port 443) traffic are allowed. You might need to configure proxy settings.
3. Configure Git Proxy (if applicable)
Set your Git proxy using git config --global http.proxy http://your.proxy.server:port
and git config --global https.proxy http://your.proxy.server:port
.
4. Increase Git Timeout
For slow connections, increase the Git timeout: git config --global http.lowSpeedLimit 0
and git config --global http.lowSpeedTime 999999
.
2. Python Dependency and Virtual Environment Errors
OpenStack services heavily rely on Python and its packages. Issues with Python versions, missing dependencies, or virtual environment creation can halt the installation. Errors often include ModuleNotFoundError
, pip
failures, or virtual environment activation problems.
ERROR: Command "/usr/bin/python3 -m pip install 'pbr>=2.0.0,<3.0.0'" failed with error code 1 in /opt/stack/nova/.venv
... or ...
ModuleNotFoundError: No module named 'oslo_config'
Typical Python dependency errors
1. Ensure Python Development Headers
Install necessary Python development packages: sudo apt-get install python3-dev
(Debian/Ubuntu) or sudo yum install python3-devel
(RHEL/CentOS).
2. Clean DevStack Environment
If a previous installation failed, clean up thoroughly: cd devstack && ./clean.sh && ./unstack.sh
before retrying stack.sh
.
3. Check local.conf
for PIP_REQUIREMENTS_DIR
Ensure PIP_REQUIREMENTS_DIR
is correctly set if you're using custom requirement files, or remove it to let DevStack manage dependencies automatically.
3. Database and Service Connection Issues
OpenStack services communicate extensively with databases (MySQL/PostgreSQL) and each other. Connection refused errors, authentication failures, or services failing to start are common. This often points to incorrect credentials, database not running, or network binding issues.
DBConnectionError: (pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on '127.0.0.1' ([Errno 111] Connection refused)")
... or ...
ERROR: nova.db.api [req-...] DB exception: (pymysql.err.InternalError) (1045, "Access denied for user 'nova'@'localhost' (using password: YES)")
Database connection and authentication errors
1. Verify Database Service Status
Check if your database service (e.g., mysql
or mariadb
) is running: sudo systemctl status mysql
.
2. Check Database Credentials in local.conf
Ensure DATABASE_PASSWORD
, RABBIT_PASSWORD
, and other service passwords in local.conf
match what the services expect. A common mistake is using default passwords that don't align.
3. Inspect Network Bindings
Confirm that the database is listening on the correct interface (e.g., 127.0.0.1
or 0.0.0.0
). Check netstat -tulnp | grep 3306
(for MySQL).
local.conf
, always run ./unstack.sh
and then ./stack.sh
to ensure changes are picked up and the environment is reset cleanly.