Installed a local server. Docker containers are up. Keys and certificate installed. Launcher bootstrap went OK. Launcher start went OK with default values of local.properties. Server is on the internet and ports forwarded. (fail2ban, No Passw Auth).
But after I modified local.properties with local server values I get ERROR on port 8828.
This is my local.properties:
# 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
# HTTP URLs
And this is the startup error:
rene@motorbende:~/kontalk-server$ sudo ./launcher bootstrap
Building images for branch production (9114e45c9e1a7c4e3e06a4fc45f98f7657a4aaca)
This could take several minutes.
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
ERROR: for httpupload Cannot start service httpupload: driver failed programming external connectivity on endpoint motorbende_httpupload (b6aebca3f73756fe2a07dd8a2a7cdedf1a76f308a711d87c499d27e0701c8e2e): Bind for 0.0.0.0:8828 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 184.108.40.206
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.220.127.116.11:5222' failed because: de.measite.minidns.hla.ResolutionUnsuccessfulException: Asking for _xmpp-client._tcp.18.104.22.168. IN SRV yielded an error response NX_DOMAIN, '22.214.171.124:5222' failed because: /126.96.36.199 exception: java.net.SocketTimeoutException: failed to connect to /188.8.131.52 (port 5222) from /192.168.12.206 (port 42026) after 30000ms
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 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: XMPP_SERVICE=clubhouse.motorbende.net. (not existing)
In the Kontalk app, I enter the ip address 184.108.40.206 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 local-server-howto.md#registration.
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.
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
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
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 0.0.0.0:8828->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 ‘’ ‘clubhouse.motorbende.net|220.127.116.11’ after .net caused the problem.
Everything now works like a charm. (and I learned a lot about docker and xmpp
The instruction to set up the docker version of Kontalk is very good.
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.