neutronclient.shell Connection to neutron failed: (403, 'Forbidden')

asked 2014-02-21 08:47:24 -0500

johnpaul-m gravatar image

When I tried to run any command with neutron client I get the above error.

I checked the nova.conf,neutron.conf and api-paste.ini and the credentials are matching. I dont see the same problem when using the nova client

[root@localhost ~(keystone_services)]# neutron --debug -v net-list DEBUG: neutronclient.neutron.v2_0.network.ListNetwork get_data(Namespace(columns=[], fields=[], formatter='table', page_size=None, quote_mode='nonnumeric', request_format='json', show_details=False, sort_dir=[], sort_key=[])) ('Details username ', 'neutron', 'tenant name', 'services', 'password', '512e6a2f7d854ebc', 'url', 'http://10.137.195.50:35357/v2.0/') DEBUG: neutronclient.client REQ: curl -i http://10.137.195.50:35357/v2.0/tokens -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-neutronclient" -d '{"auth": {"tenantName": "services", "passwordCredentials": {"username": "neutron", "password": "512e6a2f7d854ebc"}}}'

ERROR: neutronclient.shell Connection to neutron failed: (403, 'Forbidden') Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/neutronclient/shell.py", line 517, in run_subcommand return run_command(cmd, cmd_parser, sub_argv) File "/usr/lib/python2.6/site-packages/neutronclient/shell.py", line 78, in run_command return cmd.run(known_args) File "/usr/lib/python2.6/site-packages/neutronclient/common/command.py", line 35, in run return super(OpenStackCommand, self).run(parsed_args) File "/usr/lib/python2.6/site-packages/cliff/display.py", line 84, in run column_names, data = self.take_action(parsed_args) File "/usr/lib/python2.6/site-packages/neutronclient/common/command.py", line 41, in take_action return self.get_data(parsed_args) File "/usr/lib/python2.6/site-packages/neutronclient/neutron/v2_0/__init__.py", line 586, in get_data data = self.retrieve_list(parsed_args) File "/usr/lib/python2.6/site-packages/neutronclient/neutron/v2_0/__init__.py", line 532, in retrieve_list neutron_client = self.get_client() File "/usr/lib/python2.6/site-packages/neutronclient/neutron/v2_0/__init__.py", line 330, in get_client return self.app.client_manager.neutron File "/usr/lib/python2.6/site-packages/neutronclient/common/clientmanager.py", line 41, in __get__ self._handle = self.factory(instance) File "/usr/lib/python2.6/site-packages/neutronclient/neutron/client.py", line 36, in make_client instance.initialize() File "/usr/lib/python2.6/site-packages/neutronclient/common/clientmanager.py", line 93, in initialize httpclient.authenticate() File "/usr/lib/python2.6/site-packages/neutronclient/client.py", line 232, in authenticate content_type="application/json") File "/usr/lib/python2.6/site-packages/neutronclient/client.py", line 152, in _cs_request raise exceptions.ConnectionFailed(reason=e) ConnectionFailed: Connection to neutron failed: (403, 'Forbidden') DEBUG: neutronclient.shell clean_up ListNetwork DEBUG: neutronclient.shell got an error: Connection to neutron failed: (403, 'Forbidden')

When I execute the curl command seperately I successfully get the tokens. But the neutron client get a response back as Forbidden.

Do this happen when neutron client sends the request with token to neutron server / keystone server ?

which configuration I should check to fix this issue ?

edit retag flag offensive close merge delete