OpenStack Icehouse Installation Errors and Solutions – CentOS

Updated on September 1, 2017

I have been trying to install OpenStack Icehouse on CentOS for almost a week (Since I’m doing this for the first time, it took a week to complete the entire installation and configuration). Though I followed the official documentation, I still had to refer various forums including the openstack support site to resolve errors that bugged me during the installation process. So I thought of capturing all those errors and solutions that worked for me in this article. You can jump to see few errors and solutions that I encountered during the installation of Keystone, Glance and Nova services. Hopefully, it might be helpful to someone.

Well, here are the few more…

Solutions for openstack errors

Error: neutron-server failed to start and no log was written –  neutron dead but pid file exists

# service neutron-server start
# service neutron-server status
neutron dead but pid file exists

Solution:

Generally, after installing keystone, glance, nova services, you have to create a corresponding database in MySQL (usually the databases are created manually). But neutron service doesn’t require that, as the service will populate the database automatically. However, it didn’t behave that way and I had to manually run ‘neutron-db-manage‘ before starting ‘neutron-server’.

Note: According to the official documentation, it’s advised to start the neutron-server manually before syncing the database. You should follow the below steps only if the service fails to start.

Execute the below commands to configure the network plugins

# openstack-config --set /etc/neutron/neutron.conf DEFAULT core_plugin neutron.plugins.ml2.plugin.Ml2Plugin
# openstack-config --set /etc/neutron/neutron.conf DEFAULT service_plugins neutron.services.l3_router.l3_router_plugin.L3RouterPlugin

Now populate the neutron database…

# su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini upgrade head" neutron

Try starting neutron-server. It worked for me.

ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500)

The above error was thrown when I executed nova’s network and boot command.

[root@gcontroller]#nova --debug network-create tg-network --bridge br100 --multi-host T --fixed-range-v4 10.180.14.160/27

Solution:
Try executing the below command…

[root@gcontroller]#nova-manage network create tg-network --multi_host=T --fixed_range_v4=10.180.14.160/27 --bridge=br100 --num_networks=1 --network_size=256

Error: NetworkNotCreated: bridge is required to create a network

[root@gcontroller]# nova-manage network create tg-network --multi_host=T --bridge_interface=br100 --fixed_range_v4=10.180.14.160/27
Command failed, please check log for more info

Check the error log for more information…

[root@gcontroller]#tailf /var/log/nova/nova-manage.log
2015-02-06 18:33:07.656 5080 CRITICAL nova [req-750edab1-9736-4cff-9395-e596f316e596 None None] NetworkNotCreated: bridge is required to create a network.

Solution:

As the above error message says, you should specify the bridge_interface for creating a network. So the command goes as below..Lookout for ‘–bridge_interface=br100

[root@gcontroller]#nova-manage network create tg-network --multi_host=T --fixed_range_v4=10.180.14.160/27 --bridge_interface=br100 --num_networks=1 --network_size=256

[root@gcontroller]# nova net-list
+--------------------------------------+---------+------------------+
| ID                                   | Label   | CIDR             |
+--------------------------------------+---------+------------------+
| 60dfd46a-4649-4758-8b8d-88cc562b9b39 | tg-network | 10.180.14.160/27 |
+--------------------------------------+---------+------------------+

Error: Need higher version of pyparsing – Requirement.parse(‘pyparsing>=2.0.1’)

# neutron net-create ext-net --shared --router:external=True (pyparsing 1.5.6 (/usr/lib/python2.6/site-packages), Requirement.parse('pyparsing>=2.0.1')) 
'Namespace' object has no attribute 'debug'

Solution:

It’s clear that you should install higher version of pyparsing. The easiest way to install any python module is to use ‘pip‘ or ‘easy_install‘.

easy_install pyparsing

But you know, sometimes compiling and installing the module will only work out. In such cases, you can download the latest version of pyparsing here.

[root@gcontroller pyparsing-2.0.1]# python setup.py build
running build
running build_py
creating build
creating build/lib
copying pyparsing.py -> build/lib
[root@gcontroller pyparsing-2.0.1]# python setup.py install
running install
running build
running build_py
running install_lib
copying build/lib/pyparsing.py -> /usr/lib/python2.6/site-packages
byte-compiling /usr/lib/python2.6/site-packages/pyparsing.py to pyparsing.pyc
running install_egg_info
Writing /usr/lib/python2.6/site-packages/pyparsing-2.0.1-py2.6.egg-info

Error: INFO nova.wsgi [-] Stopping WSGI server | INFO nova.openstack.common.service [-] Caught SIGTERM, exiting | [Errno 111] Connection refused

I got the above error when I executed one of the nova command.

[root@gcontroller]# nova net-list
ERROR: [Errno 111] Connection refused

The log files under /var/log/nova revealed the above error.

