BeagleIM just trying lowest DNS SRV entry (#531)
Unknown opened 4 years ago

Hi!

For me it seems as if BeagleIM just tries to connect to the first DNS SRV entry for _xmpp-client._tcp.domain.tld, that is: the one with the lowest priority, and not trying other entries, although they are listed in the result set of DNS query.

Below you can see the console output after starting BeagleIM 4.0b97. You can see the resolver result includes the entry for port 443 with priority 15 first. While Beagle was running, I changed DNS zone to have port 443 priority of 1. After that change was done Beagle was able to connect successfully.

I believe this is an error and Beagle should try other DNS entry than just the first one with lowest priority. Basically I want to have port 443 as a fallback port in case some restrictive firewalls are blocking standard XMPP ports 5222 and 5223.

 XMPPClient starting connection......
connection state changed: disconnected
 SocketConnector connecting to server: domain.tld
starting for service: _xmpps-client._tcp. at: domain.tld
starting for service: _xmpp-client._tcp. at: domain.tld
starting for service: _xmpps-client._tcp.domain.tld at: domain.tld
starting for service: _xmpp-client._tcp.domain.tld at: domain.tld
srvName: _xmpps-client._tcp.domain.tld sdFd: 6 resolverQueue: <OS_dispatch_queue_serial: DnsSrvResolverQueue DF8C938A-065F-4924-B411-3667F64D73F1>
srvName: _xmpp-client._tcp.domain.tld sdFd: 7 resolverQueue: <OS_dispatch_queue_serial: DnsSrvResolverQueue E7318D37-5375-4FDE-9974-8B1ECF96D838>
stopping for: _xmpp-client._tcp.domain.tld
stopping for: _xmpps-client._tcp.domain.tld
finished for: domain.tld
 SocketConnector got dns record to connect to: [port: 5222, weight: 0, priority: 5, target: jabber.domain2.tld, directTls: false, isValid: true]
 SocketConnector connecting to: jabber.domain2.tld 5222
stopping for: _xmpps-client._tcp.domain.tld
stopping for: _xmpp-client._tcp.domain.tld
connection state changed: connecting
 SocketConnector setsockopt!
 SocketConnector setsockopt done
 SocketConnector inStream.hasBytesAvailable false
 SocketConnector stream event: OpenCompleted
 SocketConnector stream event: OpenCompleted
 SocketConnector stream event: HasSpaceAvailable
 SocketConnector starting new parser TigaseSwift.XMLParser
 SocketConnector sending stanza: <stream:stream to='domain.tld' from='ij@domain.tld' version='1.0' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
 SocketConnector stream event: HasSpaceAvailable
 WriteBuffer sent  138 bytes 138 of 138
loaded 24 during initialization of the view
loaded 1 during initialization of the view
found cache directory: /Users/juergensmann.ingo/Library/Containers/org.tigase.messenger.BeagleIM/Data/Library/Caches/org.tigase.messenger.BeagleIM/avatars
 SocketConnector stream event: HasBytesAvailable
 SocketConnector stream event: EndEncountered
connection state changed: connected
 SessionObject removing properties for scopes [TigaseSwift.SessionObject.Scope.stream]
 XMPPClient connection stopped......
##### ij@domain.tld - disconnected 2020-07-20 06:31:50 +0000
 XMPPClient starting connection......
connection state changed: disconnected
 SocketConnector connecting to server: domain.tld
 DNSSrvResolverWithCache loaded DNS records for domain: domain.tld from cache [[port: 5222, weight: 0, priority: 5, target: jabber.domain2.tld, directTls: false, isValid: true], [port: 5223, weight: 0, priority: 5, target: jabber.domain2.tld, directTls: true, isValid: true], [port: 443, weight: 0, priority: 15, target: turn2.domain.tld, directTls: false, isValid: true], [port: 443, weight: 0, priority: 15, target: turn2.domain.tld, directTls: true, isValid: true]]
 SocketConnector got dns record to connect to: [port: 5222, weight: 0, priority: 5, target: jabber.domain2.tld, directTls: false, isValid: true]
 SocketConnector connecting to: jabber.domain2.tld 5222
starting for service: _xmpps-client._tcp. at: domain.tld
starting for service: _xmpp-client._tcp. at: domain.tld
starting for service: _xmpps-client._tcp.domain.tld at: domain.tld
starting for service: _xmpp-client._tcp.domain.tld at: domain.tld
srvName: _xmpps-client._tcp.domain.tld sdFd: 5 resolverQueue: <OS_dispatch_queue_serial: DnsSrvResolverQueue 25151115-7367-4A9D-8CB3-DFA783F0A184>
srvName: _xmpp-client._tcp.domain.tld sdFd: 8 resolverQueue: <OS_dispatch_queue_serial: DnsSrvResolverQueue 2E305F95-8F7F-4B07-8567-8D09C29D9086>
stopping for: _xmpps-client._tcp.domain.tld
stopping for: _xmpp-client._tcp.domain.tld
finished for: domain.tld
dns resolution finished: success(TigaseSwift.XMPPSrvResult)
stopping for: _xmpps-client._tcp.domain.tld
stopping for: _xmpp-client._tcp.domain.tld
connection state changed: connecting
 SocketConnector setsockopt!
 SocketConnector setsockopt done
 SocketConnector inStream.hasBytesAvailable false
 SocketConnector stream event: OpenCompleted
 SocketConnector stream event: OpenCompleted
 SocketConnector stream event: HasSpaceAvailable
 SocketConnector starting new parser TigaseSwift.XMLParser
 SocketConnector sending stanza: <stream:stream to='domain.tld' from='ij@domain.tld' version='1.0' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
 WriteBuffer sent  138 bytes 138 of 138
 SocketConnector stream event: HasSpaceAvailable
 SocketConnector stream event: HasBytesAvailable
 SocketConnector stream event: EndEncountered
connection state changed: connected
 SessionObject removing properties for scopes [TigaseSwift.SessionObject.Scope.stream]
 XMPPClient connection stopped......
##### ij@domain.tld - disconnected 2020-07-20 06:32:19 +0000
 XMPPClient starting connection......
connection state changed: disconnected
 SocketConnector connecting to server: domain.tld
 DNSSrvResolverWithCache loaded DNS records for domain: domain.tld from cache [[port: 5222, weight: 0, priority: 5, target: jabber.domain2.tld, directTls: false, isValid: true], [port: 5223, weight: 0, priority: 5, target: jabber.domain2.tld, directTls: true, isValid: true], [port: 443, weight: 0, priority: 15, target: turn2.domain.tld, directTls: false, isValid: true], [port: 443, weight: 0, priority: 15, target: turn2.domain.tld, directTls: true, isValid: true]]
 SocketConnector got dns record to connect to: [port: 5222, weight: 0, priority: 5, target: jabber.domain2.tld, directTls: false, isValid: true]
starting for service: _xmpps-client._tcp. at: domain.tld
 SocketConnector connecting to: jabber.domain2.tld 5222
starting for service: _xmpp-client._tcp. at: domain.tld
starting for service: _xmpps-client._tcp.domain.tld at: domain.tld
starting for service: _xmpp-client._tcp.domain.tld at: domain.tld
srvName: _xmpps-client._tcp.domain.tld sdFd: 11 resolverQueue: <OS_dispatch_queue_serial: DnsSrvResolverQueue A07BF2E9-005F-46AE-B3F3-AED857681A73>
srvName: _xmpp-client._tcp.domain.tld sdFd: 12 resolverQueue: <OS_dispatch_queue_serial: DnsSrvResolverQueue 68711B8F-3221-4B0E-B035-8AB93C3931C3>
stopping for: _xmpps-client._tcp.domain.tld
stopping for: _xmpp-client._tcp.domain.tld
finished for: domain.tld
dns resolution finished: success(TigaseSwift.XMPPSrvResult)
stopping for: _xmpps-client._tcp.domain.tld
stopping for: _xmpp-client._tcp.domain.tld
connection state changed: connecting
 SocketConnector setsockopt!
 SocketConnector setsockopt done
 SocketConnector inStream.hasBytesAvailable false
 SocketConnector stream event: OpenCompleted
 SocketConnector stream event: OpenCompleted
 SocketConnector stream event: HasSpaceAvailable
 SocketConnector starting new parser TigaseSwift.XMLParser
 SocketConnector sending stanza: <stream:stream to='domain.tld' from='ij@domain.tld' version='1.0' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
 WriteBuffer sent  138 bytes 138 of 138
 SocketConnector stream event: HasSpaceAvailable
 SocketConnector stream event: HasBytesAvailable
 SocketConnector stream event: EndEncountered
connection state changed: connected
 SessionObject removing properties for scopes [TigaseSwift.SessionObject.Scope.stream]
 XMPPClient connection stopped......
##### ij@domain.tld - disconnected 2020-07-20 06:32:49 +0000
mouse entered
mouse exited
 XMPPClient starting connection......
connection state changed: disconnected
 SocketConnector connecting to server: domain.tld
 DNSSrvResolverWithCache loaded DNS records for domain: domain.tld from cache [[port: 5222, weight: 0, priority: 5, target: jabber.domain2.tld, directTls: false, isValid: true], [port: 5223, weight: 0, priority: 5, target: jabber.domain2.tld, directTls: true, isValid: true], [port: 443, weight: 0, priority: 15, target: turn2.domain.tld, directTls: false, isValid: true], [port: 443, weight: 0, priority: 15, target: turn2.domain.tld, directTls: true, isValid: true]]
 SocketConnector got dns record to connect to: [port: 5222, weight: 0, priority: 5, target: jabber.domain2.tld, directTls: false, isValid: true]
 SocketConnector connecting to: jabber.domain2.tld 5222
starting for service: _xmpps-client._tcp. at: domain.tld
starting for service: _xmpp-client._tcp. at: domain.tld
starting for service: _xmpps-client._tcp.domain.tld at: domain.tld
starting for service: _xmpp-client._tcp.domain.tld at: domain.tld
srvName: _xmpps-client._tcp.domain.tld sdFd: 15 resolverQueue: <OS_dispatch_queue_serial: DnsSrvResolverQueue 15762817-E760-4F1F-B96F-D8F4E295D0AF>
srvName: _xmpp-client._tcp.domain.tld sdFd: 16 resolverQueue: <OS_dispatch_queue_serial: DnsSrvResolverQueue 58457B84-1F6A-40F9-8A2E-9FB2FF408A32>
stopping for: _xmpp-client._tcp.domain.tld
stopping for: _xmpps-client._tcp.domain.tld
finished for: domain.tld
dns resolution finished: success(TigaseSwift.XMPPSrvResult)
stopping for: _xmpps-client._tcp.domain.tld
stopping for: _xmpp-client._tcp.domain.tld
connection state changed: connecting
 SocketConnector setsockopt!
 SocketConnector setsockopt done
 SocketConnector inStream.hasBytesAvailable false
 SocketConnector stream event: OpenCompleted
 SocketConnector stream event: OpenCompleted
 SocketConnector stream event: HasSpaceAvailable
 SocketConnector starting new parser TigaseSwift.XMLParser
 SocketConnector sending stanza: <stream:stream to='domain.tld' from='ij@domain.tld' version='1.0' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
 WriteBuffer sent  138 bytes 138 of 138
 SocketConnector stream event: HasSpaceAvailable
mouse entered
mouse exited
 SocketConnector stream event: HasBytesAvailable
 SocketConnector stream event: EndEncountered
connection state changed: connected
 SessionObject removing properties for scopes [TigaseSwift.SessionObject.Scope.stream]
 XMPPClient connection stopped......
##### ij@domain.tld - disconnected 2020-07-20 06:33:22 +0000
 XMPPClient starting connection......
connection state changed: disconnected
 SocketConnector connecting to server: domain.tld
 DNSSrvResolverWithCache loaded DNS records for domain: domain.tld from cache [[port: 5222, weight: 0, priority: 5, target: jabber.domain2.tld, directTls: false, isValid: true], [port: 5223, weight: 0, priority: 5, target: jabber.domain2.tld, directTls: true, isValid: true], [port: 443, weight: 0, priority: 15, target: turn2.domain.tld, directTls: false, isValid: true], [port: 443, weight: 0, priority: 15, target: turn2.domain.tld, directTls: true, isValid: true]]
 SocketConnector got dns record to connect to: [port: 5222, weight: 0, priority: 5, target: jabber.domain2.tld, directTls: false, isValid: true]
 SocketConnector connecting to: jabber.domain2.tld 5222
starting for service: _xmpps-client._tcp. at: domain.tld
starting for service: _xmpp-client._tcp. at: domain.tld
starting for service: _xmpps-client._tcp.domain.tld at: domain.tld
starting for service: _xmpp-client._tcp.domain.tld at: domain.tld
srvName: _xmpps-client._tcp.domain.tld sdFd: 17 resolverQueue: <OS_dispatch_queue_serial: DnsSrvResolverQueue 0BFD99A0-7F43-428D-AF4D-CDF3AC5FFE81>
srvName: _xmpp-client._tcp.domain.tld sdFd: 18 resolverQueue: <OS_dispatch_queue_serial: DnsSrvResolverQueue F38ABC37-957A-4AEA-86D5-A4806068D801>
stopping for: _xmpp-client._tcp.domain.tld
stopping for: _xmpps-client._tcp.domain.tld
finished for: domain.tld
dns resolution finished: success(TigaseSwift.XMPPSrvResult)
stopping for: _xmpps-client._tcp.domain.tld
stopping for: _xmpp-client._tcp.domain.tld
connection state changed: connecting
 SocketConnector setsockopt!
 SocketConnector setsockopt done
 SocketConnector inStream.hasBytesAvailable false
 SocketConnector stream event: OpenCompleted
 SocketConnector stream event: OpenCompleted
 SocketConnector stream event: HasSpaceAvailable
 SocketConnector starting new parser TigaseSwift.XMLParser
 SocketConnector sending stanza: <stream:stream to='domain.tld' from='ij@domain.tld' version='1.0' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
 WriteBuffer sent  138 bytes 138 of 138
 SocketConnector stream event: HasSpaceAvailable
 SocketConnector stream event: HasBytesAvailable
 SocketConnector stream event: EndEncountered
connection state changed: connected
 SessionObject removing properties for scopes [TigaseSwift.SessionObject.Scope.stream]
 XMPPClient connection stopped......
##### ij@domain.tld - disconnected 2020-07-20 06:33:59 +0000
 XMPPClient starting connection......
connection state changed: disconnected
 SocketConnector connecting to server: domain.tld
 DNSSrvResolverWithCache loaded DNS records for domain: domain.tld from cache [[port: 5222, weight: 0, priority: 5, target: jabber.domain2.tld, directTls: false, isValid: true], [port: 5223, weight: 0, priority: 5, target: jabber.domain2.tld, directTls: true, isValid: true], [port: 443, weight: 0, priority: 15, target: turn2.domain.tld, directTls: false, isValid: true], [port: 443, weight: 0, priority: 15, target: turn2.domain.tld, directTls: true, isValid: true]]
 SocketConnector got dns record to connect to: [port: 5222, weight: 0, priority: 5, target: jabber.domain2.tld, directTls: false, isValid: true]
starting for service: _xmpps-client._tcp. at: domain.tld
starting for service: _xmpp-client._tcp. at: domain.tld
 SocketConnector connecting to: jabber.domain2.tld 5222
starting for service: _xmpps-client._tcp.domain.tld at: domain.tld
starting for service: _xmpp-client._tcp.domain.tld at: domain.tld
srvName: _xmpps-client._tcp.domain.tld sdFd: 19 resolverQueue: <OS_dispatch_queue_serial: DnsSrvResolverQueue 5A3EF89A-35A0-4A98-A272-EDBF35000F24>
srvName: _xmpp-client._tcp.domain.tld sdFd: 20 resolverQueue: <OS_dispatch_queue_serial: DnsSrvResolverQueue 8AE4C384-56F8-42E3-88A1-4AB274EB36A9>
stopping for: _xmpp-client._tcp.domain.tld
stopping for: _xmpps-client._tcp.domain.tld
finished for: domain.tld
dns resolution finished: success(TigaseSwift.XMPPSrvResult)
stopping for: _xmpps-client._tcp.domain.tld
stopping for: _xmpp-client._tcp.domain.tld
connection state changed: connecting
 SocketConnector setsockopt!
 SocketConnector setsockopt done
 SocketConnector inStream.hasBytesAvailable false
 SocketConnector stream event: OpenCompleted
 SocketConnector stream event: OpenCompleted
 SocketConnector stream event: HasSpaceAvailable
 SocketConnector starting new parser TigaseSwift.XMLParser
 SocketConnector sending stanza: <stream:stream to='domain.tld' from='ij@domain.tld' version='1.0' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
 SocketConnector stream event: HasSpaceAvailable
 WriteBuffer sent  138 bytes 138 of 138
 SocketConnector stream event: HasBytesAvailable
 SocketConnector stream event: EndEncountered
connection state changed: connected
 SessionObject removing properties for scopes [TigaseSwift.SessionObject.Scope.stream]
 XMPPClient connection stopped......
##### ij@domain.tld - disconnected 2020-07-20 06:34:28 +0000
 XMPPClient starting connection......
connection state changed: disconnected
 SocketConnector connecting to server: domain.tld
 DNSSrvResolverWithCache loaded DNS records for domain: domain.tld from cache [[port: 5222, weight: 0, priority: 5, target: jabber.domain2.tld, directTls: false, isValid: true], [port: 5223, weight: 0, priority: 5, target: jabber.domain2.tld, directTls: true, isValid: true], [port: 443, weight: 0, priority: 15, target: turn2.domain.tld, directTls: false, isValid: true], [port: 443, weight: 0, priority: 15, target: turn2.domain.tld, directTls: true, isValid: true]]
 SocketConnector got dns record to connect to: [port: 5222, weight: 0, priority: 5, target: jabber.domain2.tld, directTls: false, isValid: true]
 SocketConnector connecting to: jabber.domain2.tld 5222
starting for service: _xmpps-client._tcp. at: domain.tld
starting for service: _xmpp-client._tcp. at: domain.tld
starting for service: _xmpps-client._tcp.domain.tld at: domain.tld
starting for service: _xmpp-client._tcp.domain.tld at: domain.tld
srvName: _xmpps-client._tcp.domain.tld sdFd: 21 resolverQueue: <OS_dispatch_queue_serial: DnsSrvResolverQueue 59A2C617-B040-4FEB-B30A-5003D265D5F8>
srvName: _xmpp-client._tcp.domain.tld sdFd: 22 resolverQueue: <OS_dispatch_queue_serial: DnsSrvResolverQueue 02AC439F-728D-4B69-8F5C-B7ACB129D560>
stopping for: _xmpps-client._tcp.domain.tld
stopping for: _xmpp-client._tcp.domain.tld
finished for: domain.tld
dns resolution finished: success(TigaseSwift.XMPPSrvResult)
stopping for: _xmpps-client._tcp.domain.tld
stopping for: _xmpp-client._tcp.domain.tld
connection state changed: connecting
 SocketConnector setsockopt!
 SocketConnector setsockopt done
 SocketConnector inStream.hasBytesAvailable false
 SocketConnector stream event: OpenCompleted
 SocketConnector stream event: OpenCompleted
 SocketConnector stream event: HasSpaceAvailable
 SocketConnector starting new parser TigaseSwift.XMLParser
 SocketConnector sending stanza: <stream:stream to='domain.tld' from='ij@domain.tld' version='1.0' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
 WriteBuffer sent  138 bytes 138 of 138
 SocketConnector stream event: HasSpaceAvailable
 SocketConnector stream event: HasBytesAvailable
 SocketConnector stream event: EndEncountered
connection state changed: connected
 SessionObject removing properties for scopes [TigaseSwift.SessionObject.Scope.stream]
 XMPPClient connection stopped......
##### ij@domain.tld - disconnected 2020-07-20 06:35:11 +0000
 XMPPClient starting connection......
connection state changed: disconnected
 SocketConnector connecting to server: domain.tld
 DNSSrvResolverWithCache loaded DNS records for domain: domain.tld from cache [[port: 5222, weight: 0, priority: 5, target: jabber.domain2.tld, directTls: false, isValid: true], [port: 5223, weight: 0, priority: 5, target: jabber.domain2.tld, directTls: true, isValid: true], [port: 443, weight: 0, priority: 15, target: turn2.domain.tld, directTls: false, isValid: true], [port: 443, weight: 0, priority: 15, target: turn2.domain.tld, directTls: true, isValid: true]]
 SocketConnector got dns record to connect to: [port: 5222, weight: 0, priority: 5, target: jabber.domain2.tld, directTls: false, isValid: true]
starting for service: _xmpps-client._tcp. at: domain.tld
 SocketConnector connecting to: jabber.domain2.tld 5222
starting for service: _xmpp-client._tcp. at: domain.tld
starting for service: _xmpps-client._tcp.domain.tld at: domain.tld
starting for service: _xmpp-client._tcp.domain.tld at: domain.tld
srvName: _xmpps-client._tcp.domain.tld sdFd: 23 resolverQueue: <OS_dispatch_queue_serial: DnsSrvResolverQueue A91E73F7-747E-488A-BDAE-F7F5E2761AB9>
srvName: _xmpp-client._tcp.domain.tld sdFd: 24 resolverQueue: <OS_dispatch_queue_serial: DnsSrvResolverQueue 6F0BD7F3-A17D-42D7-9DED-19E7E3F7AB2F>
stopping for: _xmpps-client._tcp.domain.tld
stopping for: _xmpp-client._tcp.domain.tld
finished for: domain.tld
dns resolution finished: success(TigaseSwift.XMPPSrvResult)
stopping for: _xmpps-client._tcp.domain.tld
stopping for: _xmpp-client._tcp.domain.tld
connection state changed: connecting
 SocketConnector setsockopt!
 SocketConnector setsockopt done
 SocketConnector inStream.hasBytesAvailable false
 SocketConnector stream event: OpenCompleted
 SocketConnector stream event: OpenCompleted
 SocketConnector stream event: HasSpaceAvailable
 SocketConnector starting new parser TigaseSwift.XMLParser
 SocketConnector sending stanza: <stream:stream to='domain.tld' from='ij@domain.tld' version='1.0' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
 WriteBuffer sent  138 bytes 138 of 138
 SocketConnector stream event: HasSpaceAvailable
 SocketConnector stream event: HasBytesAvailable
 SocketConnector stream event: EndEncountered
connection state changed: connected
 SessionObject removing properties for scopes [TigaseSwift.SessionObject.Scope.stream]
 XMPPClient connection stopped......
##### ij@domain.tld - disconnected 2020-07-20 06:35:54 +0000
 XMPPClient starting connection......
connection state changed: disconnected
 SocketConnector connecting to server: domain.tld
 DNSSrvResolverWithCache loaded DNS records for domain: domain.tld from cache [[port: 443, weight: 0, priority: 1, target: turn2.domain.tld, directTls: false, isValid: true], [port: 443, weight: 0, priority: 1, target: turn2.domain.tld, directTls: true, isValid: true], [port: 5222, weight: 0, priority: 5, target: jabber.domain2.tld, directTls: false, isValid: true], [port: 5223, weight: 0, priority: 5, target: jabber.domain2.tld, directTls: true, isValid: true]]
 SocketConnector got dns record to connect to: [port: 443, weight: 0, priority: 1, target: turn2.domain.tld, directTls: false, isValid: true]
starting for service: _xmpps-client._tcp. at: domain.tld
 SocketConnector connecting to: turn2.domain.tld 443
starting for service: _xmpp-client._tcp. at: domain.tld
starting for service: _xmpps-client._tcp.domain.tld at: domain.tld
starting for service: _xmpp-client._tcp.domain.tld at: domain.tld
srvName: _xmpps-client._tcp.domain.tld sdFd: 25 resolverQueue: <OS_dispatch_queue_serial: DnsSrvResolverQueue 643F6EB1-3822-4842-90E8-9D8E2B191D24>
srvName: _xmpp-client._tcp.domain.tld sdFd: 26 resolverQueue: <OS_dispatch_queue_serial: DnsSrvResolverQueue 616142E0-0C31-4CF8-9A95-01A181F9EB37>
stopping for: _xmpp-client._tcp.domain.tld
stopping for: _xmpps-client._tcp.domain.tld
finished for: domain.tld
dns resolution finished: success(TigaseSwift.XMPPSrvResult)
stopping for: _xmpps-client._tcp.domain.tld
stopping for: _xmpp-client._tcp.domain.tld
 SocketConnector sending stanza: <stream:stream to='domain.tld' from='ij@domain.tld' version='1.0' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
eam event: OpenCompleted
 SocketConnector stream event: OpenCompleted
 SocketConnector stream event: HasSpaceAvailable
 SocketConnector starting new parser TigaseSwift.XMLParser
 SocketConnector sending stanza: <stream:stream to='domain.tld' from='ij@domain.tld' version='1.0' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
 WriteBuffer sent  138 bytes 138 of 138
 SocketConnector stream event: HasSpaceAvailable
 SocketConnector stream started: ["": "jabber:clie SocketConnector stream started: ["": "jabber:client", "from": "domain.tld", "xml:lang": "en", "id": "14422953608380912148", "stream": "http://etherx.jabber.org/streams", "to": "ij@domain.tld", "version": "1.0"]
 SocketSessionLogic processing stream features
 SocketSessionLogic checking TLS
 SocketSessionLogic finished processing stream features
 SocketConnector sending stanza: <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
 WriteBuffer sent  51 bytes 51 of 51
 SocketConnector stream event: HasSpaceAvailable
 SocketConnector stream event: HasBytesAvailable
 SocketConnector configuring TLS
Unknown commented 4 years ago

BeagleIM jumps to the next DNS entry if it is not able to connect to the remote server. In your logs you have following entries:

 SocketConnector sending stanza: <stream:stream to='domain.tld' from='ij@domain.tld' version='1.0' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>
 WriteBuffer sent  138 bytes 138 of 138
 SocketConnector stream event: HasSpaceAvailable
 SocketConnector stream event: HasBytesAvailable
 SocketConnector stream event: EndEncountered
connection state changed: connected

which means that remote server was available and accepted TCP connection and due to that BeagleIM decided that connection to that endpoint is valid.

Subsequent disconnection was assumed as an issue on the server - ie. some timeout, so BeagleIM backed of and retried with DNS entries assuming that all entries are still valid (as TCP connection to the server was possible).

Due to that I do not think that is an error in BeagleIM. It is a valid mechanism jumping to the next entry if TCP connection would not be possible.

Unknown commented 4 years ago

Don't think so... I can of course revert the DNS change of priority and retry... But I had it running like 5 mins without success before I did the DNS change. And only after that change, Beagle was able to connect.

Unknown commented 4 years ago

But BeagleIM was still able to connect to the TCP port, even with your initial configuration so it was not retrying any other connection option.

BeagleIM even was sending stream initiation over TCP connection and then it was closed (by the remote server?).

Unknown commented 4 years ago

It still didn't work. I was not online... I can do a screencast to show it... :) Maybe it's the restrictive firewall that shows up as connection... the FW is looking maybe at the content and decide whether or not this is a WhatsApp connection on port 5222 (allowed) or a standard XMPP connection (blocked).

Unknown commented 4 years ago

Either way, connection was accepted, so why the client should try any other connection options? It is the same as if we would try to establish a connection and server would decide to stop it. Then it should just retry and not try another host.

Unknown commented 4 years ago

Nope, negative... there was no connection at all...

I can provide you a video where you can see the timing of the events (just message me in the Tigase MUC)... the log hangs for quite a long time at this point:

 WriteBuffer sent  138 bytes 138 of 138
 SocketConnector stream event: HasBytesAvailable

Then, the next lines are this:

 SocketConnector stream event: EndEncountered
connection state changed: connected
 SessionObject removing properties for scopes [TigaseSwift.SessionObject.Scope.stream]
 XMPPClient connection stopped......
##### ij@hookipa.net - disconnected 2020-07-21 06:44:05 +0000
 XMPPClient starting connection......
connection state changed: disconnected

And as you can see from this screenshot of the company firewall, the access to port 5222 has been denied: Bildschirmfoto 2020-07-21 um 08 46 25

So, definitely there is no established connection to port 5222 in this case and I think the message connection state changed: connected is wrong here. Beagle cannot connect to the standard port and should try the next host in DNS SRV RR.

Unknown commented 4 years ago

Actually "connected" is written only if TCP connection was established - (if TCP socket connection was established).

Looking at the screen from your firewall I'm convinced that the connection was established. There is an Application column which actually states type of the connection and that can only be detected by traffic inspection which is only possibile after TCP connection is established.

issue 1 of 1
Issue Votes (0)
Watchers (0)
Reference
tigase/_clients/beagle-im#531
Please wait...
Page is in error, reload to recover