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

Web server does not restart after ssl_engine is set

· 52CE 我爱测

I am trying to offload SSL process to AWS CloudHSM. While configuring the web server, when I add this: ssl_engine cloudhsm; to the top of the nginx configuration, nginx does not get restarted and the following error was logged: 2…

问题原文

原帖链接 · TrickyExplorer · CC BY-SA 4.0

I am trying to offload SSL process to AWS CloudHSM. While configuring the web server, when I add this:

ssl_engine cloudhsm;

to the top of the nginx configuration, nginx does not get restarted and the following error was logged:

2018/05/29 11:53:58 [emerg] 17509#0: ENGINE_by_id("cloudhsm") failed (SSL: error:25066067:DSO support routines:dlfcn_load:could not load the shared library:filename(/usr/lib/x86_64-linux-gnu/engines-1.1/cloudhsm.so): /usr/lib/x86_64-linux-gnu/engines-1.1/cloudhsm.so: cannot open shared object file: No such file or directory error:25070067:DSO support routines:DSO_load:could not load the shared library error:260B6084:engine routines:dynamic_load:dso not found error:2606A074:engine routines:ENGINE_by_id:no such engine:id=cloudhsm)

How do I resolve this?

已采纳解答

原帖链接 · lacabra · CC BY-SA 4.0

I experienced the same issue, and documented by findings and solution in this Github issue.

In summary, if you have followed the steps in:

then you have CloudHSM configured correctly, and you can access it with your regular user, but the user that launches nginx cannot (which results in the misleading error that you report). See the solution post above for simple tests that you can run to verify that is indeed the case.

The solution is to track down how the server is started (see this answer to find out what init system your system uses), and make sure that the cloudhsm credentials are part of that environment. The instructions from AWS assume that the host runs systemd as the init system. In my case, I was using init and the solution involved tracking down the corresponding script and passing the credentials (n3fips_password) before launching nginx. Again the specific details are documented in the Github thread.

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

资料来源与适用范围

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

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

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