Ask Your Question

Ceilometer AttributeError: 'unicode' object has no attribute 'iteritems'

asked 2016-01-11 04:01:35 -0500

zsolt-krenak gravatar image

updated 2016-01-11 06:43:50 -0500


I installed ceilometer in our lab environment. When I try to open the resource usage on dashboard, or do a list command with cli I've got the following error:

AttributeError: 'unicode' object has no attribute 'iteritems'

CLI debug output:

ubuntu@kvm5:~$ ceilometer -d meter-list
DEBUG (session) REQ: curl -g -i -X GET http://vip.mgmt.lab.intra:5000/v2.0 -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
DEBUG (session) RESP: [200] content-length: 352 x-distribution: Ubuntu vary: X-Auth-Token server: Apache/2.4.7 (Ubuntu) date: Mon, 11 Jan 2016 09:46:09 GMT content-type: application/json x-openstack-request-id: req-ab856ae4-7852-4870-89ab-0e3417328c51
RESP BODY: {"version": {"status": "stable", "updated": "2014-04-17T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}], "id": "v2.0", "links": [{"href": "http://vip.mgmt.lab.intra:5000/v2.0/", "rel": "self"}, {"href": "", "type": "text/html", "rel": "describedby"}]}}

DEBUG (v2) Making authentication request to http://vip.mgmt.lab.intra:5000/v2.0/tokens
DEBUG (client) REQ: curl -g -i -X 'GET' 'http://vip.mgmt.lab.intra:8777/v2/meters' -H 'User-Agent: ceilometerclient.openstack.common.apiclient' -H 'X-Auth-Token: {SHA1}99a5695572cb65bb5d4886d168349704a333d7e0'
DEBUG (client) RESP: [300] CaseInsensitiveDict({'date': 'Mon, 11 Jan 2016 09:46:10 GMT', 'content-length': '133', 'content-type': 'application/json; charset=UTF-8', 'x-openstack-request-id': 'req-35942073-9987-4e4c-ac16-2677020ba0c9'})

DEBUG (client) RESP BODY: {"versions": [{"status": "CURRENT", "id": "v1.0", "links": [{"href": "http://vip.mgmt.lab.intra:8777/v1/", "rel": "self"}]}]}

Traceback (most recent call last):
  File "/usr/bin/ceilometer", line 10, in <module>
  File "/usr/lib/python2.7/dist-packages/ceilometerclient/", line 297, in main
  File "/usr/lib/python2.7/dist-packages/ceilometerclient/", line 246, in main
    args.func(client, args)
  File "/usr/lib/python2.7/dist-packages/ceilometerclient/v2/", line 234, in do_meter_list
    meters = cc.meters.list(q=options.cli_to_array(args.query))
  File "/usr/lib/python2.7/dist-packages/ceilometerclient/v2/", line 30, in list
    return self._list(options.build_url(path, q))
  File "/usr/lib/python2.7/dist-packages/ceilometerclient/common/", line 85, in _list
    return [obj_class(self, res, loaded=True) for res in data if res]
  File "/usr/lib/python2.7/dist-packages/ceilometerclient/openstack/common/apiclient/", line 458, in __init__
  File "/usr/lib/python2.7/dist-packages/ceilometerclient/openstack/common/apiclient/", line 479, in _add_details
    for (k, v) in six.iteritems(info):
  File "/usr/lib/python2.7/dist-packages/", line 576, in iteritems
    return iter(d.iteritems(**kw))
AttributeError: 'unicode' object has no attribute 'iteritems'

It's very strange that in the last response the API version seems to be v1.0 but it's deprecated and the requests go to V2 so I really don't understand what is going on.

My config file without the passwords:

verbose = False
debug = True

auth_strategy = keystone


port = 8777
host =


backend_url = redis://controller1.mgmt.lab.intra:26379?sentinel=telemetry_cluster&sentinel_fallback=controller3.mgmt.lab.intra:26379&sentinel_fallback=controller2.mgmt.lab.intra:26379
heartbeat = 3.0


metering_time_to_live = 604800 ...
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-01-11 08:01:40 -0500

zsolt-krenak gravatar image

Solved. There was some really weird error in haproxy where it failed to correctly reload config which was previously wrong. So HaProxy worked with a bad configuration where it proxyed Ceilometer requests to Heat API.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools


Asked: 2016-01-11 04:01:35 -0500

Seen: 1,304 times

Last updated: Jan 11 '16