简体   繁体   English

JupyterHub openssl自签名证书“​​错误:错误:0906D06C:PEM例程:PEM_read_bio:无起始行”

[英]JupyterHub openssl self signed cert “Error: error:0906D06C:PEM routines:PEM_read_bio:no start line”

Trying to configure at JupyterHub on a AWS instance using a self signed OPENSSL key/cert pair. 尝试使用自签名OPENSSL密钥/证书对在AWS实例上的JupyterHub上进行配置。 I have tried several openssl configurations, and continued to have this same error. 我尝试了几种openssl配置,并继续出现此相同错误。

jupyterhub
[I 2016-10-04 03:38:24.090 JupyterHub app:622] Loading cookie_secret from           /home/ubuntu/jupyterhub_cookie_secret
[W 2016-10-04 03:38:24.123 JupyterHub app:304] 
    Generating CONFIGPROXY_AUTH_TOKEN. Restarting the Hub will require     restarting the proxy.
    Set CONFIGPROXY_AUTH_TOKEN env or JupyterHub.proxy_auth_token config to avoid this message.

[W 2016-10-04 03:38:24.127 JupyterHub app:757] No admin users, admin interface will be unavailable.
[W 2016-10-04 03:38:24.127 JupyterHub app:758] Add any administrative users to `c.Authenticator.admin_users` in config.
[I 2016-10-04 03:38:24.127 JupyterHub app:785] Not using whitelist. Any authenticated user will be allowed.
[I 2016-10-04 03:38:24.139 JupyterHub app:1231] Hub API listening on http://127.0.0.1:8081/hub/
[I 2016-10-04 03:38:24.143 JupyterHub app:968] Starting proxy @ http://*:8000/

crypto.js:128
      c.context.setKey(options.key);
            ^
Error: error:0906D06C:PEM routines:PEM_read_bio:no start line
    at Object.exports.createCredentials (crypto.js:128:17)
    at Server (tls.js:1176:28)
    at new Server (https.js:35:14)
    at Object.exports.createServer (https.js:54:10)
    at new ConfigurableProxy (/usr/lib/node_modules/configurable-http-    proxy/lib/configproxy.js:174:35)
    at Object.<anonymous> (/usr/lib/node_modules/configurable-http-proxy/bin/configurable-http-proxy:189:13)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
[C 2016-10-04 03:38:25.158 JupyterHub app:1237] Failed to start proxy
    Traceback (most recent call last):
      File "/home/ubuntu/anaconda3/lib/python3.5/site-packages/jupyterhub/app.py", line 1235, in start
    yield self.start_proxy()
      File "/home/ubuntu/anaconda3/lib/python3.5/site-packages/jupyterhub/app.py", line 989, in start_proxy
    _check()
      File "/home/ubuntu/anaconda3/lib/python3.5/site-packages/jupyterhub/app.py", line 985, in _check
        raise e
    RuntimeError: Proxy failed to start with exit code 8

Generated the current pair using this command 使用此命令生成当前对

openssl req -new -x509 -days 365 -utf8 -out mycert.pem -keyout mykey.pem

Verified that it is in fact PEM format 验证它实际上是PEM格式

openssl x509 -in mycert.pem -text -noout
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number:
            ec:16:a1:7d:64:6b:90:42
    Signature Algorithm: sha256WithRSAEncryption
        Issuer: C=SG, ST=SG, L=Singapore, O=GoldenCompass
        Validity
            Not Before: Oct  4 02:58:55 2016 GMT
            Not After : Oct  4 02:58:55 2017 GMT
        Subject: C=SG, ST=SG, L=Singapore, O=GoldenCompass
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (2048 bit)
<snippet>

jupyterhub_config.py jupyterhub_config.py

<snippet>
## Path to SSL certificate file for the public facing interface of the proxy
#  
#  Use with ssl_key
c.JupyterHub.ssl_cert = '/home/ubuntu/mykey.pem'

## Path to SSL key file for the public facing interface of the proxy
#  
#  Use with ssl_cert
c.JupyterHub.ssl_key = '/home/ubuntu/mycert.pem'

<snippet>

Your config has your certificate and key reversed: 您的配置已将您的证书和密钥取反:

You have this: 你有这个:

c.JupyterHub.ssl_cert = '/home/ubuntu/mykey.pem'
c.JupyterHub.ssl_key = '/home/ubuntu/mycert.pem'

but you should have this: 但是你应该有这个:

c.JupyterHub.ssl_cert = '/home/ubuntu/mycert.pem'
c.JupyterHub.ssl_key = '/home/ubuntu/mykey.pem'

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 OpenSSL 加密错误:[(&#39;PEM 例程&#39;,&#39;PEM_read_bio&#39;,&#39;无起始行&#39;)] - OpenSSL crypto error: [('PEM routines', 'PEM_read_bio', 'no start line')] 使用PFX证书的Python请求将不起作用! -OpenSSL.SSL.Error:[(&#39;PEM例程&#39;]-是否需要PFX到PEM的转换? - Python Requests using PFX certificate wont work ! - OpenSSL.SSL.Error: [('PEM routines'] - PFX to PEM conversion necessary? Python 请求:使用自签名证书直接固定 .pem - Python-Requests: direct .pem pinning with self-signed cert 生成用于与python请求一起使用的证书,得到PEM lib错误 - generating cert for use with python requests getting PEM lib error _ssl.c:351:错误:140B0009:SSL例程:SSL_CTX_use_PrivateKey_file:PEM库 - _ssl.c:351: error:140B0009:SSL routines:SSL_CTX_use_PrivateKey_file:PEM lib 没有起始行:crypto/pem/pem_lib.c:745:期望:证书请求 - no start line:crypto/pem/pem_lib.c:745:Expecting: CERTIFICATE REQUEST 尝试使用OpenSSL在python中读取CRL pem文件 - Trying to read CRL pem file in python with OpenSSL 找不到符号:_PEM_read_bio_EC_PUBKEY针对openssl 0.9.8x或1.0.0x编译时导入M2Crypto-0.20.2 - Symbol not found: _PEM_read_bio_EC_PUBKEY Importing M2Crypto-0.20.2 when compiled against openssl 0.9.8x or 1.0.0x 收到此错误:SSLError:[SSL] PEM库(_ssl.c:2515) - Getting this error :SSLError: [SSL] PEM lib (_ssl.c:2515) Python 请求合并 .pem 文件的 SSL 错误 - Python requests SSL error with combined .pem file
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM