Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
mayprog #1
Member since Mar 2006 · 61 posts
Group memberships: Members
Show profile · Link to this post
Subject: SRV Records problem
Hallo Alex,
currently i am trying to make my app work by using SRV records.
I have the following problem:
My jid is: mayprog@messaging.domain.gr
In the domain.gr server we have enabled SRV records so by enabling the Autoresolve into your library it would normally direct me to the right port and address for xmpp.
The problem is that server messaging.domain.gr is not rooted so, the srv lookup does not give me any info.
Is there a way to search the rooted server?

Also, another problem is that when i try to connect to the mayprog@domain.gr althought your library finds the server successfully, i cannot log in because agXmpp uses the jid i have specified and does not compose a new Jid from the user specified and the server that was found.
I am not sure if that is the way it should have been implemented, but i have tried these cases with Spark and in both cases it connects ok with the server.
Is there something i should implement?

Lastly, i cheched your code at the SRV records and found out that you only use the first Record returned from the lookup.
(Google for example returns 5 Records im.google.com,im1.google.com etc).
Shouldn't it be right to try to connect to the next record if the first connection cannot be completed?

Thank you very much!
Avatar
Alex #2
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by mayprog:
I have the following problem:
My jid is: mayprog@messaging.domain.gr
In the domain.gr server we have enabled SRV records so by enabling the Autoresolve into your library it would normally direct me to the right port and address for xmpp.
The problem is that server messaging.domain.gr is not rooted so, the srv lookup does not give me any info.
Is there a way to search the rooted server?

Also, another problem is that when i try to connect to the mayprog@domain.gr althought your library finds the server successfully, i cannot log in because agXmpp uses the jid i have specified and does not compose a new Jid from the user specified and the server that was found.
I am not sure if that is the way it should have been implemented, but i have tried these cases with Spark and in both cases it connects ok with the server.
Is there something i should implement?
are you sure that you did setup your SRV records correct. Are you sure Spark is doing a SRV lookup at all? I don't understand what you mean with rooted. We always query the DNS server for a SRV record for _xmpp-client._tcp.messaging.domain.gr, we can't do a lookup for _xmpp-client._tcp.domain.gr if you mean that with rooted.

Quote by mayprog:
Lastly, i cheched your code at the SRV records and found out that you only use the first Record returned from the lookup.
(Google for example returns 5 Records im.google.com,im1.google.com etc).
Shouldn't it be right to try to connect to the next record if the first connection cannot be completed?

yes it takes only the 1st record. Finishing that and stringprep is still on the TODO list, and the last 2 features to be 100% XMPP compliant. We don't loop thru all servers yet, we want to see which works best after we finished the file transfer stuff which is doing exactly the same with the different streamhosts. I think doing this synchonous is much easier, but the current socket code is complete async. Another propblem could be socket timeouts. If you have 10 servers and 5 don't accept your connection for some reason and you have a connect timeout of 30 seconds then it will take 2,5 minutes to establish the connection.

Alex
Avatar
mayprog #3
Member since Mar 2006 · 61 posts
Group memberships: Members
Show profile · Link to this post
are you sure that you did setup your SRV records correct. Are you sure Spark is doing a SRV lookup at all? I don't understand what you mean with rooted. We always query the DNS server for a SRV record for _xmpp-client._tcp.messaging.domain.gr, we can't do a lookup for _xmpp-client._tcp.domain.gr if you mean that with rooted
Well i suppose we did it right, althought i haven't contrributed to this (there is another team handling the network issues).
Spark does work and it has to do an SRV lookup beacuse the server that actually handles the Xmpp messaging is different than the server we dictate with the Jid.
About rooted, i ment that the mesaging.domain.gr is a virtual server, where there isn't an SRV implementation. The real server is domain.gr where the SRV lookups can query. I can imagine that this situation could not be handled from agXmpp.
I suppose, in order to find the right server i should begin with messaging.domain.gr, and if there are no results there then i should try the domain.gr.
But in order to down-walk the jids' server, it is difficult to use it inside the agXmpp sdk as i should try to reconnect from the start for each try.

yes it takes only the 1st record. Finishing that and stringprep is still on the TODO list, and the last 2 features to be 100% XMPP compliant. We don't loop thru all servers yet, we want to see which works best after we finished the file transfer stuff which is doing exactly the same with the different streamhosts. I think doing this synchonous is much easier, but the current socket code is complete async. Another propblem could be socket timeouts. If you have 10 servers and 5 don't accept your connection for some reason and you have a connect timeout of 30 seconds then it will take 2,5 minutes to establish the connection.
Well, i can imagine this coould be implemented in the future. I think the async solution is the best approach. Just like you inform the user about ConnectionState during the conenction setup, you could also inform him about AuthenticationState, having an option to cancel the authentication process. In any case i don't think this is critical right now.

Thank you very much.
This post was edited on 2006-06-28, 19:46 by mayprog.
Avatar
Alex #4
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
hi mayprog,

i think you got me wrong. There must exist a SRV record which has the format:
_xmpp-client._tcp. + yourXMPPDomain

agsXMPP locates the DNS server of your machine and is doing a auery for this domain. Thats all. There is no need for a root domain because we need exactly the record for _xmpp-client._tcp.yourXMPPDomain.com.
Could you post the real domain of your server, so we can check the SRV records?

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS