I have error 400 Bad request when i use curl command in openstack

asked 2019-04-03 13:15:22 -0500

anonymous user

Anonymous

Hello

Try to get the list of images, when i execute this command "openstack image list" in the terminal it's work, but whe i try with curl command: curl -i -X GET "http://10.0.2.15/image/v2/images" -H "X-Auth-Token: $OS_TOKEN"

I have this error

 % Total    % Received % Xferd 
 Average Speed   Time    Time     Time 
 Current
                                  Dload  Upload   Total   Spent    Left  Speed
 100  3600  100  3331  100   269   3331
 269  0:00:01 --:--:--  0:00:01 92307
 HTTP/1.1 400 Bad Request Date: Wed, 03
 Apr 2019 17:41:50 GMT Server:
 Apache/2.4.27 (Ubuntu) Content-Length:
 301 Connection: close Content-Type:
 text/html; charset=iso-8859-1

 <!DOCTYPE HTML PUBLIC "-//IETF//DTD
 HTML 2.0//EN"> <html><head> <title>400
 Bad Request</title> </head><body>
 <h1>Bad Request</h1> <p>Your browser
 sent a request that this server could
 not understand.<br /> </p> <hr>
 <address>Apache/2.4.27 (Ubuntu) Server
 at 127.0.0.1 Port 80</address> </body></html>

Thank you in advance.

edit retag flag offensive close merge delete

Comments

Run openstack --debug image list to see wich curl command is issued by the openstack client.

Check the value of OS_TOKEN.

Bernd Bausch gravatar imageBernd Bausch ( 2019-04-03 17:43:09 -0500 )edit