首页 > 解决方案 > 来自网络管理员 ejabberd docker 的 ERR_EMPTY_RESPONSE

问题描述

每当我在按下 docker 桌面中的按钮时尝试使用 web admin 时,我正在 Windows 10 中的 docker 运行 ejabberd 版本 21.04,浏览器给我一个错误,说 localhost 没有发送任何数据。ERR_EMPTY_RESPONSE 我使用 chrome 作为 Web 浏览器我按照本教程https://hub.docker.com/r/ejabberd/ecs他们正在端口 5222 上启动 ejabberd 容器,但是当我运行 web admin 时,它说端口的 http 响应无效5222,当我在端口 8000 上运行时,它说来自服务器的 err empty response

检查日志我使用了 docker exec -it ejabberd tail -f logs/ejabberd.log

2021-04-27 10:43:15.196032+00:00 [debug] <0.43.0>@application_controller:info_started/2:1929 PROGRESS REPORT:
    application: runtime_tools
    started_at: ejabberd@73fe5729d7a6
2021-04-27 10:43:15.196319+00:00 [debug] <0.43.0>@application_controller:info_started/2:1929 PROGRESS REPORT:
    application: artificery
    started_at: ejabberd@73fe5729d7a6
2021-04-27 10:43:15.196575+00:00 [debug] <0.43.0>@application_controller:info_started/2:1929 PROGRESS REPORT:
    application: distillery
    started_at: ejabberd@73fe5729d7a6
2021-04-27 10:43:16.037858+00:00 [debug] <0.651.0>@ejabberd:check_apps/0:139 All applications are intact

我该怎么办 ?我必须更改配置文件吗 谢谢

标签: dockererlangxmppejabberd

解决方案


在 Docker Desktop 中单击“在浏览器中打开”图标时,它将使用最低端口号打开,请参阅https://github.com/docker/for-win/issues/9537

因此,如果您为 C2S 公开 5222,为 Web 管理员公开 5280,Docker Desktop 会打开 url http://localhost:5222 对吗?这显然会导致问题!而且你应该已经注意到在浏览器中打开的端口是错误的!!!

我没有安装映像并手动创建容器然后抱怨,而是按照这个很酷的教程通过自动执行所有操作来绕过该问题,并将 webadmin 设置为 5180(而不是 5280),因此 Web Admin 可以正常工作:

https://www.process-one.net/blog/install-ejabberd-on-windows-10-using-docker-desktop/


推荐阅读