ChatSecure / ChatSecure-iOS

ChatSecure is a free and open source encrypted chat client for iOS that supports OTR and OMEMO encryption over XMPP.
https://chatsecure.org
Other
3.13k stars 1.03k forks source link

Push-error: "Got error of type 'cancel' (remote-server-not-found)" : Possible DNS-issue #774

Open fzahn opened 7 years ago

fzahn commented 7 years ago

Hi,

on prosody 0.9 I have installed the mod_cloud_notify plugin and mod_smack and mod_smack_offline as well. I have a chatdomain "firstdomain.com" where I have SRV-records for _xmpp-server._tcp _xmpp-client._tcp pointing to jabber.seconddomain.com With this setup I did not get push working. Everytime my client was going to disconect by the ios-operating system (i realized in debug with message " info Client disconnected: closed") i tried to send a message. This led to errors like this: cloud_notify info Got error of type 'cancel' (remote-server-not-found) for identifier 'pubsub.chatsecure.org<1B92CC7E-8170-47EE-B46D-0E8B109E7A5B': error count for this identifier is now at 1

The "remote-server-not-found" made me thinking about DNS, because perhaps the pubsub.chatsecure does not try to connect to the entry in the SRV-record, but to the chatdomain, which gives not back any address-record . So I tried to change the chatdomain from "firstdomain.com" to "jabber.firstdomain.com" and I also activated a CNAME-record "jabber.firstdomain.com" pointing to my jabber-servers hostname "jabber.seconddomain.com" And now: Push seems to work...

After my client goes offline (by the way: the presence for others is also shown as offline and not as "away". Can this be changed) and somebody writes a message to this offline client, the iPhones seems to get a push, being woken up and fetching all messages....

I think I have read other bugs mentioning the "remote-server-not-found"-message and perhaps this is related and can help finding the solution...

Regards Florian

chrisballinger commented 7 years ago

Aha! That is a great insight. My personal server uses an SRV record for xmpp.example.com for my @example.com domain, and it has been working fine, but I wouldn't be surprised if there was an issue with the pubsub server DNS lookups. It uses node-xmpp under the hood, which is pretty janky.

fzahn commented 7 years ago

If there is a way how I can support you investigating the issue, please let me know...