【问题标题】:Unable to run Openfire with supervisord in docker container无法在 docker 容器中使用 supervisord 运行 Openfire
【发布时间】:2016-12-11 12:24:43
【问题描述】:

我正在使用 supervisord 在 docker 容器内运行 openfire,但 supervisord 说进程已退出,但实际上当我打开暴露的端口时它正在运行我看到一个 openfire 仪表板,尽管 supervisord 仪表板显示它已退出

这是我的容器日志

/usr/lib/python2.7/site-packages/supervisor-3.3.1-py2.7.egg/supervisor/options.py:298: 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-12-10 02:44:28,562 CRIT Supervisor running as root (no user in config file)
2016-12-10 02:44:28,628 INFO RPC interface 'supervisor' initialized
2016-12-10 02:44:28,630 INFO supervisord started with pid 1
2016-12-10 02:44:29,635 INFO spawned: 'openfire' with pid 7
2016-12-10 02:44:30,734 INFO success: openfire entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2016-12-10 02:44:30,792 INFO exited: openfire (exit status 0; expected)
2016-12-10 02:46:04,355 INFO spawned: 'openfire' with pid 56
2016-12-10 02:46:04,410 INFO exited: openfire (exit status 1; not expected)
2016-12-10 02:46:05,415 INFO spawned: 'openfire' with pid 65
2016-12-10 02:46:05,464 INFO exited: openfire (exit status 1; not expected)

这是我的supervisord conf文件

[supervisord]
nodaemon=true

[program:openfire]
command=/etc/init.d/openfire start

[supervisorctl]
serverurl=http://localhost:8090

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[inet_http_server]
port = 8090

当我运行 Nginx 和 PHP-FPM 时,我也发生了同样的事情,但在这种情况下,supervisord 不会运行它,如此处所示 PHPfpm and Nginx not working in Docker with Supervisord

有人可以告诉我我在这里做错了什么吗?我是 docker 新手,所以我可能在这里遗漏了一些关键点。

【问题讨论】:

    标签: docker dockerfile openfire supervisord


    【解决方案1】:

    你从 supervisor 开始的东西必须在前台运行,而不是自己守护进程(参见 docs)。 相反,将命令更改为(相应地修改文件夹):

    command=/usr/bin/java -server -DopenfireHome=/usr/share/openfire -Dopenfire.lib.dir=/usr/share/openfire/lib -classpath /usr/share/openfire/lib/startup.jar -jar /usr/share/openfire/lib/startup.jar
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-07-28
      • 1970-01-01
      • 1970-01-01
      • 2020-04-12
      • 1970-01-01
      • 2022-07-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多