Docker and host connect error


#1

Hello, I have try to connect private client app and server.
But I have failed 7days …TT
I have searched all forum writing…

1. $nmap myip 

Starting Nmap 7.01 ( https://nmap.org ) at 2018-08-14 11:06 CEST
Nmap scan report for test1.ktuser.cloudns.asia (185.236.203.139)
Host is up (0.00013s latency).
rDNS record for 185.236.203.139: ubuntu16
Not shown: 997 closed ports
PORT      STATE SERVICE
80/tcp    open  http
2002/tcp  open  globe
10010/tcp open  rxapi

Nmap done: 1 IP address (1 host up) scanned in 0.10 seconds

// sometimes 5222/5223 port _xmpp_tcp… is showing, it also failed…
I think the real matter is between docker and host server…

2. ./launcher logs

===========================================================================

httpupload_1  | 2018-08-14 08:19:35,767  ERROR    Could not connect to 172.30.0.4:5270. Socket Error #110: Connection timed out
httpupload_1  | 2018-08-14 08:19:35,768  DEBUG    Waiting 188.84501466179603 seconds before connecting.
httpupload_1  | 2018-08-14 08:22:45,052  DEBUG    No remaining DNS records to try.
httpupload_1  | 2018-08-14 08:22:45,052  DEBUG    Waiting 374.03663530428287 seconds before connecting.
httpupload_1  | 2018-08-14 08:28:59,972  DEBUG    DNS: Querying xmpp for AAAA records.
httpupload_1  | 2018-08-14 08:28:59,974  DEBUG    DNS: Error retreiving AAAA address info for xmpp.
httpupload_1  | 2018-08-14 08:28:59,974  DEBUG    DNS: Querying xmpp for A records.
httpupload_1  | 2018-08-14 08:28:59,974  DEBUG    Connecting to 172.30.0.4:5270
httpupload_1  | 2018-08-14 08:31:07,223  DEBUG    Event triggered: socket_error
httpupload_1  | 2018-08-14 08:31:07,224  ERROR    Could not connect to 172.30.0.4:5270. Socket Error #110: Connection timed out
httpupload_1  | 2018-08-14 08:31:07,224  DEBUG    Waiting 384.8351152777627 seconds before connecting.
httpupload_1  | 2018-08-14 08:37:32,959  DEBUG    No remaining DNS records to try.
httpupload_1  | 2018-08-14 08:37:32,959  DEBUG    Waiting 574.1922672284873 seconds before connecting.
httpupload_1  | 2018-08-14 08:47:08,402  DEBUG    DNS: Querying xmpp for AAAA records.
httpupload_1  | 2018-08-14 08:47:08,405  DEBUG    DNS: Error retreiving AAAA address info for xmpp.
httpupload_1  | 2018-08-14 08:47:08,405  DEBUG    DNS: Querying xmpp for A records.
httpupload_1  | 2018-08-14 08:47:08,407  DEBUG    Connecting to 172.30.0.4:5270
httpupload_1  | 2018-08-14 08:49:15,607  DEBUG    Event triggered: socket_error
httpupload_1  | 2018-08-14 08:49:15,608  ERROR    Could not connect to 172.30.0.4:5270. Socket Error #110: Connection timed out
httpupload_1  | 2018-08-14 08:49:15,608  DEBUG    Waiting 650.6625025796903 seconds before connecting.
httpupload_1  | 2018-08-14 09:00:07,674  DEBUG    No remaining DNS records to try.
httpupload_1  | 2018-08-14 09:00:07,689  DEBUG    Waiting 642.8525331872046 seconds before connecting.
ktuser@ubuntu16:~/kontalk-server$
  1. SRV TEST

    ktuser@ubuntu16:~/kontalk-server$ dig SRV _xmpp-client._tcp.ktuser.cloudns.asia

    ; <<>> DiG 9.10.3-P4-Ubuntu <<>> SRV _xmpp-client._tcp.ktuser.cloudns.asia
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31508
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

    ;; OPT PSEUDOSECTION:
    ; EDNS: version: 0, flags:; udp: 512
    ;; QUESTION SECTION:
    ;_xmpp-client._tcp.ktuser.cloudns.asia. IN SRV

    ;; ANSWER SECTION:
    _xmpp-client._tcp.ktuser.cloudns.asia. 3599 IN SRV 0 0 5222 test1.ktuser.cloudns.asia.

    ;; Query time: 54 msec
    ;; SERVER: 8.8.8.8#53(8.8.8.8)
    ;; WHEN: Tue Aug 14 11:40:56 CEST 2018
    ;; MSG SIZE rcvd: 111

  2. ifconfig

    docker0 Link encap:Ethernet HWaddr 02:42:17:04:5a:5b
    inet addr:172.17.0.1 Bcast:172.17.255.255 Mask:255.255.0.0
    inet6 addr: fe80::42:17ff:fe04:5a5b/64 Scope:Link
    UP BROADCAST MULTICAST MTU:1500 Metric:1
    RX packets:408 errors:0 dropped:0 overruns:0 frame:0
    TX packets:643 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:47947 (47.9 KB) TX bytes:4161302 (4.1 MB)

please anyone help me…b


#2

Hello and welcome!
Please post your local.properties and init.properties.in files after removing sensitive data, e.g. passwords.

Also, the logs you provided are just a little part not displaying any issue. Please paste all logs (be careful to passwords that may be printed out). You may add “xmpp” to the logs command to print out only logs from the chat server container.


#5

Hi, I replied what you had requested.

#1. local.properties ==============================================================================

ktuser@ubuntu16:~/kontalk-server$ cat local.properties

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

INSTANCE_NAME=ktuser

# version/branch to build
VERSION=staging

# XMPP parameters
XMPP_SERVICE=test1.ktuser.cloudns.asia
XMPP_LISTEN_PORT=5222
XMPPS_LISTEN_PORT=5223
XMPPS2S_LISTEN_PORT=5269

# Database parameters

# kontalk database user password
MYSQL_PASSWORD=****
# root database user password
MYSQL_ROOT_PASSWORD=****
# database timezone
MYSQL_TIMEZONE=Europe/Copenhagen
# alter this only if you know what you are doing
DATABASE_BASELINE=1

# Other parameters

# Max upload file size
HTTPUPLOAD_MAX_SIZE=20971520

# HTTP listen port
HTTPUPLOAD_LISTEN_PORT=8828

# HTTP URLs
HTTPUPLOAD_PUT_URL=https://test1.ktuser.cloudns.asia:8828/
HTTPUPLOAD_GET_URL=https://test1.ktuser.cloudns.asia:8828/

#2. init.properties.in ==============================================================================

ktuser@ubuntu16:~/kontalk-server/config$ cat init.properties.in

# Default Kontalk configuration, fine for most configurations

# XMPP host where you're serving your Kontalk instance
# Kontalk extensions support one virtual host only for now
sess-man/plugins-conf/urn\:ietf\:params\:xml\:ns\:xmpp-sasl/host={{ .Env.XMPP_SERVICE }}
# Virtual hosts served by this instance (must match the above)
--virt-hosts={{ .Env.XMPP_SERVICE }}
# Administrator JID (must be in the above domain)
--admins=admin@{{ .Env.XMPP_SERVICE }}

# Fingerprint of the GPG server key
sess-man/plugins-conf/fingerprint={{ .Env.FINGERPRINT }}

# The global network domain (do not change this if you want to participate in the Kontalk global network)
sess-man/plugins-conf/network-domain=kontalk.net

# Database configuration (the two db-uri parameters must be identical)
--user-db=mysql
--user-db-uri=jdbc:mysql://db:3306/{{ .Env.MYSQL_DATABASE }}?user={{ .Env.MYSQL_USER }}&password={{ urlquery .Env.MYSQL_PASSWORD }}&useUnicode=true&characterEncoding=UTF-8&serverTimezone={{ urlquery .Env.MYSQL_TIMEZONE }}
sess-man/plugins-conf/db-uri=jdbc:mysql://db:3306/{{ .Env.MYSQL_DATABASE }}?user={{ .Env.MYSQL_USER }}&password={{ urlquery .Env.MYSQL_PASSWORD }}&useUnicode=true&characterEncoding=UTF-8&serverTimezone={{ urlquery .Env.MYSQL_TIMEZONE }}

# Registration provider configuration
# Dummy provider configuration
# It will always accept 123456 as a valid verification code
# Good for a remote test server
sess-man/plugins-conf/kontalk\:jabber\:iq\:register/providers[s]=dummy=org.kontalk.xmppserver.registration.DummyProvider
sess-man/plugins-conf/kontalk\:jabber\:iq\:register/dummy-sender=123456

# Endpoints configuration
# All endpoints must declare a clientCertCA pointing to a valid certificate chain file
# (any CA chain will do, it won't actually be used but Tigase won't work without it)

# Client endpoint configuration
--c2s-ports=5222,5223
c2s/connections/5223/socket=ssl
c2s/clientCertCA=trusted.pem

# Websocket endpoint configuration
message-router/components/msg-receivers/ws2s.active[B]=false
ws2s/connections/5290/socket=ssl
ws2s/clientCertCA=trusted.pem

# BOSH endpoint configuration
message-router/components/msg-receivers/bosh.active[B]=false
bosh/connections/5280/socket=ssl
bosh/clientCertCA=trusted.pem

# S2S endpoint configuration (comment to disable XMPP federation)
--s2s-ports=5269

# Enabled plugins, comma-separated
# prefixed with a minus (-) means not loaded, prefixed with nothing or with a plus (+) means loaded.
# add "+kontalk:push:legacy" to enable Kontalk push notifications (external component must also be configured below)
--sm-plugins=-amp,-message-carbons,-jabber:iq:auth,-jabber:iq:register,-jabber:iq:privacy,-jabber:iq:last,-msgoffline,-urn:xmpp:blocking,-urn:xmpp:csi:0,+message,+msgoffline2,+presence:urn:xmpp:pubkey:2,+kontalk:jabber:iq:register,+kontalk:jabber:iq:roster,+urn:xmpp:pubkey:2,+kontalk:urn:xmpp:blocking,+kontalk:urn:xmpp:csi:0,+kontalk:jabber:iq:last

# Comment these to revert to default logging
--debug=server,xmpp.impl
--debug-packages=org.kontalk

# External components. Do not change the default names!
# --comp-xxx parameter pairs follow a numbering order
# whenever you delete/comment or insert a component, remember to fix the numbering!!

# Network component
# enables server list commands. Particularly needed if participating in a global network
--comp-name-1=network
--comp-class-1=org.kontalk.xmppserver.NetworkComponent

# Phone number lookup component
# enables discovery of contacts in the local/global network by their phone numbers
--comp-name-2=probe
--comp-class-2=org.kontalk.xmppserver.probe.ProbeComponent

--comp-name-3=multicast
--comp-class-3=org.kontalk.xmppserver.ExtendedAddressing

# External XMPP component protocol
# needed for HttpFileUploadComponent
--comp-name-4=ext
--comp-class-4=tigase.server.ext.ComponentProtocol
# these must match HttpFileUploadComponent configuration
--external=media.{{ .Env.XMPP_SERVICE }}:secret:listen:5270

# GCM push notifications
# remember to fix --sm-plugins too (see above)
#--comp-name-5=push
#--comp-class-5=org.kontalk.xmppserver.KontalkLegacyPushComponent
#push/gcm-projectid=PROJECT-ID
#push/gcm-apikey=API-KEY

# Internal parameters
# the following properties must not be changed unless you really know what you're doing
basic-conf/auth-repo-params/sasl-mechs=EXTERNAL
sess-man/plugins-conf/urn\:ietf\:params\:xml\:ns\:xmpp-sasl/factory=org.kontalk.xmppserver.auth.KontalkSaslServerFactory
sess-man/plugins-conf/urn\:ietf\:params\:xml\:ns\:xmpp-sasl/mechanism-selector=org.kontalk.xmppserver.auth.KontalkMechanismSelector
sess-man/plugins-conf/urn\:ietf\:params\:xml\:ns\:xmpp-sasl/callbackhandler-EXTERNAL=org.kontalk.xmppserver.auth.KontalkCertificateCallbackHandler
sess-man/plugins-conf/presence-state/extended-presence-processors=org.kontalk.xmppserver.presence.PublicKeyPresence
c2s/processors[s]=urn:xmpp:sm:3=org.kontalk.xmppserver.KontalkIOProcessor
c2s/processors/urn\:xmpp\:sm\:3/ack-timeout[I]=60
message-router/components/msg-receivers/amp.active[B]=false

basic-conf/logging/handlers=biz.paluch.logging.gelf.jul.GelfLogHandler,java.util.logging.ConsoleHandler
basic-conf/logging/java.util.logging.ConsoleHandler.level=ALL
basic-conf/logging/biz.paluch.logging.gelf.jul.GelfLogHandler.level=ALL
basic-conf/logging/biz.paluch.logging.gelf.jul.GelfLogHandler.host=udp:logstash
basic-conf/logging/biz.paluch.logging.gelf.jul.GelfLogHandler.port=12201
basic-conf/logging/biz.paluch.logging.gelf.jul.GelfLogHandler.version=1.1
basic-conf/logging/biz.paluch.logging.gelf.jul.GelfLogHandler.facility={{ .Env.XMPP_SERVICE }}
basic-conf/logging/biz.paluch.logging.gelf.jul.GelfLogHandler.extractStackTrace=true
basic-conf/logging/biz.paluch.logging.gelf.jul.GelfLogHandler.filterStackTrace=true
basic-conf/logging/biz.paluch.logging.gelf.jul.GelfLogHandler.timestampPattern=yyyy-MM-dd HH:mm:ss.SSSS
basic-conf/logging/biz.paluch.logging.gelf.jul.GelfLogHandler.maximumMessageSize=8192

--vhost-anonymous-enabled=false
--vhost-tls-required=false
--hardened-mode=true
config-type=--gen-config-def

#3. ./launcher logs ==============================================================================

ktuser@ubuntu16:~/kontalk-server$ ./launcher logs

+ exec /usr/bin/docker-compose -p ktuser logs
Attaching to ktuser_xmpp, ktuser_httpupload, ktuser_db
db_1          | 2018-08-16 07:34:25 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
db_1          | 2018-08-16 07:34:26 0 [Note] mysqld (mysqld 5.6.41) starting as process 1 ...
db_1          | 2018-08-16 07:34:26 1 [Note] Plugin 'FEDERATED' is disabled.
db_1          | 2018-08-16 07:34:26 1 [Note] InnoDB: Using atomics to ref count buffer pool pages
db_1          | 2018-08-16 07:34:26 1 [Note] InnoDB: The InnoDB memory heap is disabled
db_1          | 2018-08-16 07:34:26 1 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
db_1          | 2018-08-16 07:34:26 1 [Note] InnoDB: Memory barrier is not used
db_1          | 2018-08-16 07:34:26 1 [Note] InnoDB: Compressed tables use zlib 1.2.3
db_1          | 2018-08-16 07:34:26 1 [Note] InnoDB: Using Linux native AIO
db_1          | 2018-08-16 07:34:26 1 [Note] InnoDB: Using CPU crc32 instructions
db_1          | 2018-08-16 07:34:26 1 [Note] InnoDB: Initializing buffer pool, size = 128.0M
db_1          | 2018-08-16 07:34:27 1 [Note] InnoDB: Completed initialization of buffer pool
db_1          | 2018-08-16 07:34:27 1 [Note] InnoDB: Highest supported file format is Barracuda.
db_1          | 2018-08-16 07:34:27 1 [Note] InnoDB: 128 rollback segment(s) are active.
db_1          | 2018-08-16 07:34:27 1 [Note] InnoDB: Waiting for purge to start
db_1          | 2018-08-16 07:34:27 1 [Note] InnoDB: 5.6.41 started; log sequence number 1864757
db_1          | 2018-08-16 07:34:28 1 [Note] Server hostname (bind-address): '*'; port: 3306
db_1          | 2018-08-16 07:34:28 1 [Note] IPv6 is available.
db_1          | 2018-08-16 07:34:28 1 [Note]   - '::' resolves to '::';
db_1          | 2018-08-16 07:34:28 1 [Note] Server socket created on IP: '::'.
db_1          | 2018-08-16 07:34:28 1 [Warning] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
db_1          | 2018-08-16 07:34:28 1 [Warning] 'proxies_priv' entry '@ root@404c82a8508a' ignored in --skip-name-resolve mode.
db_1          | 2018-08-16 07:34:28 1 [Note] Event Scheduler: Loaded 0 events
db_1          | 2018-08-16 07:34:28 1 [Note] mysqld: ready for connections.
db_1          | Version: '5.6.41'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server (GPL)
httpupload_1  | Generating SSL certificate
httpupload_1  | Generating a 2048 bit RSA private key
httpupload_1  | ..+++
httpupload_1  | ....................................................................................................................+++
httpupload_1  | writing new private key to 'key.pem'
httpupload_1  | -----
httpupload_1  | 2018-08-16 07:34:29,499  DEBUG    Expire run finished in 0.001227s
httpupload_1  | 2018-08-16 07:34:29,798  DEBUG    Loaded Plugin: XEP-0030: Service Discovery
httpupload_1  | 2018-08-16 07:34:29,851  DEBUG    Loaded Plugin: upload files via http
httpupload_1  | 2018-08-16 07:34:29,852  DEBUG    Connecting to xmpp:5270
httpupload_1  | 2018-08-16 07:34:29,852  DEBUG    DNS: Querying xmpp for AAAA records.
httpupload_1  | 2018-08-16 07:34:30,442  DEBUG    DNS: Error retreiving AAAA address info for xmpp.
httpupload_1  | 2018-08-16 07:34:30,442  DEBUG    DNS: Querying xmpp for A records.
httpupload_1  | 2018-08-16 07:34:30,461  DEBUG    Connecting to 172.30.0.4:5270
httpupload_1  | 2018-08-16 07:34:30,461  DEBUG    Event triggered: socket_error
httpupload_1  | 2018-08-16 07:34:30,461  ERROR    Could not connect to 172.30.0.4:5270. Socket Error #111: Connection refused
httpupload_1  | 2018-08-16 07:34:30,461  DEBUG    No remaining DNS records to try.
httpupload_1  | 2018-08-16 07:34:30,461  DEBUG    Waiting 1.7496976496912033 seconds before connecting.
httpupload_1  | 2018-08-16 07:34:32,265  DEBUG    DNS: Querying xmpp for AAAA records.
httpupload_1  | 2018-08-16 07:34:32,265  DEBUG    DNS: Error retreiving AAAA address info for xmpp.
httpupload_1  | 2018-08-16 07:34:32,265  DEBUG    DNS: Querying xmpp for A records.
httpupload_1  | 2018-08-16 07:34:32,266  DEBUG    Connecting to 172.30.0.4:5270
httpupload_1  | 2018-08-16 07:34:32,266  DEBUG    Event triggered: socket_error
httpupload_1  | 2018-08-16 07:34:32,266  ERROR    Could not connect to 172.30.0.4:5270. Socket Error #111: Connection refused
httpupload_1  | 2018-08-16 07:34:32,266  DEBUG    Waiting 2.067744125614662 seconds before connecting.
httpupload_1  | 2018-08-16 07:34:34,371  DEBUG    No remaining DNS records to try.
httpupload_1  | 2018-08-16 07:34:34,371  DEBUG    Waiting 4.194284280235029 seconds before connecting.
httpupload_1  | 2018-08-16 07:34:38,579  DEBUG    DNS: Querying xmpp for AAAA records.
httpupload_1  | 2018-08-16 07:34:38,591  DEBUG    DNS: Error retreiving AAAA address info for xmpp.
httpupload_1  | 2018-08-16 07:34:38,592  DEBUG    DNS: Querying xmpp for A records.
httpupload_1  | 2018-08-16 07:34:38,592  DEBUG    Connecting to 172.30.0.4:5270
httpupload_1  | 2018-08-16 07:34:38,593  DEBUG    Event triggered: socket_error
httpupload_1  | 2018-08-16 07:34:38,593  ERROR    Could not connect to 172.30.0.4:5270. Socket Error #111: Connection refused
httpupload_1  | 2018-08-16 07:34:38,593  DEBUG    Waiting 4.312314313555869 seconds before connecting.
httpupload_1  | 2018-08-16 07:34:43,001  DEBUG    No remaining DNS records to try.
httpupload_1  | 2018-08-16 07:34:43,001  DEBUG    Waiting 8.774750541726712 seconds before connecting.
httpupload_1  | 2018-08-16 07:34:51,817  DEBUG    DNS: Querying xmpp for AAAA records.
httpupload_1  | 2018-08-16 07:34:51,818  DEBUG    DNS: Error retreiving AAAA address info for xmpp.
httpupload_1  | 2018-08-16 07:34:51,818  DEBUG    DNS: Querying xmpp for A records.
httpupload_1  | 2018-08-16 07:34:51,819  DEBUG    Connecting to 172.30.0.4:5270
httpupload_1  | 2018-08-16 07:34:51,819  DEBUG    Event triggered: socket_error
httpupload_1  | 2018-08-16 07:34:51,819  ERROR    Could not connect to 172.30.0.4:5270. Socket Error #111: Connection refused
httpupload_1  | 2018-08-16 07:34:51,819  DEBUG    Waiting 7.433028694529857 seconds before connecting.
httpupload_1  | 2018-08-16 07:34:59,333  DEBUG    No remaining DNS records to try.
httpupload_1  | 2018-08-16 07:34:59,334  DEBUG    Waiting 14.640297002945978 seconds before connecting.
httpupload_1  | 2018-08-16 07:35:14,061  DEBUG    DNS: Querying xmpp for AAAA records.
httpupload_1  | 2018-08-16 07:35:14,062  DEBUG    DNS: Error retreiving AAAA address info for xmpp.
httpupload_1  | 2018-08-16 07:35:14,062  DEBUG    DNS: Querying xmpp for A records.
httpupload_1  | 2018-08-16 07:35:14,063  DEBUG    Connecting to 172.30.0.4:5270
httpupload_1  | 2018-08-16 07:35:14,063  DEBUG    Event triggered: socket_error
httpupload_1  | 2018-08-16 07:35:14,063  ERROR    Could not connect to 172.30.0.4:5270. Socket Error #111: Connection refused
httpupload_1  | 2018-08-16 07:35:14,063  DEBUG    Waiting 14.852991281684345 seconds before connecting.
httpupload_1  | 2018-08-16 07:35:28,992  DEBUG    No remaining DNS records to try.
httpupload_1  | 2018-08-16 07:35:28,992  DEBUG    Waiting 33.19868657459615 seconds before connecting.
httpupload_1  | 2018-08-16 07:36:02,256  DEBUG    DNS: Querying xmpp for AAAA records.
httpupload_1  | 2018-08-16 07:36:02,257  DEBUG    DNS: Error retreiving AAAA address info for xmpp.
httpupload_1  | 2018-08-16 07:36:02,257  DEBUG    DNS: Querying xmpp for A records.
httpupload_1  | 2018-08-16 07:36:02,258  DEBUG    Connecting to 172.30.0.4:5270
httpupload_1  | 2018-08-16 07:36:02,259  DEBUG    Event triggered: socket_error
httpupload_1  | 2018-08-16 07:36:02,259  ERROR    Could not connect to 172.30.0.4:5270. Socket Error #111: Connection refused
httpupload_1  | 2018-08-16 07:36:02,259  DEBUG    Waiting 24.990008764392154 seconds before connecting.
httpupload_1  | 2018-08-16 07:36:27,305  DEBUG    No remaining DNS records to try.
httpupload_1  | 2018-08-16 07:36:27,305  DEBUG    Waiting 46.40803058555546 seconds before connecting.
httpupload_1  | 2018-08-16 07:37:13,901  DEBUG    DNS: Querying xmpp for AAAA records.
httpupload_1  | 2018-08-16 07:37:13,902  DEBUG    DNS: Error retreiving AAAA address info for xmpp.
httpupload_1  | 2018-08-16 07:37:13,902  DEBUG    DNS: Querying xmpp for A records.
httpupload_1  | 2018-08-16 07:37:13,903  DEBUG    Connecting to 172.30.0.4:5270
httpupload_1  | 2018-08-16 07:37:13,903  DEBUG    Event triggered: socket_error
httpupload_1  | 2018-08-16 07:37:13,903  ERROR    Could not connect to 172.30.0.4:5270. Socket Error #111: Connection refused
httpupload_1  | 2018-08-16 07:37:13,904  DEBUG    Waiting 46.14517686460862 seconds before connecting.
httpupload_1  | 2018-08-16 07:38:00,194  DEBUG    No remaining DNS records to try.
httpupload_1  | 2018-08-16 07:38:00,195  DEBUG    Waiting 95.24999505761306 seconds before connecting.
httpupload_1  | 2018-08-16 07:39:35,688  DEBUG    DNS: Querying xmpp for AAAA records.
httpupload_1  | 2018-08-16 07:39:35,690  DEBUG    DNS: Error retreiving AAAA address info for xmpp.
httpupload_1  | 2018-08-16 07:39:35,691  DEBUG    DNS: Querying xmpp for A records.
httpupload_1  | 2018-08-16 07:39:35,692  DEBUG    Connecting to 172.30.0.4:5270
httpupload_1  | 2018-08-16 07:39:35,692  DEBUG    Event triggered: socket_error
httpupload_1  | 2018-08-16 07:39:35,692  ERROR    Could not connect to 172.30.0.4:5270. Socket Error #111: Connection refused
httpupload_1  | 2018-08-16 07:39:35,692  DEBUG    Waiting 98.54340286376006 seconds before connecting.
httpupload_1  | 2018-08-16 07:41:26,489  DEBUG    No remaining DNS records to try.
httpupload_1  | 2018-08-16 07:41:26,635  DEBUG    Waiting 170.44151190364832 seconds before connecting.
httpupload_1  | 2018-08-16 07:44:40,124  DEBUG    DNS: Querying xmpp for AAAA records.
httpupload_1  | 2018-08-16 07:44:40,171  DEBUG    DNS: Error retreiving AAAA address info for xmpp.
httpupload_1  | 2018-08-16 07:44:40,172  DEBUG    DNS: Querying xmpp for A records.
httpupload_1  | 2018-08-16 07:44:40,182  DEBUG    Connecting to 172.30.0.4:5270
httpupload_1  | 2018-08-16 07:44:40,206  DEBUG    Event triggered: connected
httpupload_1  | 2018-08-16 07:44:40,319  DEBUG     ==== TRANSITION disconnected -> connected
httpupload_1  | 2018-08-16 07:44:40,327  DEBUG    Starting HANDLER THREAD
httpupload_1  | 2018-08-16 07:44:40,328  DEBUG    Loading event runner
httpupload_1  | 2018-08-16 07:44:40,336  DEBUG    SEND (IMMED): <stream:stream xmlns="jabber:component:accept" xmlns:stream="http://etherx.jabber.org/streams" to='media.test1.ktuser.cloudns.asia'>
httpupload_1  | 2018-08-16 07:44:40,480  DEBUG    RECV: <stream:stream from="media.test1.ktuser.cloudns.asia" id="8afb0a09-dfb6-40aa-87aa-b77f9a9d56c0">
httpupload_1  | 2018-08-16 07:44:40,627  DEBUG    SEND (IMMED): <handshake xmlns="jabber:component:accept">fb672baf383e87728bb95e5dd5618d55f8cce248</handshake>
httpupload_1  | 2018-08-16 07:44:40,656  DEBUG    RECV: <handshake />
httpupload_1  | 2018-08-16 07:44:40,694  DEBUG    Event triggered: session_bind
httpupload_1  | 2018-08-16 07:44:40,705  DEBUG    Event triggered: session_start
httpupload_1  | 2018-08-16 07:45:25,366  DEBUG    Scheduled event: Session timeout check: ()
xmpp_1        | Generating SSL certificate
xmpp_1        | Generating a 2048 bit RSA private key
xmpp_1        | ............................+++
xmpp_1        | .........................................+++
xmpp_1        | writing new private key to 'key.pem'
xmpp_1        | -----
xmpp_1        | Generating GPG key pair
xmpp_1        | gpg: directory '/home/kontalk/.gnupg' created
xmpp_1        | gpg: keybox '/home/kontalk/.gnupg/pubring.kbx' created
xmpp_1        | gpg: /home/kontalk/.gnupg/trustdb.gpg: trustdb created
xmpp_1        | gpg: key A17A85E36F7FD64D marked as ultimately trusted
xmpp_1        | gpg: directory '/home/kontalk/.gnupg/openpgp-revocs.d' created
xmpp_1        | gpg: revocation certificate stored as '/home/kontalk/.gnupg/openpgp-revocs.d/D34A906CAECD25A498249B3FA17A85E36F7FD64D.rev'
xmpp_1        | gpg: checking the trustdb
xmpp_1        | gpg: marginals needed: 3  completes needed: 1  trust model: pgp
xmpp_1        | gpg: depth: 0  valid:   1  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 1u
xmpp_1        | Waiting for database
xmpp_1        | Creating database
xmpp_1        | LogLevel: ALL
xmpp_1        | tigase.util.DBSchemaLoader       <init>                  CONFIG     Properties: [{dbHostname=db, logLevel=ALL, adminJID=admin@test1.ktuser.cloudns.asia, dbType=mysql, rootUser==****, useSSL=false, dbPass==****, adminJIDpass=dummy, dbName=kontalk, schemaVersion=7-1, serverTimezone=Europe/Copenhagen, rootPass=****, dbUser=kontalk}]
xmpp_1        | tigase.util.DBSchemaLoader       validateDBConnection    INFO       Validating DBConnection, URI: jdbc:mysql://db/?user=root&password==****&useSSL=false&serverTimezone=Europe%2FCopenhagen
xmpp_1        | tigase.util.DBSchemaLoader       validateDBConnection    CONFIG     DriverManager (available drivers): [[com.mysql.jdbc.Driver@1218025c, com.mysql.fabric.jdbc.FabricMySQLDriver@3e3abc88]]
xmpp_1        | tigase.util.DBSchemaLoader       validateDBConnection    INFO       Connection OK
xmpp_1        | tigase.util.DBSchemaLoader       validateDBExists        INFO       Validating whether DB Exists, URI: jdbc:mysql://db/kontalk?user=kontalk&password==****&useSSL=false&serverTimezone=Europe%2FCopenhagen
xmpp_1        | tigase.util.DBSchemaLoader       validateDBExists        INFO       Exists OK
xmpp_1        | tigase.util.DBSchemaLoader       validateDBSchema        INFO       Validating DBSchema, URI: jdbc:mysql://db/kontalk?user=kontalk&password==****&useSSL=false&serverTimezone=Europe%2FCopenhagen
xmpp_1        | tigase.util.DBSchemaLoader       validateDBSchema        INFO       Schema exists, users: 6
xmpp_1        | tigase.util.DBSchemaLoader       validateDBSchema        INFO       Schema OK, accounts number: 6
xmpp_1        | tigase.util.DBSchemaLoader       addXmppAdminAccount     INFO       Adding XMPP Admin Account, URI: jdbc:mysql://db/kontalk?user=root&password==****&useSSL=false&serverTimezone=Europe%2FCopenhagen
xmpp_1        | tigase.util.DBSchemaLoader       addXmppAdminAccount     CONFIG     RepositoryFactory.getAuthRepository(null, jdbc:mysql://db/kontalk?user=root&password=****&useSSL=false&serverTimezone=Europe%2FCopenhagen,[{data-repo-pool-size=1}])
xmpp_1        | Aug 16, 2018 7:40:47 AM tigase.db.jdbc.DataRepositoryImpl initRepository
xmpp_1        | INFO: Table schema found: kontalk, database type: mysql, database driver: com.mysql.jdbc.Driver
xmpp_1        | Aug 16, 2018 7:40:48 AM tigase.db.jdbc.DataRepositoryImpl initRepository
xmpp_1        | INFO: Initialized database connection: jdbc:mysql://db/kontalk?user=root&password==****&useSSL=false&serverTimezone=Europe%2FCopenhagen
xmpp_1        | tigase.util.DBSchemaLoader       addXmppAdminAccount     WARNING    Error initializing DBtigase.db.UserExistsException: Error while adding user to repository, user possibly exists: admin@test1.ktuser.cloudns.asia
xmpp_1        | tigase.util.DBSchemaLoader       postInstallation        INFO       Post Installation, URI: jdbc:mysql://db/kontalk?user=root&password==****&useSSL=false&serverTimezone=Europe%2FCopenhagen
xmpp_1        | tigase.util.DBSchemaLoader       postInstallation        INFO       Finalizing...
xmpp_1        | tigase.util.DBSchemaLoader       loadSQLQueries          FINER      Loading queries, resource: mysql-installer-post, res_prefix: mysql
xmpp_1        | tigase.util.DBSchemaLoader       getResource             FINEST     Getting resource: mysql-installer-post @ filename: /home/kontalk/kontalk-server/tigase-server/database/mysql-installer-post.sql
xmpp_1        | tigase.util.DBSchemaLoader       postInstallation        INFO        completed OK
xmpp_1        | tigase.util.DBSchemaLoader       printInfo               INFO
xmpp_1        |
xmpp_1        | Database init.properties configuration:
xmpp_1        |
xmpp_1        | --user-db=mysql
xmpp_1        | --user-db-uri=jdbc:mysql://db/kontalk?user=kontalk&password==****&useSSL=false&serverTimezone=Europe%2FCopenhagen&useUnicode=true&characterEncoding=UTF-8
xmpp_1        | [INFO] Scanning for projects...
xmpp_1        | Downloading: https://repo.maven.apache.org/maven2/org/flywaydb/flyway-maven-plugin/4.2.0/flyway-maven-plugin-4.2.0.pom
Downloaded: https://repo.maven.apache.org/maven2/org/flywaydb/flyway-maven-plugin/4.2.0/flyway-maven-plugin-4.2.0.pom (5 KB at 1.5 KB/sec)
xmpp_1        | Downloading: https://repo.maven.apache.org/maven2/org/flywaydb/flyway-parent/4.2.0/flyway-parent-4.2.0.pom
Downloaded: https://repo.maven.apache.org/maven2/org/flywaydb/flyway-parent/4.2.0/flyway-parent-4.2.0.pom (33 KB at 384.6 KB/sec)
xmpp_1        | Downloading: https://repo.maven.apache.org/maven2/org/flywaydb/flyway-maven-plugin/4.2.0/flyway-maven-plugin-4.2.0.jar
Downloaded: https://repo.maven.apache.org/maven2/org/flywaydb/flyway-maven-plugin/4.2.0/flyway-maven-plugin-4.2.0.jar (32 KB at 292.5 KB/sec)
xmpp_1        | [INFO]
xmpp_1        | [INFO] ------------------------------------------------------------------------
xmpp_1        | [INFO] Building Kontalk Tigase extension 1.0
xmpp_1        | [INFO] ------------------------------------------------------------------------
xmpp_1        | [INFO]
xmpp_1        | [INFO] --- flyway-maven-plugin:4.2.0:baseline (default-cli) @ tigase-extension ---
xmpp_1        | Downloading: https://repo.maven.apache.org/maven2/mysql/mysql-connector-java/6.0.5/mysql-connector-java-6.0.5.pom
Downloaded: https://repo.maven.apache.org/maven2/mysql/mysql-connector-java/6.0.5/mysql-connector-java-6.0.5.pom (2 KB at 20.0 KB/sec)
xmpp_1        | Downloading: https://repo.maven.apache.org/maven2/org/slf4j/slf4j-jdk14/1.7.16/slf4j-jdk14-1.7.16.pom
Downloaded: https://repo.maven.apache.org/maven2/org/slf4j/slf4j-jdk14/1.7.16/slf4j-jdk14-1.7.16.pom (1008 B at 35.2 KB/sec)
xmpp_1        | Downloading: https://repo.maven.apache.org/maven2/org/slf4j/slf4j-parent/1.7.16/slf4j-parent-1.7.16.pom
Downloaded: https://repo.maven.apache.org/maven2/org/slf4j/slf4j-parent/1.7.16/slf4j-parent-1.7.16.pom (14 KB at 470.9 KB/sec)
xmpp_1        | Downloading: https://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/1.7.16/slf4j-api-1.7.16.pom
Downloaded: https://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/1.7.16/slf4j-api-1.7.16.pom (3 KB at 93.4 KB/sec)
xmpp_1        | Downloading: https://repo.maven.apache.org/maven2/org/slf4j/jcl-over-slf4j/1.7.16/jcl-over-slf4j-1.7.16.pom
Downloaded: https://repo.maven.apache.org/maven2/org/slf4j/jcl-over-slf4j/1.7.16/jcl-over-slf4j-1.7.16.pom (963 B at 34.8 KB/sec)
xmpp_1        | Downloading: https://repo.maven.apache.org/maven2/org/flywaydb/flyway-core/4.2.0/flyway-core-4.2.0.pom
Downloaded: https://repo.maven.apache.org/maven2/org/flywaydb/flyway-core/4.2.0/flyway-core-4.2.0.pom (22 KB at 502.5 KB/sec)
xmpp_1        | Downloading: https://repo.maven.apache.org/maven2/mysql/mysql-connector-java/6.0.5/mysql-connector-java-6.0.5.jar
xmpp_1        | Downloading: https://repo.maven.apache.org/maven2/org/slf4j/slf4j-jdk14/1.7.16/slf4j-jdk14-1.7.16.jar
xmpp_1        | Downloading: https://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/1.7.16/slf4j-api-1.7.16.jar
xmpp_1        | Downloading: https://repo.maven.apache.org/maven2/org/slf4j/jcl-over-slf4j/1.7.16/jcl-over-slf4j-1.7.16.jar
xmpp_1        | Downloading: https://repo.maven.apache.org/maven2/org/flywaydb/flyway-core/4.2.0/flyway-core-4.2.0.jar
Downloaded: https://repo.maven.apache.org/maven2/org/slf4j/slf4j-jdk14/1.7.16/slf4j-jdk14-1.7.16.jar (9 KB at 92.7 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/org/slf4j/jcl-over-slf4j/1.7.16/jcl-over-slf4j-1.7.16.jar (17 KB at 162.1 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/1.7.16/slf4j-api-1.7.16.jar (40 KB at 353.2 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/org/flywaydb/flyway-core/4.2.0/flyway-core-4.2.0.jar (388 KB at 913.9 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/mysql/mysql-connector-java/6.0.5/mysql-connector-java-6.0.5.jar (1847 KB at 1911.9 KB/sec)

#6

The log is incomplete, please paste all of it until the initialization is finished (it will be logged by Tigase itself).

Also, I noticed external logging is enabled. This might slow things with certain versions of Docker to the point that the server doesn’t work anymore (as a matter of facts, it requires another running container). Comment out these lines:

basic-conf/logging/handlers=biz.paluch.logging.gelf.jul.GelfLogHandler,java.util.logging.ConsoleHandler
basic-conf/logging/java.util.logging.ConsoleHandler.level=ALL
basic-conf/logging/biz.paluch.logging.gelf.jul.GelfLogHandler.level=ALL
basic-conf/logging/biz.paluch.logging.gelf.jul.GelfLogHandler.host=udp:logstash
basic-conf/logging/biz.paluch.logging.gelf.jul.GelfLogHandler.port=12201
basic-conf/logging/biz.paluch.logging.gelf.jul.GelfLogHandler.version=1.1
basic-conf/logging/biz.paluch.logging.gelf.jul.GelfLogHandler.facility={{ .Env.XMPP_SERVICE }}
basic-conf/logging/biz.paluch.logging.gelf.jul.GelfLogHandler.extractStackTrace=true
basic-conf/logging/biz.paluch.logging.gelf.jul.GelfLogHandler.filterStackTrace=true
basic-conf/logging/biz.paluch.logging.gelf.jul.GelfLogHandler.timestampPattern=yyyy-MM-dd HH:mm:ss.SSSS
basic-conf/logging/biz.paluch.logging.gelf.jul.GelfLogHandler.maximumMessageSize=8192

And insert these lines:

basic-conf/logging/handlers=java.util.logging.ConsoleHandler
basic-conf/logging/java.util.logging.ConsoleHandler.level=ALL

Then, a simple container restart should be enough:

./launcher restart