Siskin.IM on IOS unable to connect to my ejabberd server. (#440)
Closed
Unknown opened 4 years ago

Describe the bug When choosing to Sign in to an existing XMPP accountand after entering credentials (user@xmppserver.tld + password) and trying to save, Siskin shows the error message Error. It was not possible to contact XMPP server and sign in.

To Reproduce Steps to reproduce the behavior:

  1. Install app and open.
  2. Click on Sign in to an existing XMPP account
  3. Enter credentials in format user@xmppserver.tld as well as the password
  4. Click Save
  5. See error It was not possible to contact XMPP server and sign in

Expected behavior Siskin connects to the XMPP server and the account is added to the app.

Screenshots /

Details (please complete the following information):

  • Siskin Version: 6.0
  • iOS 14.0.1
  • iPhone SE (2020)

Additional context I configured my ejabberd log level to debug and noticed, that not even a connection attempt is made. Curiously enough, when I change the "XMPP ID" to something like test.xmppserver.tld (notice that there is no @), Siskin tries to connect:

2020-10-09 08:57:57.501 [info] <0.487.0> (tcp|<0.487.0>) Received XML on stream = <<"<stream:stream to='test.xmppserver.tld' from='test.xmppserver.tld' version='1.0' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>">>
2020-10-09 08:57:57.501 [debug] <0.487.0>@ejabberd_hooks:safe_apply:231 Running hook c2s_filter_send: mod_client_state:filter_chat_states/1
2020-10-09 08:57:57.501 [debug] <0.487.0>@ejabberd_hooks:safe_apply:231 Running hook c2s_filter_send: mod_client_state:filter_pep/1
2020-10-09 08:57:57.501 [debug] <0.487.0>@ejabberd_hooks:safe_apply:231 Running hook c2s_filter_send: mod_client_state:filter_presence/1
2020-10-09 08:57:57.501 [debug] <0.487.0>@ejabberd_hooks:safe_apply:231 Running hook c2s_filter_send: mod_client_state:filter_other/1
2020-10-09 08:57:57.502 [info] <0.487.0> (tcp|<0.487.0>) Send XML on stream = <<"<?xml version='1.0'?><stream:stream id='17887160946609628102' version='1.0' xml:lang='en' xmlns:stream='http://etherx.jabber.org/streams' to='test.xmppserver.tld' from='test.xmppserver.tld' xmlns='jabber:client'>">>
2020-10-09 08:57:57.502 [info] <0.487.0> (tcp|<0.487.0>) Send XML on stream = <<"<stream:error><host-unknown xmlns='urn:ietf:params:xml:ns:xmpp-streams'/></stream:error>">>
2020-10-09 08:57:57.502 [debug] <0.487.0>@ejabberd_hooks:safe_apply:231 Running hook c2s_handle_send: mod_push:c2s_stanza/3
2020-10-09 08:57:57.502 [debug] <0.487.0>@ejabberd_hooks:safe_apply:231 Running hook c2s_handle_send: mod_push_keepalive:c2s_stanza/3
2020-10-09 08:57:57.502 [debug] <0.487.0>@ejabberd_hooks:safe_apply:231 Running hook c2s_handle_send: mod_stream_mgmt:c2s_handle_send/3
2020-10-09 08:57:57.502 [debug] <0.487.0>@ejabberd_hooks:safe_apply:231 Running hook c2s_closed: mod_stream_mgmt:c2s_closed/2
2020-10-09 08:57:57.502 [debug] <0.487.0>@ejabberd_hooks:safe_apply:231 Running hook c2s_closed: ejabberd_c2s:process_closed/2
2020-10-09 08:57:57.502 [debug] <0.487.0>@ejabberd_hooks:safe_apply:231 Running hook c2s_terminated: mod_stream_mgmt:c2s_terminated/2
2020-10-09 08:57:57.502 [debug] <0.487.0>@ejabberd_hooks:safe_apply:231 Running hook c2s_terminated: mod_pubsub:on_user_offline/2
2020-10-09 08:57:57.503 [debug] <0.487.0>@ejabberd_hooks:safe_apply:231 Running hook c2s_terminated: ejabberd_c2s:process_terminated/2
2020-10-09 08:57:57.503 [info] <0.487.0> (tcp|<0.487.0>) Send XML on stream = <<"</stream:stream>">>

Other clients (ChatSecure, Pidgin, Monal, ConverseJS) work without any problems.

Unknown commented 4 years ago

I've tested with our test accounts on a few servers and it worked without any issues. I cannot tell why it is not working in your case.

XMPP ID (aka JID) for user accounts always contains @, so you need to enter user@xmppserver.tld.

The error It was not possible to contact XMPP server and sign in means that either Siskin was not able to connect to the server (SSL certificate issue, TLS, issues with DNS entries) or there was an error with jid-password pair.

Could you grab a server-side logs when you attempt to connect with user@xmppserver.tld? Is there anything in those logs? (that would help us telling where the issue is).

Unknown commented 4 years ago

Domain test.xmppserver.tld is different from xmppserver.tld that is why assume that there may be a DNS issue. Were you testing this account from any other client from the same iPhone? (and connected to the same network?)

Unknown commented 4 years ago

XMPP ID (aka JID) for user accounts always contains @, so you need to enter user@xmppserver.tld.

Of course. The strange thing is that, when I enter my JID as it should be (user@server.tld), then no connection attempt is made (ejabberd logs show no activity at all). When I enter a wrong JID without the local part, in the format of test.server.tld then I see activity on my server (s. log excerpt in https://github.com/tigase/siskin-im/issues/60#issue-717907527)

Were you testing this account from any other client from the same iPhone? (and connected to the same network?)

Yes, other clients from the same phone and from the same network work without any problems.

Can I provide any further infos to you? A test-account on my server?

Unknown commented 4 years ago

I wonder what is a difference between test.xmppserver.tld and xmppserver.tld? Any different DNS settings?

If you can provide me we with a test account on your server, I would check what is going on as AFAIK everything is working fine with all of my test servers. However, we could start with a domain name of your server so I could check DNS and find out why there is no connection.

If you do not wish to publish domain name of your server (or details of a test account), please send an email to support@tigase.net

Unknown commented 4 years ago

I've sent the credentials to support@tigase.net. Thanks for your help!

Unknown commented 4 years ago

Thank you for the credentials, I've found the issue in the DNS settings. The issue is with _xmpps-client._tcp. entry for your XMPP server, it points to HTTPS port 443 and a different host. I suppose that the issue is just an incorrect port of the SRV record (most likely it should point to the same server and to port 5223?).

You should either fix this SRV entry or, for testing, just delete this entry. (_xmpps-client._tcp. and not _xmpp-client._tcp.).

SiskinIM tries to use XMPPS connection as it is faster to establish the connection than using plain connection and then using StartTLS. If it is possible to establish TCP connection but XMPP establishment fails, it assumes that there is an error with the server and is not retrying.

Unknown commented 4 years ago

Aaah, I see. I will get it sorted out!

Thanks for your help and sorry for taking up so much of your time ??

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