大网数据广告活动
服务器运维问答

Use LetsEncrypt certs with Neo4j

· 52CE 我爱测

How can one use the certificate files generated by LetsEncrypt together with a Neo4j instance? The files generated by LetsEncrypt are: cert.pem chain.pem fullchain.pem privkey.pem I've tried conversion via OpenSSL with no luck so…

问题原文

原帖链接 · Michael Johansen · CC BY-SA 3.0

How can one use the certificate files generated by LetsEncrypt together with a Neo4j instance? The files generated by LetsEncrypt are:

  • cert.pem
  • chain.pem
  • fullchain.pem
  • privkey.pem

I've tried conversion via OpenSSL with no luck so far, using conversion from PEM to DER. Neo4j complains about not finding the certs upon start. The question is how to convert the LetsEncrypt certs into something that Neo4j can use.

Setup details:

  • The certs are placed in /var/lib/neo4j/certificates/ with names neo4j.{cert,key}, permissions 600, owned by neo4j:nogroup. All of this seems to be according to the docs.
  • In the config I have this line to specify the certificate path: dbms.directories.certificates=/var/lib/neo4j/certificates
  • In the config I also have remote access over HTTPS enabled: dbms.connector.https.address=0.0.0.0:7473

When restarting Neo4j I get the following error message:

WARN  Illegal character 0x16 in state=START for buffer HeapByteBuffer@5a260174[p=1,l=193,c=8192,r=192]={\x16<<< SEVERAL_LINES_OF_HEX_JIBBERISH_HERE }
WARN  badMessage: 400 Illegal character 0x16 for HttpChannelOverHttp@5d682358{r=0,c=false,a=IDLE,uri=-}

已采纳解答

原帖链接 · Anirudh Malhotra · CC BY-SA 3.0

I was able to use the lets encrypt certificate on neo4j by using the following process:

  • Used the letsencrypt/acme client implemented as a shell-script method to make the certificate for my domain.
  • Three files are generated running the script to get the certificate fullchain.pem cert.pem privkey.pem
  • Copy them to the certificates directory of neo4j

    mv /path_to_lets_encrypt_certs_dir/fullchain.pem /var/lib/neo4j/certificates/neo4j.cert

    mv /path_to_lets_encrypt_certs_dir/privkey.pem /var/lib/neo4j/certificates/neo4j.key

  • Restart neo4j

anirudh@prok:~# /var/lib/neo4j/bin/neo4j restart
Stopping Neo4j.. stopped
Starting Neo4j.
WARNING: Max 1024 open files allowed, minimum of 40000 recommended.  See the Neo4j manual.
Started neo4j (pid 17608). By default, it is available at  https://your-domain:7473/
There may be a short delay until the server is ready.
See /var/lib/neo4j/logs/neo4j.log for current status.

This should run it for you. Hope this helps!

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-10-16)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。