Revision history [back]

click to hide/show revision 1
initial version

gnocchi-api running error, Address already in use

When i install Ceilometer and on the stage of "Verify operation" on OpenStack Installation Tutorials, i run command following,But it's not success.

[root@controller3 gnocchi]# gnocchi resource list  --type image
Unable to establish connection to http://localhost:8041/v1/resource/image?: HTTPConnectionPool(host='localhost', port=8041): Max retries exceeded with url: /v1/resource/image (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x2ff4950>: Failed to establish a new connection: [Errno 111] Connection refused',))

When i finished the gnocchi installation and run gnocchi-upgrade, that's all right. But next, when i run gnocchi-api, the gnocchi-api.log show WSGI Address already in use. Could you tell me how to solve it ? Thanks !

gnocchi-api.log:

2017-08-03 21:40:09,020 [6098] DEBUG    gnocchi.service: ********************************************************************************
2017-08-03 21:40:09,021 [6098] DEBUG    gnocchi.service: Configuration options gathered from:
2017-08-03 21:40:09,021 [6098] DEBUG    gnocchi.service: command line args: []
2017-08-03 21:40:09,021 [6098] DEBUG    gnocchi.service: config files: ['/etc/gnocchi/gnocchi.conf']
2017-08-03 21:40:09,021 [6098] DEBUG    gnocchi.service: ================================================================================
2017-08-03 21:40:09,021 [6098] DEBUG    gnocchi.service: config_dir                     = []
2017-08-03 21:40:09,021 [6098] DEBUG    gnocchi.service: config_file                    = ['/etc/gnocchi/gnocchi.conf']
2017-08-03 21:40:09,021 [6098] DEBUG    gnocchi.service: debug                          = True
2017-08-03 21:40:09,021 [6098] DEBUG    gnocchi.service: log_dir                        = /var/log/gnocchi
2017-08-03 21:40:09,021 [6098] DEBUG    gnocchi.service: log_file                       = None
2017-08-03 21:40:09,021 [6098] DEBUG    gnocchi.service: syslog_log_facility            = user
2017-08-03 21:40:09,021 [6098] DEBUG    gnocchi.service: use_journal                    = False
2017-08-03 21:40:09,022 [6098] DEBUG    gnocchi.service: use_syslog                     = False
2017-08-03 21:40:09,022 [6098] DEBUG    gnocchi.service: verbose                        = True
2017-08-03 21:40:09,022 [6098] DEBUG    gnocchi.service: statsd.archive_policy_name     = low
2017-08-03 21:40:09,022 [6098] DEBUG    gnocchi.service: statsd.creator                 = :
2017-08-03 21:40:09,022 [6098] DEBUG    gnocchi.service: statsd.flush_delay             = 10.0
2017-08-03 21:40:09,023 [6098] DEBUG    gnocchi.service: statsd.host                    = controller3
2017-08-03 21:40:09,023 [6098] DEBUG    gnocchi.service: statsd.port                    = 8125
2017-08-03 21:40:09,023 [6098] DEBUG    gnocchi.service: statsd.project_id              = None
2017-08-03 21:40:09,023 [6098] DEBUG    gnocchi.service: statsd.resource_id             = 83746b69-87e8-4ee2-b9af-39769cc32b75
2017-08-03 21:40:09,023 [6098] DEBUG    gnocchi.service: statsd.user_id                 = None
2017-08-03 21:40:09,023 [6098] DEBUG    gnocchi.service: incoming.ceph_conffile         = /etc/ceph/ceph.conf
2017-08-03 21:40:09,023 [6098] DEBUG    gnocchi.service: incoming.ceph_keyring          = 
2017-08-03 21:40:09,024 [6098] DEBUG    gnocchi.service: incoming.ceph_pool             = gnocchi
2017-08-03 21:40:09,024 [6098] DEBUG    gnocchi.service: incoming.ceph_secret           = ****
2017-08-03 21:40:09,024 [6098] DEBUG    gnocchi.service: incoming.ceph_timeout          = 30
2017-08-03 21:40:09,024 [6098] DEBUG    gnocchi.service: incoming.ceph_username         = 
2017-08-03 21:40:09,024 [6098] DEBUG    gnocchi.service: incoming.driver                = file
2017-08-03 21:40:09,024 [6098] DEBUG    gnocchi.service: incoming.file_basepath         = /var/lib/gnocchi
2017-08-03 21:40:09,025 [6098] DEBUG    gnocchi.service: incoming.redis_url             = redis://localhost:6379/
2017-08-03 21:40:09,025 [6098] DEBUG    gnocchi.service: incoming.s3_access_key_id      = 
2017-08-03 21:40:09,025 [6098] DEBUG    gnocchi.service: incoming.s3_bucket_prefix      = gnocchi
2017-08-03 21:40:09,025 [6098] DEBUG    gnocchi.service: incoming.s3_check_consistency_timeout = 60.0
2017-08-03 21:40:09,025 [6098] DEBUG    gnocchi.service: incoming.s3_endpoint_url       = 
2017-08-03 21:40:09,025 [6098] DEBUG    gnocchi.service: incoming.s3_region_name        = 
2017-08-03 21:40:09,026 [6098] DEBUG    gnocchi.service: incoming.s3_secret_access_key  = 
2017-08-03 21:40:09,026 [6098] DEBUG    gnocchi.service: incoming.swift_auth_version    = 1
2017-08-03 21:40:09,026 [6098] DEBUG    gnocchi.service: incoming.swift_authurl         = http://localhost:8080/auth/v1.0
2017-08-03 21:40:09,026 [6098] DEBUG    gnocchi.service: incoming.swift_container_prefix = gnocchi
2017-08-03 21:40:09,026 [6098] DEBUG    gnocchi.service: incoming.swift_endpoint_type   = publicURL
2017-08-03 21:40:09,027 [6098] DEBUG    gnocchi.service: incoming.swift_key             = ****
2017-08-03 21:40:09,027 [6098] DEBUG    gnocchi.service: incoming.swift_preauthtoken    = ****
2017-08-03 21:40:09,027 [6098] DEBUG    gnocchi.service: incoming.swift_preauthurl      = 
2017-08-03 21:40:09,027 [6098] DEBUG    gnocchi.service: incoming.swift_project_domain_name = Default
2017-08-03 21:40:09,027 [6098] DEBUG    gnocchi.service: incoming.swift_project_name    = 
2017-08-03 21:40:09,027 [6098] DEBUG    gnocchi.service: incoming.swift_timeout         = 300
2017-08-03 21:40:09,028 [6098] DEBUG    gnocchi.service: incoming.swift_user            = admin:admin
2017-08-03 21:40:09,028 [6098] DEBUG    gnocchi.service: incoming.swift_user_domain_name = Default
2017-08-03 21:40:09,028 [6098] DEBUG    gnocchi.service: metricd.metric_cleanup_delay   = 300
2017-08-03 21:40:09,028 [6098] DEBUG    gnocchi.service: metricd.metric_processing_delay = 60
2017-08-03 21:40:09,028 [6098] DEBUG    gnocchi.service: metricd.metric_reporting_delay = 120
2017-08-03 21:40:09,028 [6098] DEBUG    gnocchi.service: metricd.processing_replicas    = 3
2017-08-03 21:40:09,028 [6098] DEBUG    gnocchi.service: metricd.worker_sync_rate       = 30
2017-08-03 21:40:09,028 [6098] DEBUG    gnocchi.service: metricd.workers                = 4
2017-08-03 21:40:09,028 [6098] DEBUG    gnocchi.service: database.backend               = sqlalchemy
2017-08-03 21:40:09,028 [6098] DEBUG    gnocchi.service: database.connection            = ****
2017-08-03 21:40:09,029 [6098] DEBUG    gnocchi.service: database.connection_debug      = 0
2017-08-03 21:40:09,029 [6098] DEBUG    gnocchi.service: database.connection_trace      = False
2017-08-03 21:40:09,029 [6098] DEBUG    gnocchi.service: database.db_inc_retry_interval = True
2017-08-03 21:40:09,029 [6098] DEBUG    gnocchi.service: database.db_max_retries        = 20
2017-08-03 21:40:09,029 [6098] DEBUG    gnocchi.service: database.db_max_retry_interval = 10
2017-08-03 21:40:09,029 [6098] DEBUG    gnocchi.service: database.db_retry_interval     = 1
2017-08-03 21:40:09,029 [6098] DEBUG    gnocchi.service: database.idle_timeout          = 3600
2017-08-03 21:40:09,029 [6098] DEBUG    gnocchi.service: database.max_overflow          = 50
2017-08-03 21:40:09,029 [6098] DEBUG    gnocchi.service: database.max_pool_size         = 5
2017-08-03 21:40:09,029 [6098] DEBUG    gnocchi.service: database.max_retries           = 10
2017-08-03 21:40:09,029 [6098] DEBUG    gnocchi.service: database.min_pool_size         = 1
2017-08-03 21:40:09,030 [6098] DEBUG    gnocchi.service: database.mysql_sql_mode        = TRADITIONAL
2017-08-03 21:40:09,030 [6098] DEBUG    gnocchi.service: database.pool_timeout          = None
2017-08-03 21:40:09,030 [6098] DEBUG    gnocchi.service: database.retry_interval        = 10
2017-08-03 21:40:09,030 [6098] DEBUG    gnocchi.service: database.slave_connection      = ****
2017-08-03 21:40:09,030 [6098] DEBUG    gnocchi.service: database.sqlite_db             = oslo.sqlite
2017-08-03 21:40:09,030 [6098] DEBUG    gnocchi.service: database.sqlite_synchronous    = True
2017-08-03 21:40:09,030 [6098] DEBUG    gnocchi.service: database.use_db_reconnect      = False
2017-08-03 21:40:09,030 [6098] DEBUG    gnocchi.service: storage.aggregation_workers_number = 1
2017-08-03 21:40:09,030 [6098] DEBUG    gnocchi.service: storage.ceph_conffile          = /etc/ceph/ceph.conf
2017-08-03 21:40:09,030 [6098] DEBUG    gnocchi.service: storage.ceph_keyring           = None
2017-08-03 21:40:09,030 [6098] DEBUG    gnocchi.service: storage.ceph_pool              = gnocchi
2017-08-03 21:40:09,030 [6098] DEBUG    gnocchi.service: storage.ceph_secret            = ****
2017-08-03 21:40:09,030 [6098] DEBUG    gnocchi.service: storage.ceph_timeout           = 30
2017-08-03 21:40:09,031 [6098] DEBUG    gnocchi.service: storage.ceph_username          = None
2017-08-03 21:40:09,031 [6098] DEBUG    gnocchi.service: storage.coordination_url       = ****
2017-08-03 21:40:09,031 [6098] DEBUG    gnocchi.service: storage.driver                 = file
2017-08-03 21:40:09,031 [6098] DEBUG    gnocchi.service: storage.file_basepath          = /var/lib/gnocchi
2017-08-03 21:40:09,031 [6098] DEBUG    gnocchi.service: storage.redis_url              = redis://localhost:6379/
2017-08-03 21:40:09,031 [6098] DEBUG    gnocchi.service: storage.s3_access_key_id       = None
2017-08-03 21:40:09,031 [6098] DEBUG    gnocchi.service: storage.s3_bucket_prefix       = gnocchi
2017-08-03 21:40:09,031 [6098] DEBUG    gnocchi.service: storage.s3_check_consistency_timeout = 60.0
2017-08-03 21:40:09,031 [6098] DEBUG    gnocchi.service: storage.s3_endpoint_url        = None
2017-08-03 21:40:09,031 [6098] DEBUG    gnocchi.service: storage.s3_region_name         = None
2017-08-03 21:40:09,031 [6098] DEBUG    gnocchi.service: storage.s3_secret_access_key   = None
2017-08-03 21:40:09,031 [6098] DEBUG    gnocchi.service: storage.swift_auth_version     = 1
2017-08-03 21:40:09,031 [6098] DEBUG    gnocchi.service: storage.swift_authurl          = http://localhost:8080/auth/v1.0
2017-08-03 21:40:09,031 [6098] DEBUG    gnocchi.service: storage.swift_container_prefix = gnocchi
2017-08-03 21:40:09,031 [6098] DEBUG    gnocchi.service: storage.swift_endpoint_type    = publicURL
2017-08-03 21:40:09,031 [6098] DEBUG    gnocchi.service: storage.swift_key              = ****
2017-08-03 21:40:09,032 [6098] DEBUG    gnocchi.service: storage.swift_preauthtoken     = ****
2017-08-03 21:40:09,032 [6098] DEBUG    gnocchi.service: storage.swift_preauthurl       = None
2017-08-03 21:40:09,032 [6098] DEBUG    gnocchi.service: storage.swift_project_domain_name = Default
2017-08-03 21:40:09,032 [6098] DEBUG    gnocchi.service: storage.swift_project_name     = None
2017-08-03 21:40:09,032 [6098] DEBUG    gnocchi.service: storage.swift_timeout          = 300
2017-08-03 21:40:09,032 [6098] DEBUG    gnocchi.service: storage.swift_user             = admin:admin
2017-08-03 21:40:09,032 [6098] DEBUG    gnocchi.service: storage.swift_user_domain_name = Default
2017-08-03 21:40:09,032 [6098] DEBUG    gnocchi.service: indexer.url                    = ****
2017-08-03 21:40:09,032 [6098] DEBUG    gnocchi.service: api.auth_mode                  = keystone
2017-08-03 21:40:09,032 [6098] DEBUG    gnocchi.service: api.max_limit                  = 1000
2017-08-03 21:40:09,032 [6098] DEBUG    gnocchi.service: api.paste_config               = /usr/lib/python2.7/site-packages/gnocchi/rest/api-paste.ini
2017-08-03 21:40:09,032 [6098] DEBUG    gnocchi.service: api.refresh_timeout            = 10
2017-08-03 21:40:09,033 [6098] DEBUG    gnocchi.service: archive_policy.default_aggregation_methods = ['mean', 'min', 'max', 'sum', 'std', 'count']
2017-08-03 21:40:09,033 [6098] DEBUG    gnocchi.service: oslo_policy.policy_default_rule = default
2017-08-03 21:40:09,033 [6098] DEBUG    gnocchi.service: oslo_policy.policy_dirs        = ['policy.d']
2017-08-03 21:40:09,033 [6098] DEBUG    gnocchi.service: oslo_policy.policy_file        = /usr/lib/python2.7/site-packages/gnocchi/rest/policy.json
2017-08-03 21:40:09,033 [6098] DEBUG    gnocchi.service: ********************************************************************************
2017-08-03 21:40:10,538 [6098] INFO     gnocchi.rest.app: WSGI config used: /usr/lib/python2.7/site-packages/gnocchi/rest/api-paste.ini
2017-08-03 21:40:11,441 [6098] WARNING  keystonemiddleware.auth_token: AuthToken middleware is set with keystone_authtoken.service_token_roles_required set to False. This is backwards compatible but deprecated behaviour. Please set this to True.
2017-08-03 21:40:11,474 [6098] WARNING  keystonemiddleware.auth_token: Configuring auth_uri to point to the public identity endpoint is required; clients may not be able to authenticate against an admin endpoint
2017-08-03 21:40:11,514 [6098] CRITICAL root: Traceback (most recent call last):
  File "/usr/bin/gnocchi-api", line 34, in <module>
    server = wss.make_server('', args.port, build_wsgi_app())
  File "/usr/lib64/python2.7/wsgiref/simple_server.py", line 144, in make_server
    server = server_class((host, port), handler_class)
  File "/usr/lib64/python2.7/SocketServer.py", line 419, in __init__
    self.server_bind()
  File "/usr/lib64/python2.7/wsgiref/simple_server.py", line 48, in server_bind
    HTTPServer.server_bind(self)
  File "/usr/lib64/python2.7/BaseHTTPServer.py", line 108, in server_bind
    SocketServer.TCPServer.server_bind(self)
  File "/usr/lib64/python2.7/SocketServer.py", line 430, in server_bind
    self.socket.bind(self.server_address)
  File "/usr/lib64/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 98] Address already in use

gnocchi.conf

[DEFAULT]
debug = true
verbose = true
log_dir = /var/log/gnocchi

[api]
workers = 4                                                                            
auth_mode = keystone
paste_config = /usr/lib/python2.7/site-packages/gnocchi/rest/api-paste.ini

[indexer]
url = mysql+pymysql://gnocchi:pass123456@controller3/gnocchi?charset=utf8

[keystone_authtoken]
auth_type = password
auth_url = http://controller3:5000/v3
project_domain_name = Default
user_domain_name = Default
project_name = service
username = gnocchi
password = pass123456
interface = internalURL
region_name = RegionOne

ceilometer.conf

[DEFAULT]
meter_dispatchers=gnocchi
event_dispatchers=gnocchi
transport_url = rabbit://openstack:pass123456@controller3

[dispatcher_gnocchi]
filter_service_activity = False
archive_policy = low

[service_credentials]
auth_type = password
auth_url = http://controller3:5000/v3
project_domain_name = default
user_domain_name = default
project_name = service
username = ceilometer
password = pass123456
interface = internalURL
region_name = RegionOne