gnocchi port not open
I configured gnocchi and started its services successfully. But port 8041 is not open. So, when I run gnocchi commands, it is failing.
[root@controller1 ~ (admin)]# 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 0x3a92310>: Failed to establish a new connection: [Errno 111] Connection refused',))
I have provided gnocchi.conf, and gnocchi services' status below.
[root@controller1 ~ (admin)]# systemctl is-active openstack-gnocchi-api.service openstack-gnocchi-metricd.service openstack-gnocchi-statsd.service
active
active
active
[root@controller1 ~ (admin)]# cat /etc/gnocchi/gnocchi.conf
[DEFAULT]
debug = true
verbose = true
log_dir = /var/log/gnocchi
[api]
auth_mode = keystone
max_limit = 1000
host=10.0.0.12
workers=4
port=8041
[database]
backend = sqlalchemy
[indexer]
url = mysql+pymysql://gnocchi:GNOCCHI_DBPASS@10.0.0.11/gnocchi
[keystone_authtoken]
auth_url = http://10.0.0.11:5000/v3
auth_type = password
project_domain_name = Default
user_domain_name = Default
project_name = service
username = gnocchi
password = GNOCCHI_PASS
interface = internalURL
region_name = RegionOne
[oslo_policy]
policy_file = /etc/gnocchi/policy.json
[statsd]
resource_id = b21b5f8e-37b4-41af-9e43-29e489fa129e
user_id = a0017c7c-6775-426d-a997-8fd4fa2e2069
project_id = 6b897f1e-2422-43ae-bd8d-b232a34c1d8f
archive_policy_name = low
flush_delay = 5
[storage]
driver = ceph
ceph_pool = metrics
ceph_username = gnocchi
ceph_keyring = /etc/ceph/ceph.client.gnocchi.keyring
ceph_conffile = /etc/ceph/ceph.conf
It looks like gnocchi-api is listening on port 8000 instead of port 8041.
[root@controller1 ~ (admin)]# systemctl status openstack-gnocchi-api.service -l
● openstack-gnocchi-api.service - OpenStack ceilometer API service
Loaded: loaded (/usr/lib/systemd/system/openstack-gnocchi-api.service; enabled; vendor preset: disabled)
Active: active (running) since Sat 2017-07-01 09:56:28 EDT; 10min ago
Main PID: 18682 (gnocchi-api)
CGroup: /system.slice/openstack-gnocchi-api.service
└─18682 /usr/bin/python2 /usr/bin/gnocchi-api -- --logfile /var/log/gnocchi/api.log
Jul 01 09:56:32 controller1 gnocchi-api[18682]: Available at http://10.0.0.12:8000/
Jul 01 09:56:32 controller1 gnocchi-api[18682]: DANGER! For testing only, do not use in production
Jul 01 09:56:32 controller1 gnocchi-api[18682]: ********************************************************************************
Jul 01 09:57:53 controller1 gnocchi-api[18682]: 10.0.0.12 - - [01/Jul/2017 09:57:53] "GET /v1/resource/image HTTP/1.1" 401 114
Jul 01 09:58:00 controller1 gnocchi-api[18682]: 10.0.0.12 - - [01/Jul/2017 09:58:00] "GET /v1/resource/image HTTP/1.1" 401 114
Jul 01 09:58:17 controller1 gnocchi-api[18682]: 10.0.0.12 - - [01/Jul/2017 09:58:17] "GET /v1/resource/image HTTP/1.1" 401 114
Jul 01 09:58:28 controller1 gnocchi-api[18682]: 10.0.0.12 - - [01/Jul/2017 09:58:28] "GET /v1/resource/image HTTP/1.1" 401 114
Jul 01 09:58:35 controller1 gnocchi-api[18682]: 10.0.0.12 - - [01/Jul/2017 09:58:35] "GET /v1/resource/image HTTP/1.1" 401 114
Jul 01 09:58:47 controller1 gnocchi-api[18682]: 10.0.0.12 - - [01/Jul/2017 09:58:47] "GET /v1/resource/image HTTP/1.1" 401 114
Jul 01 10:01:31 controller1 gnocchi-api[18682]: 10.0.0.12 - - [01/Jul/2017 10:01:31 ...