Bind for failed: port is already allocated

Installed a local server. Docker containers are up. Keys and certificate installed. Launcher bootstrap went OK. Launcher start went OK with default values of Server is on the internet and ports forwarded. (fail2ban, No Passw Auth).
But after I modified with local server values I get ERROR on port 8828.
This is my

# Kontalk server configuration
# if you edit this file you must rebuild your containers:
# ./launcher rebuild


# version/branch to build

# XMPP parameters

# Database parameters

# kontalk database user password
# root database user password
# database timezone

# Other parameters

# Max upload file size

# HTTP listen port


And this is the startup error:

rene@motorbende:~/kontalk-server$ sudo ./launcher bootstrap
Building images for branch production (9114e45c9e1a7c4e3e06a4fc45f98f7657a4aaca)
This could take several minutes.
kontalk/xmppserver:9114e45 OK
kontalk/httpupload OK

Successfully bootstrapped, to startup use ./launcher start
rene@motorbende:~/kontalk-server$ sudo ./launcher start
+ /usr/bin/docker-compose -p motorbende up -d
Creating network "motorbende_default" with the default driver
Creating motorbende_httpupload
Creating motorbende_db
Creating motorbende_xmpp

ERROR: for httpupload  Cannot start service httpupload: driver failed programming external connectivity on endpoint motorbende_httpupload (b6aebca3f73756fe2a07dd8a2a7cdedf1a76f308a711d87c499d27e0701c8e2e): Bind for failed: port is already allocated

ERROR: for xmpp  Cannot start service xmpp: grpc: the connection is unavailable
ERROR: Encountered errors while bringing up the project.

This parameter should contain the XMPP service name (what will come after the “@” symbol in user IDs). Even if the domain doesn’t exist, it must be a domain or host name. You can always use the IP address in the manual server address in the app like this:


About the busy port thing: are you sure there is nothing else listening on that port? Maybe some leftover of some old Docker container?

Thank you for the advice. Corrected the XMMP service name. You were right; an old container blocked the port! Stopped and removed all containers and restart (rebuild) went OK.
Have to study a bit more I’m afraid because registration didn’t work yet. I did enter the server address before registration. I get a verification error.
Any advise how I can test if the server is running well with respect to registration?

This is the debug log on the client:

2017-12-12 21:10:56 V/NumberValidation: Using phone number to register: +31***********
2017-12-12 21:10:57 D/NumberValidation: phone number checked, sending validation request
2017-12-12 21:10:57 D/MessageCenterService: using server

2017-12-12 21:11:27 E/NumberValidation: validation error.

2017-12-12 21:11:27 E/NumberValidation: org.jivesoftware.smack.SmackException$ConnectionException: The following addresses failed: '_xmpp-client._tcp.' failed because: de.measite.minidns.hla.ResolutionUnsuccessfulException: Asking for _xmpp-client._tcp.	IN	SRV yielded an error response NX_DOMAIN, '' failed because: / exception: failed to connect to / (port 5222) from / (port 42026) after 30000ms
	at org.kontalk.client.XMPPTCPConnection.connectUsingConfiguration(
	at org.kontalk.client.XMPPTCPConnection.connectInternal(
	at org.jivesoftware.smack.AbstractXMPPConnection.connect(
	at org.kontalk.service.XMPPConnectionHelper.connectOnce(
	at org.kontalk.service.XMPPConnectionHelper.connectOnce(
	at org.kontalk.client.NumberValidator.initConnection(

2017-12-12 21:11:27 W/NumberValidator: shutting down
2017-12-12 21:11:27 W/NumberValidator: exiting


Moderator edit: Replaced part of the phone number with ***** for privacy reasons.

Read again :slight_smile: the format of the manual server address must be like this:


Thank you, but 'm afraid that still don’t understand exactly.
The server didn’t have a domain name, so I corrected that.
I have now: (not existing)
In the Kontalk app, I enter the ip address in the manual server address.
The log says, a personal key is generated. But still I get the ‘E/NumberValidation: validation error’ in the debug log. And registration fails.
After reading old posts, I think I understand the registration process. Added NexmoVerifyProvider (and my key+secret+Kontalk) as lined out in the
Still no registration!
I looked up some of the error messages in the debug log e.g. "de.measite.minidns.hla.ResolutionUnsuccessfulException: Asking for _xmpp-client._tcp"
From what I read it looks to me as if the XMPP service has no connection with my IP address. But unfortunately I have no expertise in this field.
Any suggestions?

Regards, René

Enter this in manual server address:|

Even if the hostname doesn’t exist, Kontalk will use the IP address to phisically connect and the hostname during the handshake because it’s required to know it when you handshake with a XMPP server, it doesn’t matter if it’s real or not.

bootstrap and start are without errors but ‘docker container ls’ indicates that xmppserver is restarting all the time.
rene@clubhouse:~/kontalk-server$ sudo docker container ls
87e8b48f832c kontalk/xmppserver:9114e45 “/home/kontalk/ent…” 2 hours ago Restarting (1) 46 seconds ago clubhouse_xmpp
5b86f6349ec4 mysql:5.6 “docker-entrypoint…” 2 hours ago Up 2 hours 3306/tcp clubhouse_db
a9fb254cab4a kontalk/httpupload “/home/kontalk/ent…” 2 hours ago Up 2 hours>8828/tcp clubhouse_httpupload

all problems solved; xmpp server was restarting due to permission on .pem file. modified this and works fine now. verification problem in the app was due to a typo; a space in ‘’ ‘|’ after .net caused the problem.
Everything now works like a charm. (and I learned a lot about docker and xmpp :wink:
The instruction to set up the docker version of Kontalk is very good.
Regards René


I’m glad to hear that. If you think something needs improvement or fixing please let us know here or better submit a feature request in GitHub or (even better, if you have the time) a pull request to fix or enhance something.
Happy holidays!