Unable to connect to a prosody based server. (#528)
Closed
Unknown opened 3 years ago

Describe the bug When the user tries to connect to our server from siskin they get error saying "It was not possible to contact XMPP server and sign in." While the user can connect to the server using monal app. The server is hosted at emblik.studio. Earlier they used to login without any issue. There is no configuration change on the server side.

Expected behavior User should be able to login like they used to before.

Screenshots error

Details (please complete the following information):

  • Siskin Version: latest
  • iOS version 15.2
Unknown commented 3 years ago

This server reports an invalid SSL certificate (one of the certificates in the chain sent by the server is expired). If I'm correct, the expired certificate is Digital Signature Trust Co., CN = DST Root CA X3 which LetsEncrypt was using for cross signing certificates and it should be removed from the certificate chain sent by the server.

Solution: fix the SSL certificates on this server.

Unknown commented 3 years ago

Can I request to make the error report be more descriptive of the problem?

Unknown commented 3 years ago

The error is to the end user and not for debugging of the server issues. It needs to be simple end explain the situation. In this case it is not possible to establish connection to the XMPP server and this is what the error message states.

Unknown commented 3 years ago

@hantu85 but the chain also holds a valid intermediate like "ISRG"? If yes...then your ssl lib should use that instead, no matter if DST is expired.

This is a known issue around the ecosystem (better said for Let's Encrypt users), since Sep 30.

Unknown commented 3 years ago

@hantu85 is there any comment from you on the observation of @licaon-kter . I renewed the certs and it has ISRG intermediate. I see not problem in other clients, gajim, conversation, monal all work.

Also regarding the error message, it would help both users and the sysadmins if the error is a bit more descriptive. It need not be complex. Just adding two words like "bad certificates" can help. Often times syadmins and people rely on error message passed on by users. A generic message saying "app can't sign in" is not helpful.

Unknown commented 3 years ago

@raghu-kamath Actually, in the end, after debugging the app against the XMPP server used by you, I've found the cause of the issue to be DNS misconfiguration. (SSL certificates had nothing to do with it).

This server domain name has SRV records for _xmpps-client._tcp.:

_xmpps-client._tcp.emblik.studio has SRV record 0 5 5223 emblik.studio.

but there is no server listening on port 5223.

In a typical use-case, Siskin IM will fall back to using port 5222, however, during account adding or account registration we are not sure that the server actually is there, so it fails fast - after initial try in your case points to port 5223 (due to your DNS configuration) which is not accessible for SiskinIM.

The solution here is simple - fix your DNS entries.

Unknown commented 3 years ago

There is a server listening on 5222, so shouldn't it fallback to it?

Unknown commented 3 years ago

It would but not when the account is added or registered.

Unknown commented 3 years ago

Account is already created, the user is just trying to login to existing account.

Unknown commented 3 years ago

So he is adding it, and in this case, Siskin will not fall back.

The root cause here is DNS misconfiguration.

Unknown commented 3 years ago

So should I remove the configuration? It doesn't have any issue with other clients

Unknown commented 3 years ago

Advertisement of XMPPS for your server which is not offering it is incorrect. It should be removed!

Unknown commented 3 years ago

Removing it solved the issue.

But I think the error message should give more hints, since initially we thought this is a cert error. With correct message it will help sysadmins to know what is breaking

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