commend 【ceph dashboard create-self-signed-cert】 ERR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




HI,Cephers:

    I just use Mimic  Ceph  for Dashboard. I just do as http://docs.ceph.com/docs/mimic/mgr/dashboard/ 

When   install a self-signed certificate as build-in commend , it stuck ERR like as bellow:
    
[root@localhost ~]# ceph dashboard create-self-signed-cert
Error EINVAL: Traceback (most recent call last):
  File "/usr/lib64/ceph/mgr/dashboard/module.py", line 319, in handle_command
    self.create_self_signed_cert()
  File "/usr/lib64/ceph/mgr/dashboard/module.py", line 328, in create_self_signed_cert
    pkey.generate_key(crypto.TYPE_RSA, 2048)
Error: [('rsa routines', 'RSA_BUILTIN_KEYGEN', 'BN lib')]

I check the  /usr/lib64/ceph/mgr/dashboard/module.py . And execute in local  env. it's  OK.

```
[root@localhost ~]# cat xx.py
from OpenSSL import crypto
from uuid import uuid4

def create_self_signed_cert():
    # create a key pair
    pkey = crypto.PKey()
    pkey.generate_key(crypto.TYPE_RSA, 2048)
    # create a self-signed cert
    cert = crypto.X509()
    cert.get_subject().O = "IT"
    cert.get_subject().CN = "ceph-dashboard"
    cert.set_serial_number(int(uuid4()))
    cert.gmtime_adj_notBefore(0)
    cert.gmtime_adj_notAfter(10*365*24*60*60)
    cert.set_issuer(cert.get_subject())
    cert.set_pubkey(pkey)
    cert.sign(pkey, 'sha512')

    cert = crypto.dump_certificate(crypto.FILETYPE_PEM, cert)
    print cert

    pkey = crypto.dump_privatekey(crypto.FILETYPE_PEM, pkey)
    print pkey

create_self_signed_cert()

[root@localhost ~]# python xx.py
-----BEGIN CERTIFICATE-----
MIICzzCCAbcCEDPwZUMnzU46kIAo0OdYes8wDQYJKoZIhvcNAQENBQAwJjELMAkG
A1UEChMCSVQxFzAVBgNVBAMTDmNlcGgtZGFzaGJvYXJkMB4XDTE4MDcwMzA1MTEx
OFoXDTI4MDYzMDA1MTExOFowJjELMAkGA1UEChMCSVQxFzAVBgNVBAMTDmNlcGgt
ZGFzaGJv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pj/qH0WMtZMh
2jGfJpVdee+IkeP+E4FoDcIHgLmC9Oo7Xq6cdm3Y5DShr0brThV+PKjddOaIHwL3
u3V5rinsvEaB0+nI5ywSP21iA4ixkysc4+t46OZRAoGBAKnlID2KANL/JllCyLZF
LpnodKn0l7K40QWgbhfBxT/AqiRSR8rTIkTGP/Vkj0IwOBjp8zj/D5/6GjazbPXC
J3O45Fpu6ESkx/LUKBjncvyww7b9UNHY2tPQW1HliUexd7mufRGn0urFZjabPCuO
84KXuWTVsQjT0oChqsToh3Oy
-----END PRIVATE KEY-----
````

What can I do ? somebody give me  some suggestion .


发自网易邮箱大师

_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux