簡體   English   中英

apache2和supervisor的Docker tutum / wordpress容器問題

[英]Docker tutum/wordpress container issues with apache2 and supervisor

我是Docker的新手,並且已經在基於tutum / wordpress圖像的Wordpress網站上工作了幾個月。 上周,我編輯了wordpress網站。 但是,現在當我嘗試顯示該網站時,我一無所獲。

自上周上次工作以來,我沒有進行任何更改。 我可以通過SSH進入Ubuntu服務器。 我可以看到容器正在運行,並且可以連接到容器。 進入容器后,我已經確認Apache和MySQL正在運行。 我可以瀏覽文件系統,而Wordpress仍然存在。

幾乎好像無法從Web上訪問該容器,但是我對從哪里開始進行故障排除感到困惑。

更新:似乎是主管和Apache的問題。 碼頭工人的日志說,由於重試過多,apache處於致命狀態。 但是,使用sudo service apache2 status表示Apache正在運行。 發出/etc/init.d/apache2停止命令后,Apache仍在運行。 我無法阻止它。 ps -A不顯示apache正在運行,僅顯示主管。 我還是很困惑。

Docker Port: 80/tcp -> 0.0.0.0:80

Docker日志:

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

我發現並解決了該問題,但是由於我已經運行此服務器和容器已有幾個月了,所以我不知道它是如何或為什么成為問題。

問題是,supervisor已配置為運行apache2。 但是,/ etc / init.d /中也有一個apache2腳本。

我在/etc/init.d文件夾中執行了“ update-rc.d -f apache2 remove”命令,以便在啟動時從init進程中刪除此腳本。 然后,我彈起了服務器,重新開始營業。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM