Ask Your Question
0

Unable to create key pair: Keypair data is invalid: failed to generate fingerprint (HTTP 400)

asked 2015-12-26 21:23:21 -0500

vpel4 gravatar image

Hi,

I have installed rdo openstack (liberty) on a CentOS 7 VM. When i try to create a key pair it always fails with the error "Unable to create key pair: Keypair data is invalid: failed to generate fingerprint (HTTP 400)". I tried to create a key pair manually and import it but the result is same. I also do not have any special characters in the key name. This is the debug error i see. Can anyone point me to where the problem might be ?

============= Start of Error log =============

DEBUG (session:198) REQ: curl -g -i -X GET http://192.168.1.101:5000/v2.0 -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
INFO (connectionpool:203) Starting new HTTP connection (1): 192.168.1.101
DEBUG (connectionpool:383) "GET /v2.0 HTTP/1.1" 200 230

DEBUG (session:215) RESP: [200] content-length: 230 content-encoding: gzip vary: X-Auth-Token,Accept-Encoding server: Apache/2.4.6 (CentOS) connection: close date: Sun, 20 Dec 2015 05:31:49 GMT content-type: application/json x-openstack-request-id: req-b0d0e036-271e-4645-9b88-72520cd6fde3
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://192.168.1.101:5000/v2.0/", "rel": "self"}, {"href": "http://docs.openstack.org/", "type": "text/html", "rel": "describedby"}]}}

DEBUG (v2:86) Making authentication request to http://192.168.1.101:5000/v2.0/tokens
INFO (connectionpool:238) Resetting dropped connection: 192.168.1.101
DEBUG (connectionpool:383) "POST /v2.0/tokens HTTP/1.1" 200 987
DEBUG (session:198) REQ: curl -g -i -X GET http://192.168.1.101:8774/v2/ -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}568a80dbce1602644073a3c123c4018fb502afb0"
INFO (connectionpool:203) Starting new HTTP connection (1): 192.168.1.101
DEBUG (connectionpool:383) "GET /v2/ HTTP/1.1" 200 378
DEBUG (session:215) RESP: [200] date: Sun, 20 Dec 2015 05:31:50 GMT connection: keep-alive content-type: application/json content-length: 378 x-compute-request-id: req-37898050-ecc4-45df-94bd-3e0d2f7f7a3a

RESP BODY: {"version": {"status": "SUPPORTED", "updated": "2011-01-21T11:33:21Z", "links": [{"href": "http://192.168.1.101:8774/v2/", "rel": "self"}, {"href": "http://docs.openstack.org/", "type": "text/html", "rel": "describedby"}], "min_version": "", "version": "", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.compute+json;version=2"}], "id": "v2.0"}}

DEBUG (session:198) REQ: curl -g -i -X POST http://192.168.1.101:8774/v2/313b59f9fd764834bdf102d5ece898ac/os-keypairs -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}568a80dbce1602644073a3c123c4018fb502afb0" -d '{"keypair": {"name": "testadm"}}'

DEBUG (connectionpool:383) "POST /v2/313b59f9fd764834bdf102d5ece898ac/os-keypairs HTTP/1.1" 400 99

DEBUG (session:215) RESP: [400] date: Sun, 20 Dec 2015 05:31:50 GMT connection: keep-alive content-type: application/json; charset=UTF-8 content-length: 99 x-compute-request-id: req-9de7cb8b-63d3-4bac-b338-66f783967bb6

RESP BODY: {"badRequest": {"message": "Keypair data is invalid: failed to generate fingerprint", "code": 400}}

DEBUG (shell:905) Keypair data is invalid: failed to generate fingerprint (HTTP 400) (Request-ID: req-9de7cb8b-63d3-4bac-b338-66f783967bb6)

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/novaclient/shell.py", line 903, in main
    OpenStackComputeShell().main(argv)
  File "/usr/lib ...
(more)
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2015-12-29 00:56:59 -0500

vpel4 gravatar image

I could finally spot the issue after digging into the python code. The code is failing when calling "serialization.load_ssh_public_key(pub_bytes, backends.default_backend)" in crypto.py because the python cryptography is calling an old python-cffi module. This is in turn because rdo packstack installs python-cffi 0.8.6 where in it should install python-cffi 1.1.2. There is already a bug raised on it https://bugs.launchpad.net/devstack/+bug/1484870 (link text). So to solve the keypair issue, just update the python-cffi package using yum or remove it and install the latest version using pip. I used yum as it could detect the new version - "yum update python-cffi"

Hope this helps other users who face the same issue.

edit flag offensive delete link more

Comments

I update the python-cffi and found that OpenStack Neutron, Cinder and Swift component all failed...

luckyyd gravatar imageluckyyd ( 2016-01-07 04:04:26 -0500 )edit

Hi luckyyd, were you able to solve the issue of the components failing? Because i am facing the same issue, seems like a mismatch happening in python packages. Moreover it seems the above components command dont work but doing the same using openstack --cli commands work fine.

mostwanted gravatar imagemostwanted ( 2016-09-06 02:33:14 -0500 )edit
0

answered 2015-12-27 22:51:45 -0500

Bipin gravatar image

Hello,

Your Question is answered here

Regards

edit flag offensive delete link more

Comments

Hi, Thanks.I did check that thread before posting the question but the suggestions mentioned there did not help.In my case, I do not have any comments on my key file.Also, recreating a new public key did not work for me. I have done 3 fresh installs but all same issue.Above is the the nova-api log

vpel4 gravatar imagevpel4 ( 2015-12-28 21:55:25 -0500 )edit

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

1 follower

Stats

Asked: 2015-12-26 21:23:21 -0500

Seen: 3,165 times

Last updated: Dec 29 '15