INFO nova.wsgi [-] Stopping WSGI server.
INFO nova.wsgi [-] WSGI server has stopped.
INFO nova.wsgi [-] WSGI server has stopped.
INFO nova.wsgi [-] WSGI server has stopped.
INFO nova.openstack.common.service [-] Caught SIGTERM, exiting

Solution:

Whenever you see “Connection refused” error, it’s clear that one of the necessary service is not running properly. After debugging, I understood that when I start ‘openstack-nova-metadata-api‘, it kills ‘openstack-nova-api‘ service. The reason was, openstack-nova-api was already running ‘metadata-api’ along with it and when I start ‘openstack-nova-metadata-api’ separately, it killed the other service.

To fix the issue,

  • $vi /etc/nova/nova.conf
  • Lookout for ‘enabled_apis‘ and its value ‘ec2,osapi_compute,metadata
  • Remove ‘metadata’ from ‘enabled_apis’
  • Now, you are good to start both ‘openstack-nova-api‘ and ‘openstack-nova-metadata-api‘. Both the service will run individually.

In case, if you wish to start ‘metadata-api’ along with ‘openstack-nova-api’ then leave ‘enabled_apis’ with values as ‘ec2,osapi_compute,metadata’ and stop ‘openstack-nova-metadata-api‘ from starting during the system boot. To do that, you can just run the below commands:

$ chkconfig openstack-nova-metadata-api off
$ chkconfig openstack-nova-api on

Error: iptables-restore v1.4.6: Bad IP address “gcompute”

The above occurred when I tried to start nova-network on my compute node. The log files under /var/log/nova revealed the above message.

Solution:

  • Open /etc/nova/nova.conf and lookout for ‘my_ip‘ attribute.
  • Make sure ‘my_ip‘ contains IP address as value and not hostname or FQDN or localhost. In my case, it was FQDN of the compute node. I changed it to IP address.
  • Now restart openstack-nova-network service and it should work as expected.

ERROR: Quota exceeded for instances: Requested 1, but already used 10 of 10 instances (HTTP 413)

Well, you should change the default quota limit for booting the new instance. To view the default quota limits, run the below command.

[root@gcontroller]# nova quota-defaults
+-----------------------------+-------+
| Quota | Limit |
+-----------------------------+-------+
| instances | 10 |
| cores | 20 |
| ram | 51200 |
| floating_ips | 10 |
| fixed_ips | -1 |
| metadata_items | 128 |
| injected_files | 5 |
| injected_file_content_bytes | 10240 |
| injected_file_path_bytes | 255 |
| key_pairs | 100 |
| security_groups | 10 |
| security_group_rules | 20 |
+-----------------------------+-------+

The below command will allow you to set new quota limit.

[root@gcontroller]# nova quota-class-update --instances 35 default
[root@gcontroller]# nova quota-defaults
+-----------------------------+-------+
| Quota                       | Limit |
+-----------------------------+-------+
| instances                   | 35    |
| cores                       | 20    |
| ram                         | 51200 |
| floating_ips                | 10    |
| fixed_ips                   | -1    |
| metadata_items              | 128   |
| injected_files              | 5     |
| injected_file_content_bytes | 10240 |
| injected_file_path_bytes    | 255   |
| key_pairs                   | 100   |
| security_groups             | 10    |
| security_group_rules        | 20    |
+-----------------------------+-------+

Cirros Image is booted and active, but what is the username and password to login to the terminal?

If you have booted an instance using Cirros image (that’s the easiest one to test your setup) and wanted to access the terminal of new instance, then ssh to it using the username name as ‘cirros’ and password as ‘cubswin:)’.

#ssh cirros@10.180.14.163

Unable to login to Openstack dashboard

Do you see “Something went wrong! An unexpected error has occurred. Try refreshing the page” when openstack dashboard is accessed?

unable to login to dashboard

Solution:

Check if you have set proper values for the below attributes in ‘/etc/openstack-dashboard/local_settings

OPENSTACK_HOST = "gcontroller.org.in"
OPENSTACK_KEYSTONE_URL = "http://%s:5000/v2.0" % OPENSTACK_HOST
OPENSTACK_KEYSTONE_DEFAULT_ROLE = "admin"

In my case, I had to change ‘OPENSTACK_KEYSTONE_DEFAULT_ROLE = “_member_‘ to ‘OPENSTACK_KEYSTONE_DEFAULT_ROLE = “admin

[error] SuspiciousOperation: Invalid HTTP_HOST header (you may need to set ALLOWED_HOSTS)

Solution:

You need to set ALLOWED_HOSTS attribute in ‘/etc/openstack-dashboard/local_settings‘. The value of the ALLOWED_HOSTS should also contain the IP address of the controller node (the node that runs dashboard service).

ALLOWED_HOSTS = ['10.180.5.50', '10.180.5.49', '10.180.10.132']

And the Bonus is here…

Was this article helpful?

Related Articles

Leave a Comment