[Openstack] Cinder ERROR: Malformed request url (HTTP 400) again
List, I'm a new OpenStack user who has become exceptionally frustrated trying to get Cinder running. I initially installed nova-volume, which appeared to work, and then followed the instructions on https://wiki.openstack.org/wiki/MigrateToCinder to migrate. Here is where I am stuck: seemingly every call I make against Cinder's API results in an HTTP 400. Here's an example call: # cinder --debug list connect: (192.168.128.6, 5000) send: 'POST /v2.0/tokens HTTP/1.1\r\nHost: 192.168.128.6:5000\r\nContent-Length: 100\r\ncontent-type: application/json\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-cinderclient\r\n\r\n' send: '{auth: {tenantName: admin, passwordCredentials: {username: admin, password: admin}}}' reply: 'HTTP/1.1 200 OK\r\n' header: Vary: X-Auth-Token header: Content-Type: application/json header: Content-Length: 2687 header: Date: Wed, 08 May 2013 22:42:27 GMT connect: (10.2.232.6, 8776) send: u'GET /v1/c625d5b2b9e24f72acb2d298682ab002/volumes/detail HTTP/1.1\r\nHost: 10.2.232.6:8776\r\nx-auth-project-id: admin\r\nx-auth-token: 515e478eca244282a1617e43a8881c0b\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-cinderclient\r\n\r\n' reply: 'HTTP/1.1 400 Bad Request\r\n' header: Content-Length: 65 header: Content-Type: application/json; charset=UTF-8 header: X-Compute-Request-Id: req-7e360dc5-8f54-477f-833c-e0ab0d20aef6 header: Date: Wed, 08 May 2013 22:42:27 GMT DEBUG (shell:473) Malformed request url (HTTP 400) (Request-ID: req-7e360dc5-8f54-477f-833c-e0ab0d20aef6) Traceback (most recent call last): File /usr/lib/python2.6/site-packages/cinderclient/shell.py, line 470, in main OpenStackCinderShell().main(sys.argv[1:]) File /usr/lib/python2.6/site-packages/cinderclient/shell.py, line 421, in main args.func(self.cs, args) File /usr/lib/python2.6/site-packages/cinderclient/v1/shell.py, line 139, in do_list volumes = cs.volumes.list(search_opts=search_opts) File /usr/lib/python2.6/site-packages/cinderclient/v1/volumes.py, line 171, in list volumes) File /usr/lib/python2.6/site-packages/cinderclient/base.py, line 63, in _list resp, body = self.api.client.get(url) File /usr/lib/python2.6/site-packages/cinderclient/client.py, line 138, in get return self._cs_request(url, 'GET', **kwargs) File /usr/lib/python2.6/site-packages/cinderclient/client.py, line 126, in _cs_request **kwargs) File /usr/lib/python2.6/site-packages/cinderclient/client.py, line 109, in request raise exceptions.from_response(resp, body) BadRequest: Malformed request url (HTTP 400) (Request-ID: req-7e360dc5-8f54-477f-833c-e0ab0d20aef6) ERROR: Malformed request url (HTTP 400) (Request-ID: req-7e360dc5-8f54-477f-833c-e0ab0d20aef6) Nothing at all shows up in the Cinder API logs when I make this call, even with the --debug option to cinder-api. After many hours Googling the problem, it would seem that the it's either a malformed endpoint URL or missing auth_strategy, but neither of these are the case: # keystone endpoint-list +--+---+--+-++--+ |id| region | publicurl | internalurl | adminurl | service_id| +--+---+--+-++--+ | 6c2d093802744c0398bbd62dc5fbc070 | RegionOne | http://10.2.232.6:8773/services/Cloud | http://192.168.128.6:8773/services/Cloud| http://192.168.128.6:8773/services/Admin | d4ab7bb8490385bfb5457311b88c | | 8900b9d947d24ec280b67abb8c67b4d1 | RegionOne | http://10.2.232.6:8774/v2/%(tenant_id)s| http://192.168.128.6:8774/v2/%(tenant_id)s | http://192.168.128.6:8774/v2/%(tenant_id)s | bb2a06fefa224e5c898eaeed41295c71 | | 8a7ae87b296f45259060485e37de74f9 | RegionOne | http://10.2.232.6:8776/v1/%(tenant_id)s| http://192.168.128.6:8776/v1/%(tenant_id)s | http://192.168.128.6:8776/v1/%(tenant_id)s | f6e7b002545449cb9270a39219f3bced | | 93b4c45c1c904b4c8d590e6a68d934db | RegionOne | http://10.2.232.6:8080/v1/AUTH_%(tenant_id)s | http://192.168.128.6:8080/v1/AUTH_%(tenant_id)s | http://192.168.128.6:8080/ | 9f35f633bed8403d82f0b5d7d3a34f64 | | ac260159c97f4bd8a832cdfe13635f71 | RegionOne | http://10.2.232.6:8080|http://192.168.128.6:8080 | http://192.168.128.6:8080 | 7372bc8175c048abb1195708e335725b | | e561e10200054fdb96d93002f99bf6cc | RegionOne | http://10.2.232.6:9292|http://192.168.128.6:9292 | http://192.168.128.6:9292
[Openstack] Cinder ERROR: Malformed request url (HTTP 400) again
List, I'm a new OpenStack user who has become exceptionally frustrated trying to get Cinder running. I initially installed nova-volume, which appeared to work, and then followed the instructions on https://wiki.openstack.org/wiki/MigrateToCinder to migrate. Here is where I am stuck: seemingly every call I make against Cinder's API results in an HTTP 400. Here's an example call: # cinder --debug list connect: (192.168.128.6, 5000) send: 'POST /v2.0/tokens HTTP/1.1\r\nHost: 192.168.128.6:5000\r\nContent-Length: 100\r\ncontent-type: application/json\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-cinderclient\r\n\r\n' send: '{auth: {tenantName: admin, passwordCredentials: {username: admin, password: admin}}}' reply: 'HTTP/1.1 200 OK\r\n' header: Vary: X-Auth-Token header: Content-Type: application/json header: Content-Length: 2687 header: Date: Wed, 08 May 2013 22:42:27 GMT connect: (10.2.232.6, 8776) send: u'GET /v1/c625d5b2b9e24f72acb2d298682ab002/volumes/detail HTTP/1.1\r\nHost: 10.2.232.6:8776\r\nx-auth-project-id: admin\r\nx-auth-token: 515e478eca244282a1617e43a8881c0b\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-cinderclient\r\n\r\n' reply: 'HTTP/1.1 400 Bad Request\r\n' header: Content-Length: 65 header: Content-Type: application/json; charset=UTF-8 header: X-Compute-Request-Id: req-7e360dc5-8f54-477f-833c-e0ab0d20aef6 header: Date: Wed, 08 May 2013 22:42:27 GMT DEBUG (shell:473) Malformed request url (HTTP 400) (Request-ID: req-7e360dc5-8f54-477f-833c-e0ab0d20aef6) Traceback (most recent call last): File /usr/lib/python2.6/site-packages/cinderclient/shell.py, line 470, in main OpenStackCinderShell().main(sys.argv[1:]) File /usr/lib/python2.6/site-packages/cinderclient/shell.py, line 421, in main args.func(self.cs, args) File /usr/lib/python2.6/site-packages/cinderclient/v1/shell.py, line 139, in do_list volumes = cs.volumes.list(search_opts=search_opts) File /usr/lib/python2.6/site-packages/cinderclient/v1/volumes.py, line 171, in list volumes) File /usr/lib/python2.6/site-packages/cinderclient/base.py, line 63, in _list resp, body = self.api.client.get(url) File /usr/lib/python2.6/site-packages/cinderclient/client.py, line 138, in get return self._cs_request(url, 'GET', **kwargs) File /usr/lib/python2.6/site-packages/cinderclient/client.py, line 126, in _cs_request **kwargs) File /usr/lib/python2.6/site-packages/cinderclient/client.py, line 109, in request raise exceptions.from_response(resp, body) BadRequest: Malformed request url (HTTP 400) (Request-ID: req-7e360dc5-8f54-477f-833c-e0ab0d20aef6) ERROR: Malformed request url (HTTP 400) (Request-ID: req-7e360dc5-8f54-477f-833c-e0ab0d20aef6) Nothing at all shows up in the Cinder API logs when I make this call, even with the --debug option to cinder-api. After many hours Googling the problem, it would seem that the it's either a malformed endpoint URL or missing auth_strategy, but neither of these are the case: # keystone endpoint-list +--+---+--+-++--+ |id| region | publicurl | internalurl | adminurl | service_id| +--+---+--+-++--+ | 6c2d093802744c0398bbd62dc5fbc070 | RegionOne | http://10.2.232.6:8773/services/Cloud | http://192.168.128.6:8773/services/Cloud| http://192.168.128.6:8773/services/Admin | d4ab7bb8490385bfb5457311b88c | | 8900b9d947d24ec280b67abb8c67b4d1 | RegionOne | http://10.2.232.6:8774/v2/%(tenant_id)s| http://192.168.128.6:8774/v2/%(tenant_id)s | http://192.168.128.6:8774/v2/%(tenant_id)s | bb2a06fefa224e5c898eaeed41295c71 | | 8a7ae87b296f45259060485e37de74f9 | RegionOne | http://10.2.232.6:8776/v1/%(tenant_id)s| http://192.168.128.6:8776/v1/%(tenant_id)s | http://192.168.128.6:8776/v1/%(tenant_id)s | f6e7b002545449cb9270a39219f3bced | | 93b4c45c1c904b4c8d590e6a68d934db | RegionOne | http://10.2.232.6:8080/v1/AUTH_%(tenant_id)s | http://192.168.128.6:8080/v1/AUTH_%(tenant_id)s | http://192.168.128.6:8080/ | 9f35f633bed8403d82f0b5d7d3a34f64 | | ac260159c97f4bd8a832cdfe13635f71 | RegionOne | http://10.2.232.6:8080|http://192.168.128.6:8080 | http://192.168.128.6:8080 | 7372bc8175c048abb1195708e335725b | | e561e10200054fdb96d93002f99bf6cc | RegionOne | http://10.2.232.6:9292|http://192.168.128.6:9292 | http://192.168.128.6:9292
Re: [Openstack] Cinder ERROR: Malformed request url (HTTP 400) again
That resulted in pretty much what I expected. Nothing apparently helpful here: # keystone token-get +---+--+ | Property | Value | +---+--+ | expires | 2013-05-09T23:41:54Z | | id| 9eec29cdddb34773b1f65c9290c5c74f | | tenant_id | c625d5b2b9e24f72acb2d298682ab002 | | user_id | d0aa54ac7bb844879f689e96acee33ee | +---+--+ # curl http://10.2.232.6:8776/v1/c625d5b2b9e24f72acb2d298682ab002/volumes/detail -H 'x-auth-token: 9eec29cdddb34773b1f65c9290c5c74f' --verbose * About to connect() to 10.2.232.6 port 8776 (#0) * Trying 10.2.232.6... connected * Connected to 10.2.232.6 (10.2.232.6) port 8776 (#0) GET /v1/c625d5b2b9e24f72acb2d298682ab002/volumes/detail HTTP/1.1 User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.13.1.0 zlib/1.2.3 libidn/1.18 libssh2/1.2.2 Host: 10.2.232.6:8776 Accept: */* x-auth-token: 9eec29cdddb34773b1f65c9290c5c74f HTTP/1.1 400 Bad Request Content-Length: 65 Content-Type: application/json; charset=UTF-8 X-Compute-Request-Id: req-0ebed90c-9405-4168-9f69-cd3725d6117d Date: Wed, 08 May 2013 23:43:12 GMT * Connection #0 to host 10.2.232.6 left intact * Closing connection #0 {badRequest: {message: Malformed request url, code: 400}} It did occur to me that there is an instance of haproxy running in front of this at that address, but I get the same result if I curl the real socket directly: # netstat -ntpl | grep 8776 tcp0 0 192.168.128.2:8776 0.0.0.0:* LISTEN 3808/python tcp0 0 192.168.128.6:8776 0.0.0.0:* LISTEN 2826/haproxy tcp0 0 10.2.232.6:8776 0.0.0.0:* LISTEN 2826/haproxy # curl http://192.168.128.2:8776/v1/c625d5b2b9e24f72acb2d298682ab002/volumes/detail -H 'x-auth-token: 9eec29cdddb34773b1f65c9290c5c74f' --verbose * About to connect() to 192.168.128.2 port 8776 (#0) * Trying 192.168.128.2... connected * Connected to 192.168.128.2 (192.168.128.2) port 8776 (#0) GET /v1/c625d5b2b9e24f72acb2d298682ab002/volumes/detail HTTP/1.1 User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.13.1.0 zlib/1.2.3 libidn/1.18 libssh2/1.2.2 Host: 192.168.128.2:8776 Accept: */* x-auth-token: 9eec29cdddb34773b1f65c9290c5c74f HTTP/1.1 400 Bad Request Content-Length: 65 Content-Type: application/json; charset=UTF-8 X-Compute-Request-Id: req-56ef1893-d9fd-4d25-ab20-555e0e8d6bd5 Date: Wed, 08 May 2013 23:44:14 GMT * Connection #0 to host 192.168.128.2 left intact * Closing connection #0 {badRequest: {message: Malformed request url, code: 400}} On 2013-05-08 19:40, Dolph Mathews wrote: It looks like cinderclient is authenticating successfully with keystone, and something unexpected is happening at the cinder endpoint. I'd suggest trying to replay cinderclient's request using something like curl to perhaps provide more insight into what's actually going on. # curl http://10.2.232.6:8776/v1/c625d5b2b9e24f72acb2d298682ab002/volumes/detail -H 'x-auth-token:515e478eca244282a1617e43a8881c0b' --verbose You may need a fresh x-auth-token, but the one above is from your copy/paste and may still be valid (if not, use $ keystone token-get) -Dolph On Wed, May 8, 2013 at 5:52 PM, Erick Turnquist jhujh...@adjectivism.org mailto:jhujh...@adjectivism.org wrote: List, I'm a new OpenStack user who has become exceptionally frustrated trying to get Cinder running. I initially installed nova-volume, which appeared to work, and then followed the instructions on https://wiki.openstack.org/wiki/MigrateToCinder to migrate. Here is where I am stuck: seemingly every call I make against Cinder's API results in an HTTP 400. Here's an example call: # cinder --debug list connect: (192.168.128.6, 5000) send: 'POST /v2.0/tokens HTTP/1.1\r\nHost: 192.168.128.6:5000 http://192.168.128.6:5000\r\nContent-Length: 100\r\ncontent-type: application/json\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-cinderclient\r\n\r\n' send: '{auth: {tenantName: admin, passwordCredentials: {username: admin, password: admin}}}' reply: 'HTTP/1.1 200 OK\r\n' header: Vary: X-Auth-Token header: Content-Type: application/json header: Content-Length: 2687 header: Date: Wed, 08 May 2013 22:42:27 GMT connect: (10.2.232.6, 8776) send: u'GET /v1/c625d5b2b9e24f72acb2d298682ab002/volumes/detail HTTP/1.1\r\nHost: 10.2.232.6:8776 http://10.2.232.6:8776\r\nx-auth-project-id: admin\r\nx-auth-token: 515e478eca244282a1617e43a8881c0b\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-cinderclient\r\n\r\n' reply: 'HTTP/1.1 400 Bad Request\r\n' header: Content-Length: 65 header