ejabberdejabberd-api

Host not served (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.


Solution

  • 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
    #