XMPP Service Operators - 2017-02-20


  1. ThibG

    hm, it seems the failure from the other day is related to my _xmpp-server._tcp SRV entry, which points to a different sub-domain

  2. ThibG

    but this is the point of a SRV entry, and I fail to see how it could be a problem

  3. stpeter

    hm

  4. stpeter

    your SRV entry seems fine

  5. ThibG

    I changed it

  6. stpeter

    aha

  7. ThibG

    I'll change it back

  8. stpeter

    $ dig +short -t SRV _xmpp-server._tcp.sitedethib.com 10 0 5269 sitedethib.com.

  9. ThibG

    I'm testing things

  10. stpeter

    that's what I see

  11. stpeter

    yeah

  12. ThibG

    it was pointing to warp.sitedethib.com.

  13. ThibG

    which is the same machine

  14. stpeter nods

  15. stpeter

    compare to the jabber.org SRV: $ dig +short -t SRV _xmpp-server._tcp.jabber.org 31 30 5269 hermes2v6.jabber.org. 30 30 5269 hermes2.jabber.org.

  16. ThibG

    my guess so far is that xmpp.net uses warp.sitedethib.com to check the certificate

  17. ThibG

    which is obviously wrong

  18. stpeter

    bbiaf, time for lunch here

  19. Zash

    ThibG: The SRV target is not used for certificate validation.

  20. ThibG

    I have no idea what the issue is, then

  21. ThibG

    sitedethib.com and warp.sitedethib.com happen to have the same A RRs

  22. Zash

    Except

  23. Zash

    https://q.zash.se/269bfe745c2f.txt there's no response

  24. ThibG

    wait. what

  25. ThibG

    it resolves just fine here

  26. ThibG

    oh sorry

  27. ThibG

    I made a mistake when changing back the RRs

  28. ThibG

    should be better now

  29. Zash

    If the bare domain and the default port works then you don't strictly need SRV records at all

  30. ThibG

    sure

  31. ThibG

    it was just in case I switch to having different machines for my services

  32. ThibG

    (which was actually the case some time ago)

  33. ThibG

    I could get rid of the SRV RRs, but still, I don't understand what's going on

  34. stpeter

    ThibG: I notice when typing `telnet warp.sitedethib.com 5269` that IPv6 was attempted first, but timed out. However, I'm pretty sure that the xmpp.net code has a fallback to IPv4 if IPv6 times out.

  35. ThibG

    hm

  36. ThibG

    unfortunately, I only have my server with IPv6 connectivity, and it obviously connects just fine to itself

  37. ThibG

    sitedethib.com has the same IPv6 address too

  38. ThibG

    anyway, I guess it doesn't fail at TCP level, but at TLS level, as it successfuly displays my server's version

  39. Link Mauve

    stpeter, from here it works.

  40. Link Mauve

    Maybe some pairing issue?

  41. Link Mauve

    From both my home server (in Paris) and my company’s servers (in the UK).

  42. stpeter

    Yeah it could be an ISP issue for me.

  43. ThibG

    huh, should have changed the RRs' TTL beforehand…

  44. stpeter

    Let me check from the machine where xmpp.net is running. ;-)

  45. ThibG

    stpeter, thanks!

  46. stpeter

    connected to IPv6 very quickly

  47. stpeter

    both with and without `warp.`

  48. stpeter

    so that's not the issue

  49. ThibG

    my only bet is that it somehow checks the certificate against warp.sitedethib.com instead of sitedethib.com

  50. stpeter

    No, the XMPP specs have always been clear on the fact that you don't check against the SRV pointer.

  51. ThibG

    yeah, that's what I understand too, but I have no idea why xmpp.net kept failing with my SRV pointing to warp.sitedethib.com, and works now that it is pointing to sitedethib.com

  52. stpeter

    In fact, Thijs and I (proprietors of xmpp.net) co-wrote the RFC on TLS checking in XMPP. ;-) https://datatracker.ietf.org/doc/rfc7590/

  53. ThibG

    (should be pointing back to warp.sitedethib.com, now, but alas the TTL is huge)

  54. stpeter

    let me see if I can find any logs on the machine that will provide some more information

  55. Zash

    ThibG: I believe it fetches the server version through jabber.org, not by itself.

  56. Zash

    So, it being able to display that has no relation to its ability to connect to your server

  57. stpeter

    Zash: really? that doesn't sound familiar

  58. ThibG

    Zash, oh, ok, I think I did see an incoming s2s connection from jabber.org at that time

  59. Zash

    stpeter: My memory says that it at least does a ping via a jabber.org account first

  60. stpeter

    Zash: OK I will check the code for that, too

  61. stpeter

    huh yeah imobservatory@jabber.org

  62. stpeter

    I'd forgotten about that, I guess.

  63. stpeter

    so now I log into the jabber.org machine and see what the logs there have to say in the matter :-)

  64. ThibG

    thanks!

  65. stpeter

    I see things like this: TLS conn IP=2001:910:1369:ffff::1 version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 secret-bits=256 processed-bits=256 compression="(None)" preliminary certificate verification failed

  66. stpeter

    the last one of those was 40 minutes ago

  67. ThibG

    hm, last failed xmpp.net test should be much older

  68. ThibG

    I can retry a test, but I guess my working SRV RRs will still be in cache

  69. ThibG

    nope, it's ok, the test is running against warp.sitedethib.com now

  70. stpeter

    ThibG: this was on jabber.org, not xmpp.net

  71. Zash

    stpeter: I don't see any explicit IPv6 support, so what exactly it connects with depends on the LuaSocket version.

  72. stpeter

    Zash: aha, interesting

  73. ThibG

    https://xmpp.net/result.php?domain=sitedethib.com&type=server fails again

  74. stpeter

    sigh

  75. Zash

    This thing where network libraries never do nice things like handle dualstack for you, such disappoint.

  76. ThibG

    well

  77. ThibG

    https://xmpp.net/result.php?domain=jabber.org&type=server

  78. stpeter

    https://xmpp.net/result.php?domain=sitedethib.com&type=client is fine, though (other than that whole certificate thing).

  79. ThibG

    still uses the old SRV

  80. ThibG

    (sitedethib.com instead of warp.sitedethib.com)

  81. ThibG

    re-running it, it fails the same way

  82. stpeter

    TTLs?

  83. stpeter

    ah

  84. stpeter

    right

  85. stpeter

    ok

  86. stpeter

    both perseus (xmpp.net machine) and hermes2 (jabber.org machine) show warp in the SRV results

  87. ThibG

    I guess I could regenerate a certificate with an additionnal warp.sitedethib.com subjectAltName to test my theory…

  88. Zash

    ThibG: How is the certificate going to affect it not being able to connect *at all*, or what problem is it you are trying to debug?

  89. ThibG

    Zash, I have no idea what the problem is

  90. Zash

    Then how do you even know that there is a problem?

  91. ThibG

    it should be able to connect regardless of whether the SRV is warp.sitedethib.com or sitedethib.com

  92. ThibG

    when the SRV points to warp, it fails to connect, when it points to sitedethib.com, it doens't

  93. ThibG

    but those have the same A/AAAA

  94. Zash

    Based on " Error: Connection failed. " happening with the IPv6 only jabber.org SRV target, and my knowledge that the XMPP library it uses does not support IPv6, I'm going to theorize that the problem is missing IPv6 support.

  95. ThibG

    still, both warp.sitedethib.com and sitedethib.com have the same AAAA RR

  96. stpeter nods to Zash

  97. stpeter

    I need to go heads-down on a task, bbiab.

  98. ThibG

    let me try something else

  99. Zash

    I'm guessing it ends up relying on the OS-es DNS lookup, which I've noticed sometimes returns an error code that becomes a fatal error

  100. ThibG

    ok

  101. ThibG

    I'll add yet another sub-domain with only A RRs and make the SRV point to it, then

  102. ThibG

    ah, I did not see the jabber.org test eventually succeeding

  103. stpeter

    ThibG: yeah the tests can take quite a while - there is a lot to check and the script needs to back off sometimes so that it doesn't get disconnected for too many attempts (etc.)

  104. stpeter

    anyway bbiab :-)

  105. ThibG

    see you, and thanks for your help _o/

  106. ThibG

    I wonder if I should split the SRVs into two sub-domains, one with only A RRs, then

  107. Zash

    Shouldn't be required

  108. ThibG

    or just accept that xmpp.net may not be able to connect to my server :/

  109. Zash

    W: connect() to warp2.sitedethib.com.:5222 failed: Operation already in progress

  110. Zash

    That error

  111. ThibG

    It's the subdomain I just added to try with only A RRs

  112. Zash

    I mean, that's likely the real error it gets when it says "Error: Connection failed"

  113. Zash

    I don't really know why, but it seems to happen sometimes when there's more than one IP address associated with a name.

  114. ThibG

    hm… I've tried a bunch of times, though, and it *always* failed

  115. ThibG

    oh ok

  116. Zash

    EALREADY The socket is nonblocking and a previous connection attempt has not yet been completed.

  117. ThibG

    luasocket bug?

  118. Zash

    I don't know.

  119. ThibG

    ok, well, thanks anyway

  120. ThibG

    at least I now know it's TCP-IP related and not cert-related as I initially thought

  121. Zash

    Low-level socket fiddlery isn't my area of expertise.

  122. Zash

    https://github.com/diegonehab/luasocket/issues/99

  123. ThibG

    ok, that's it, thanks!

  124. ThibG

    I'll just drop the DNS round-robin thing, it's a hack with little value