docker - 来自网络管理员 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
我该怎么办 ?我必须更改配置文件吗 谢谢
解决方案
在 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/
推荐阅读
- php - 使用准备 PHP SQL 语句插入数据
- python - 如何使用带有多个分隔符的字符串的 re.split()
- python - 类似于“在保留另一列的同时从 Pandas 列生成 n-gram”(未解决),但具有值
- python - 通过 Python 中的函数设置对象属性
- c# - c# visual studio Windows Forms App 隐藏并重新打开表单后维护更改
- postgresql - 在 Postgres 10 中快速生成 100 GB 的 Postgres 关系
- python - Python CGI 给了我无法单独修复的错误
- reactjs - React-bootstrap:如何将初始值从状态放入输入表单
- css - CSS精灵动画反向白色闪光
- amazon-web-services - AWS Elastic Beanstalk 和外部 RDS