3

I have jupyterhub installed in my server and all these days I was logging in without SSL certificate and everything was working fine. Now I have SSL certificate (.cer) and I have generated key from it and made changes in config file for c.JupyterHub.ssl_cert = '/opt/mycert.cer' and c.JupyterHub.ssl_key='/opt/mykey.pem'. But when I start jupyterhub I get below error.

[I 2021-03-23 09:50:15.434 JupyterHub proxy:646] Starting proxy @ http://10.203.6.43:8080/
_tls_common.js:113
      c.context.setCert(cert);
                ^

Error: error:0906D06C:PEM routines:PEM_read_bio:no start line
    at Object.createSecureContext (_tls_common.js:113:17)
    at Server (_tls_wrap.js:868:27)
    at new Server (https.js:62:14)
    at Object.createServer (https.js:84:10)
    at new ConfigurableProxy (/opt/anaconda3/lib/node_modules/configurable-http-proxy/lib/configproxy.js:223:32)
    at Object.<anonymous> (/opt/anaconda3/lib/node_modules/configurable-http-proxy/bin/configurable-http-proxy:333:13)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
[C 2021-03-23 09:50:16.537 JupyterHub app:2517] Failed to start proxy
    Traceback (most recent call last):
      File "/opt/anaconda3/lib/python3.8/site-packages/jupyterhub/app.py", line 2515, in start
        await self.proxy.start()
      File "/opt/anaconda3/lib/python3.8/site-packages/jupyterhub/proxy.py", line 673, in start
        _check_process()
      File "/opt/anaconda3/lib/python3.8/site-packages/jupyterhub/proxy.py", line 669, in _check_process
        raise e from None
    RuntimeError: Proxy failed to start with exit code 1
configurable-http-proxy --ip 10.203.6.43 --port 8080
10:05:21.706 [ConfigProxy] warn: REST API is not authenticated.
10:05:21.713 [ConfigProxy] info: Proxying http://10.203.6.43:8080 to (no default)
10:05:21.713 [ConfigProxy] info: Proxy API at http://localhost:8081/api/routes

I have generated key using below command

openssl x509 -inform der -in /opt/mycert.cer -pubkey -noout > /opt/mykey.pem

After looking at similar issues online still I don’t seem to overcome it. Can someone kindly help me with this error.

mockash
  • 1,204
  • 5
  • 14
  • 26

0 Answers0