我是Docker的新手,几个月来我一直在开发一个基于图腾/ Wordpress镜像的wordpress站点。就在上周,我还在编辑wordpress网站;然而,现在当我尝试显示该网站时,什么也得不到。
自从上周它最后一次工作以来,我没有改变任何东西。我可以通过SSH连接到Ubuntu服务器。我可以看到容器正在运行,我可以连接到容器。进入容器后,我已经验证了Apache和MySQL正在运行。我可以在文件系统中导航,而Wordpress仍然在那里。
这几乎就像是无法从web访问容器一样,但我不知道从哪里开始故障排除。
更新:这似乎是supervisord和apache的一个问题。docker日志显示,由于重试次数过多,apache处于致命状态;但是,使用sudo服务apache2状态表示Apache正在运行。发出/etc/init.d/apache2stop命令后,Apache仍在运行。我就是停不下来。ps -A没有显示apache运行,只显示supervisor。我还是很困惑。
Docker Port: 80/tcp -> 0.0.0.0:80Docker日志:
2016-05-12 20:01:39,534 INFO waiting for mysqld to die
=> Using an existing volume of MySQL
/usr/lib/python2.7/dist-packages/supervisor/options.py:295: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
'Supervisord is running as root and it is searching '
2016-05-12 20:02:16,501 CRIT Supervisor running as root (no user in config file)
2016-05-12 20:02:16,501 WARN Included extra file "/etc/supervisor/conf.d/supervisord-mysqld.conf" during parsing
2016-05-12 20:02:16,501 WARN Included extra file "/etc/supervisor/conf.d/supervisord-apache2.conf" during parsing
Unlinking stale socket /var/run/supervisor.sock
2016-05-12 20:02:16,839 INFO RPC interface 'supervisor' initialized
2016-05-12 20:02:16,839 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2016-05-12 20:02:16,839 INFO supervisord started with pid 1
2016-05-12 20:02:17,847 INFO spawned: 'mysqld' with pid 9
2016-05-12 20:02:17,853 INFO spawned: 'apache2' with pid 10
2016-05-12 20:02:17,957 INFO exited: apache2 (exit status 0; not expected)
2016-05-12 20:02:19,303 INFO success: mysqld entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-05-12 20:02:19,308 INFO spawned: 'apache2' with pid 392
2016-05-12 20:02:19,396 INFO exited: apache2 (exit status 0; not expected)
2016-05-12 20:02:21,404 INFO spawned: 'apache2' with pid 394
2016-05-12 20:02:21,491 INFO exited: apache2 (exit status 0; not expected)
2016-05-12 20:02:24,500 INFO spawned: 'apache2' with pid 395
2016-05-12 20:02:24,586 INFO exited: apache2 (exit status 0; not expected)
2016-05-12 20:02:25,588 INFO gave up: apache2 entered FATAL state, too many start retries too quickly发布于 2016-05-13 06:42:36
我发现并解决了这个问题,但我不知道它是如何或为什么成为问题的,因为我已经运行这个服务器和容器几个月了。
问题是supervisord配置为运行apache2;但是,/etc/init.d/中也有一个apache2脚本
我在/etc/init.d文件夹中执行了"update-rc.d -f apache2 remove“命令,以便在启动时从初始化进程中删除此脚本。然后,我弹出了服务器,然后又恢复了业务。
https://stackoverflow.com/questions/37196715
复制相似问题