nova-api & nova-metadata-api services are using the same port

Bug #1237334 reported by Yogev Rabl
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Guangya Liu (Jay Lau)

Bug Description

Description of problem:
The services nova-api and the nova-metadata-api are both using the same port, 8775.
Thus, the services are 'competing' for the port and one of them will not work.

Version-Release number of selected component (if applicable):

Red Hat Enterprise Linux Server release 6.5 Beta (Santiago)

python-novaclient-2.15.0-1.el6ost.noarch
python-nova-2013.2-0.24.rc1.el6ost.noarch
openstack-nova-network-2013.2-0.24.rc1.el6ost.noarch
openstack-nova-common-2013.2-0.24.rc1.el6ost.noarch
openstack-nova-console-2013.2-0.24.rc1.el6ost.noarch
openstack-nova-compute-2013.2-0.24.rc1.el6ost.noarch
openstack-nova-conductor-2013.2-0.24.rc1.el6ost.noarch
openstack-nova-novncproxy-2013.2-0.24.rc1.el6ost.noarch
openstack-nova-scheduler-2013.2-0.24.rc1.el6ost.noarch
openstack-nova-api-2013.2-0.24.rc1.el6ost.noarch
openstack-nova-cert-2013.2-0.24.rc1.el6ost.noarch

How reproducible:
everytime

Steps to Reproduce:
1. Install Havana on RHEL 6.5 AIO installation.
2.
3.

Actual results:
Either the openstack-nova-api or the openstack-nova-metadata-api service is down.

Expected results:
Both services are up and running.

Additional info:
The error from /var/log/nova/metadata-api.log:

2013-10-09 10:54:21.975 4776 INFO nova.network.driver [-] Loading network driver 'nova.network.linux_net'
2013-10-09 10:54:22.036 4776 DEBUG nova.wsgi [-] Loading app metadata from /etc/nova/api-paste.ini load_app /usr/lib/python2.6/site-packages/nova/wsgi.py:484
2013-10-09 10:54:22.076 4776 INFO nova.openstack.common.periodic_task [-] Skipping periodic task _periodic_update_dns because its interval is negative
2013-10-09 10:54:22.079 4776 CRITICAL nova [-] [Errno 98] Address already in use
2013-10-09 10:54:22.079 4776 TRACE nova Traceback (most recent call last):
2013-10-09 10:54:22.079 4776 TRACE nova File "/usr/bin/nova-api-metadata", line 10, in <module>
2013-10-09 10:54:22.079 4776 TRACE nova sys.exit(main())
2013-10-09 10:54:22.079 4776 TRACE nova File "/usr/lib/python2.6/site-packages/nova/cmd/api_metadata.py", line 33, in main
2013-10-09 10:54:22.079 4776 TRACE nova server = service.WSGIService('metadata')
2013-10-09 10:54:22.079 4776 TRACE nova File "/usr/lib/python2.6/site-packages/nova/service.py", line 318, in __init__
2013-10-09 10:54:22.079 4776 TRACE nova max_url_len=max_url_len)
2013-10-09 10:54:22.079 4776 TRACE nova File "/usr/lib/python2.6/site-packages/nova/wsgi.py", line 123, in __init__
2013-10-09 10:54:22.079 4776 TRACE nova self._socket = eventlet.listen(bind_addr, family, backlog=backlog)
2013-10-09 10:54:22.079 4776 TRACE nova File "/usr/lib/python2.6/site-packages/eventlet/convenience.py", line 38, in listen
2013-10-09 10:54:22.079 4776 TRACE nova sock.bind(addr)
2013-10-09 10:54:22.079 4776 TRACE nova File "<string>", line 1, in bind
2013-10-09 10:54:22.079 4776 TRACE nova error: [Errno 98] Address already in use
2013-10-09 10:54:22.079 4776 TRACE nova

The error from the nova-api log:
2013-10-09 11:17:04.520 6048 CRITICAL nova [-] [Errno 98] Address already in use
2013-10-09 11:17:04.520 6048 TRACE nova Traceback (most recent call last):
2013-10-09 11:17:04.520 6048 TRACE nova File "/usr/bin/nova-api", line 10, in <module>
2013-10-09 11:17:04.520 6048 TRACE nova sys.exit(main())
2013-10-09 11:17:04.520 6048 TRACE nova File "/usr/lib/python2.6/site-packages/nova/cmd/api.py", line 51, in main
2013-10-09 11:17:04.520 6048 TRACE nova server = service.WSGIService(api, use_ssl=should_use_ssl)
2013-10-09 11:17:04.520 6048 TRACE nova File "/usr/lib/python2.6/site-packages/nova/service.py", line 318, in __init__
2013-10-09 11:17:04.520 6048 TRACE nova max_url_len=max_url_len)
2013-10-09 11:17:04.520 6048 TRACE nova File "/usr/lib/python2.6/site-packages/nova/wsgi.py", line 124, in __init__
2013-10-09 11:17:04.520 6048 TRACE nova self._socket = eventlet.listen(bind_addr, family, backlog=backlog)
2013-10-09 11:17:04.520 6048 TRACE nova File "/usr/lib/python2.6/site-packages/eventlet/convenience.py", line 38, in listen
2013-10-09 11:17:04.520 6048 TRACE nova sock.bind(addr)
2013-10-09 11:17:04.520 6048 TRACE nova File "<string>", line 1, in bind
2013-10-09 11:17:04.520 6048 TRACE nova error: [Errno 98] Address already in use
2013-10-09 11:17:04.520 6048 TRACE nova

netstat:
tcp 0 0 0.0.0.0:8775 0.0.0.0:* LISTEN 32327/python

Tags: nova-manage
Yogev Rabl (yrabl)
affects: cloudkeep → nova
tags: added: nova-manage
Revision history for this message
Guangya Liu (Jay Lau) (jay-lau-513) wrote :

I think that this is not a valid case.

Please check your nova.conf to see if metadata was configured in enabled_apis.

The default value of enabled_apis is "enabled_apis = osapi_compute,metadata", this means that metadata was enabled by default, it will be started by nova-api.

If you remove metadata from enabled_apis, you will be able to start up your metadata api.

Thanks.

Changed in nova:
assignee: nobody → Jay Lau (jay-lau-513)
status: New → Invalid
Revision history for this message
Yogev Rabl (yrabl) wrote :

from nova.conf:

# a list of APIs to enable by default (list value)
#enabled_apis=ec2,osapi_compute,metadata
enabled_apis=ec2,osapi_compute,metadata

Revision history for this message
Guangya Liu (Jay Lau) (jay-lau-513) wrote :

Yes, that's it. You can remove metadata from enabled_apis, then restart nova-api and start nova-metadata-api, it should be ok.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.