Ask Your Question
0

gnocchi port not open

asked 2017-07-01 07:57:26 -0500

Elangovan Anganann gravatar image

updated 2017-07-01 09:10:51 -0500

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 ...
(more)
edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
1

answered 2017-07-03 07:28:58 -0500

CK Lai gravatar image

I was having the same issue. My workaround is updating /usr/bin/gnocchi-api:

FROM:

parser.add_argument('--port', '-p', type=int, default=8000,

TO:

parser.add_argument('--port', '-p', type=int, default=8041,

Then restart gnocchi service.

edit flag offensive delete link more
0

answered 2017-08-28 01:37:02 -0500

The openstack-gnocchi-api.service do not to run.The 8041 port is open by the httpd service. [root@control-01 ~(keystone_admin)]# cat /etc/httpd/conf/ports.conf

Listen 35357 Listen 5000 Listen 80 Listen 8041 Listen 8042 Listen 8777 [root@control-01 ~(keystone_admin)]# systemctl restart httpd

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2017-07-01 07:57:26 -0500

Seen: 1,081 times

Last updated: Aug 28 '17