主机未提供(ejabberd) [英] Host not served (ejabberd)
本文介绍了主机未提供(ejabberd)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用现成的 ejabberd / ecs-Docker Hub 和我尝试运行 curl
命令(从我自己的容器中)注册用户,但收到以下消息:
< blockquote>
主机未服务
实际 curl
命令,带有输出:
/ app#curl -ks --request POST https:// ejabberd:5443 / api / register --data'{ user: test, host: localhost, password: testing }'
主机未服务
/ app#
对于Docker当然,我的 app
和 ejabberd
容器都在同一网络中。
请告知。
ejabberd.yml 以防万一。
解决方案
我能够通过以下方式解决我的问题:加公司容器名称作为我的主机
:
#grep -A2主机./ home / ejabberd / conf / ejabberd.yml
主机:
-本地主机
-ejabberd
#
I'm using out of the box ejabberd/ecs - Docker Hub and I've tried to run curl
command (from my own container) to register the user , yet got following message:
Host not served
actual curl
command w/ output:
/app # curl -ks --request POST https://ejabberd:5443/api/register --data '{"user":"test","host":"localhost","password":"testing"}'
Host not served
/app #
As far as Docker goes, both my app
and ejabberd
containers are both in same network.
Please advise.
ejabberd.yml just in case.
解决方案
I was able to address my issue by adding container name as my hosts
:
# grep -A2 hosts ./home/ejabberd/conf/ejabberd.yml
hosts:
- localhost
- ejabberd
#
这篇关于主机未提供(ejabberd)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文