otrv4 / prekey-server-docker-compose

A XMPP server with OTRv4 prekey server included. This is a mirror of https://bugs.otr.im/otrv4/prekey-server-docker-compose
2 stars 1 forks source link

An error occurs when you try to run the image #2

Closed pedropalau closed 5 years ago

pedropalau commented 5 years ago

When I run the image with:

$ docker-compose up

an error occurs that says the following:

ERROR: for prekey-server-docker-compose_xmpp-server_1  
Cannot start service xmpp-server: driver failed programming external connectivity on endpoint prekey-server-docker-compose_xmpp-server_1
Error starting userland proxy: listen tcp 0.0.0.0:5222: bind: address already in use

Is possible to run this image using another port instead of 5222?

claucece commented 5 years ago

Mmm.. interesting. Can you post the result of sudo netstat -nlp | grep 5222 or sudo netstat -nl -p tcp | grep 5222, and of docker version?

Something can be running on that port. You can change to a closest port here: https://github.com/otrv4/prekey-server-docker-compose/blob/master/docker-compose.yml#L7

Thanks!

pedropalau commented 5 years ago

Yes, something is running by default on that port, in this case the following:

tcp    0      0 0.0.0.0:5222        0.0.0.0:*       LISTEN      3714/lua5.1         
tcp6   0      0 :::5222             :::*            LISTEN      3714/lua5.1

The docker version is:

Client:
 Version:           18.09.2
 API version:       1.38 (downgraded from 1.39)
 Go version:        go1.10.4
 Git commit:        6247962
 Built:             Tue Feb 26 23:52:23 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.06.1-ce
  API version:      1.38 (minimum version 1.12)
  Go version:       go1.10.4
  Git commit:       e68fc7a
  Built:            Tue May  7 17:57:34 2019
  OS/Arch:          linux/amd64
  Experimental:     false

Yes, I can change the port on the docker config file, but can I specify the port to Docker when running the service without changing it in the configuration file?

claucece commented 5 years ago

Mmm.. interesting.. can you run docker ps and show me the output? For some reason, lua/prosody is running there. You can kill that process if you want.

Yes, I can change the port on the docker config file, but can I specify the port to Docker when running the service without changing it in the configuration file?

No, onlyin the config file.