processone / docker-ejabberd

Set of ejabberd Docker images
94 stars 77 forks source link

0.0.0.0:5222: bind: address already in use #87

Closed Yousef962 closed 2 years ago

Yousef962 commented 2 years ago

When I run this command

docker run --name ejabberd -d -p 5222:5222 ejabberd/ecs

this is the result Screenshot from 2022-06-13 10-36-17

how can i fix this issue ?

badlop commented 2 years ago

listen tcp4 0.0.0.0:5222: bind: address already in use

The port 5222 is already in use, probably you already have an ejabberd running in the machine.

Either stop that existing server, or tell docker to forward the contained port 5222 to your local 5233 port (for example):

docker run --name ejabberd -d -p 5233:5222 ejabberd/ecs

Of course, now you have to tell your clients to connect to port 5233

Yousef962 commented 2 years ago

@badlop thank you, it's work