Client cannot login to the iosdemo account. (#150)
Closed
Artur Hefczyc opened 5 years ago

Apple did not accept the application because they could not connect to the test account.

I tested it myself and I cannot login to the iosdemo account either. Client does not display any kind of an error. Just tries to connect, than marks that account as inactive.

No error message or any other information what may be wrong. Although, Apple provided screenshot.

Interesting is that I have a few accounts on this server in tigase.im and jabber.today domain and the client connects to some accounts but cannot connect to other accounts.

Psi connects to the iosdemo account with no problems.

Andrzej Wójcik (Tigase) commented 5 years ago

It looks like it could be see-other-host issue as our client is using it and Psi does not.

@wojtek could you check that all Ec2 instances are working fine? Were the old one stopped after upgrade? Maybe some of them are having issues and stopping them could fix this issue?

wojciech.kapcia@tigase.net commented 5 years ago

@andrzej.wojcik I checked and all instances are up-and-running and accepting connections, there are no old instances up (but even if they were, see-other-host would redirect them to the old instances which would handle the traffic).

Psi connects to that account on all 3 machines.

wojciech.kapcia@tigase.net commented 5 years ago

I tried in Beagle and XML console indeed shows information about see-other-host:

<!--   2019-08-16T16:04:13Z   >>>>   -->
<stream:stream to='tigase.im' from='iosdemo@tigase.im' version='1.0' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

<!--   2019-08-16T16:04:15Z   <<<<   -->
<stream:streamstream='http://etherx.jabber.org/streams' ='jabber:client' id='tigase-error-tigase' version='1.0' xml:lang='en' from='tigase.im'>

<!--   2019-08-16T16:04:15Z   <<<<   -->
<error xmlns='http://etherx.jabber.org/streams'>
<see-other-host xmlns='urn:ietf:params:xml:ns:xmpp-streams'>ec2-54-187-88-45.us-west-2.compute.amazonaws.com</see-other-host>
</error>

<!--   2019-08-16T16:04:20Z   >>>>   -->
<stream:stream to='tigase.im' from='iosdemo@tigase.im' version='1.0' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

<!--   2019-08-16T16:04:21Z   <<<<   -->
<stream:streamversion='1.0' from='tigase.im' id='tigase-error-tigase' xml:lang='en' stream='http://etherx.jabber.org/streams' ='jabber:client'>

<!--   2019-08-16T16:04:21Z   <<<<   -->
<error xmlns='http://etherx.jabber.org/streams'>
<see-other-host xmlns='urn:ietf:params:xml:ns:xmpp-streams'>ec2-54-187-88-45.us-west-2.compute.amazonaws.com</see-other-host>
</error>

Which is one of the nodes:

i-06bca3442dee511d6 xmpp.cloud                            running   ec2-34-219-112-31.us-west-2.compute.amazonaws.com
i-0a3eefb2a4b6135b3 xmpp.cloud                            running   ec2-54-187-88-45.us-west-2.compute.amazonaws.com
i-0fd3538e5c6585f73 xmpp.cloud                            running   ec2-54-245-26-213.us-west-2.compute.amazonaws.com

And Psi+ can connect to it without a problem. It does seem to be a problem with handling see-other-host in client (it seems to be stuck on resolved hostname instead of using one returned from see-other-host). Unfortunately neither Beagle nor Siskin allows for explicitly specifying hostname to which to connect (or I couldn't find).

Andrzej Wójcik (Tigase) commented 5 years ago

@wojtek Both clients (Siskin & Beagle) are using same DNS discovery implementation and same see-other-host handling logic. However, Siskin is able to cache DNS entries in the device for faster reconnect. If that’s the case, then subsequent reconnection or enabling/disabling device should clean up this cache.

Moreover, this logic was not changed in this version, so why it started to happen now and only with Siskin?

wojciech.kapcia@tigase.net commented 5 years ago

@andrzej.wojcik I have no access to current Siskin so I have no way of verifying cache theory. I tried "turning it off and on again" in beagle without success. I tried with Beagle ran in console but there was no debug printed in the output (somehow related to providing binary without debug info maybe?)

I can run more tests if you want (i even got Xcode yesterday for unrelated issues) given that you are AFK for the next 2 weeks.

(btw. @kobit youtrack has some weird handling of dates - I see " commented 16 Aug 2019 13:23" but... it's 12:39 for me)

Andrzej Wójcik (Tigase) commented 5 years ago

@wojtek One more thing to check if I could ask you. If you recall during the upgrade there was an issue with 5223 port being in use during startup of Tigase and then after next startup it was ok. In sure.im DNS entries there are entries for XMPPS which would be tried if available before regular XMPP entries. Those xmpps entries are for port 5223, so please check if you can connect using those ports - it is direct TLS port.

Artur Hefczyc commented 5 years ago

I do not think it has anything to do with cache on the client. The problem was first reported by Apple testing our app before releasing them. So for sure they had fresh installation with no cache. They even shared a screenshot showing an error on our client. But the error says only: Error - It was not possible to contact XMPP server and sign in.

I was not able to get this error information myself. Maybe it shows only when you add a new account information.

Artur Hefczyc commented 5 years ago

@andrzej.wojcik you are on your holiday right now, then stop working, stop worrying about this. This can wait until you are back and can focus on solving the problem.

Andrzej Wójcik (Tigase) commented 5 years ago

I know i am on holiday, but I am still getting email notifications so I am trying to propose fixes if I can find one on the go.

Please check if connections over port 5223 are working correctly on sure.im installation.

wojciech.kapcia@tigase.net commented 5 years ago

@andrzej.wojcik this particular instance was not listening on 5223:

2019-08-12 18:04:31.259 [ConnectionOpenThread]  ConnectionOpenThread.addAllWaiting()  WARNING: Error: creating connection for: {remote-host=localhost, port-no=5223, new-connections-throttling=50, ifc=[Ljava.lang.String;@3d94b2b7, socket=ssl, type=accept}
java.net.BindException: Address already in use
        at java.base/sun.nio.ch.Net.$$YJP$$bind0(Native Method)
        at java.base/sun.nio.ch.Net.bind0(Net.java)
        at java.base/sun.nio.ch.Net.bind(Net.java:461)
        at java.base/sun.nio.ch.Net.bind(Net.java:453)
        at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:227)
        at java.base/sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:80)
        at tigase.net.ConnectionOpenThread.addISA(ConnectionOpenThread.java:274)
        at tigase.net.ConnectionOpenThread.addPort(ConnectionOpenThread.java:307)
        at tigase.net.ConnectionOpenThread.addAllWaiting(ConnectionOpenThread.java:238)
        at tigase.net.ConnectionOpenThread.run(ConnectionOpenThread.java:207)
        at java.base/java.lang.Thread.run(Thread.java:834)

I restarted the instance and it connects now. @kobit - should I resubmit the app somehow? or you will test the latest siskin beta (I can't do that due to old iOS version) and then resubmit it yourself?

Artur Hefczyc commented 5 years ago

I will resubmit, thank you for fixing this.

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