【问题标题】:Nginx container won't start - hangs at "start worker processes"Nginx 容器无法启动 - 在“启动工作进程”时挂起
【发布时间】:2022-01-28 00:01:30
【问题描述】:

由于某种我无法理解的原因,我的 nginx 容器在尝试启动时开始失败。它只是在几个 start worker process 日志条目后挂起,我在下面包含了输出:

Generating /apps/nginx/upstreams.conf...done.
Generating /apps/nginx/locations.conf...done.
Creating NGINX listener certificate...

Successfully generated /apps/nginx/resolver.conf: resolver 192.168.65.5;
Generating /apps/nginx/listen.conf...done.
Starting Nginx...
Generating /apps/nginx/upstreams.conf...done.
Generating /apps/nginx/locations.conf...done.
Creating NGINX listener certificate...
Successfully generated /apps/nginx/resolver.conf: resolver 192.168.65.5;
Generating /apps/nginx/listen.conf...done.
Starting Nginx...


Generating a RSA private key
....................................................+++++
.....................................................................................................+++++
writing new private key to '/apps/nginx/nginx-key.pem'
-----
Generating a RSA private key
........+++++
.................................................................+++++
writing new private key to '/apps/nginx/nginx-key.pem'
-----
2021/10/04 17:39:16 [notice] 1#1: using the "epoll" event method
2021/10/04 17:39:16 [notice] 1#1: nginx/1.20.1
2021/10/04 17:39:16 [notice] 1#1: built by gcc 9.3.0 (Ubuntu 9.3.0-10ubuntu2)
2021/10/04 17:39:16 [notice] 1#1: OS: Linux 5.10.25-linuxkit
2021/10/04 17:39:16 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2021/10/04 17:39:16 [notice] 1#1: start worker processes
2021/10/04 17:39:16 [notice] 1#1: start worker process 20
2021/10/04 17:39:16 [notice] 1#1: start worker process 21
2021/10/04 17:39:16 [notice] 1#1: start worker process 22
2021/10/04 17:39:16 [notice] 1#1: start worker process 23
2021/10/04 17:39:16 [notice] 1#1: start worker process 24
2021/10/04 17:39:16 [notice] 1#1: start worker process 25

此外,/var/log/nginx/error.log 中根本没有错误日志

这没什么好说的,但我不确定还有哪些其他细节可能有助于分享。我只是想知道是否有人以前在 docker 容器内的 nginx 实例中看到过这样的错误消息?

【问题讨论】:

    标签: docker nginx


    【解决方案1】:

    我遇到了同样的问题。这对我有用:

    docker-compose build --no-cache nginx
    

    【讨论】:

      猜你喜欢
      • 2019-05-18
      • 2011-08-11
      • 2014-09-24
      • 2019-10-12
      • 1970-01-01
      • 1970-01-01
      • 2013-11-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多