Ok, after reading

       I'm getting an error connecting Saros with my Google Talk /
       GMail or another account?

You can use your registered Google Talk account, but in the case of an error try this:

 * Leave the server and password field blank.

(password = port ?!)

This is my last attempt to explain how connecting to an XMPP Server works.

1. An XMPP Service is hosted on a server at a specific port. The domain name of your JID is somewhat "pointless" at this moment.

2. TLS http://xmpp.org/rfcs/rfc3920.html#tls and SASL http://xmpp.org/rfcs/rfc3920.html#sasl have "no" impact on the IP address and port of the XMPP server you are connected to.

So here is what is going on.

If you leave the server and port field blank we do not know where we should connect to.

So SMACK is doing a DNS Lookup by using the domain part of the JID (unluckily it uses SUN / ORACLE internal JAVA APIs which might not be available on older MAC JVM distributions)

So here is what is happening ... the domain is: saros-con.imp.fu-berlin.de but our ejabberd runs on saros-build.imp.fu-berlin.de

Performing a lookup results in:

nslookup -querytype=srv _xmpp-client._tcp.saros-con.imp.fu-berlin.de
Server:  easy.box
Address:  192.168.2.1

Non-authoritative answer:
_xmpp-client._tcp.saros-con.imp.fu-berlin.de    SRV service location:
          priority       = 5
          weight         = 0
          port           = 5222
          svr hostname   = saros-con.imp.fu-berlin.de

So what is wrong here: we have not configured any SRV ... instead we added an DNS entry with the same IP as saros-build.imp.fu-berlin.de

nslookup saros-build.imp.fu-berlin.de
Server:  easy.box
Address:  192.168.2.1

Name:    saros-build.imp.fu-berlin.de
Address:  160.45.111.17


nslookup saros-con.imp.fu-berlin.de
Server:  easy.box
Address:  192.168.2.1

Non-authoritative answer:
Name:    saros-build.imp.fu-berlin.de
Address:  160.45.111.17
Aliases:  saros-con.imp.fu-berlin.de

------------------------------------------------------------------------------------


Doing the same with Google:

nslookup -querytype=srv _xmpp-client._tcp.googlemail.com
Server:  easy.box
Address:  192.168.2.1

Non-authoritative answer:
_xmpp-client._tcp.googlemail.com        SRV service location:
          priority       = 20
          weight         = 0
          port           = 5222
          svr hostname   = alt3.xmpp.l.google.com
_xmpp-client._tcp.googlemail.com        SRV service location:
          priority       = 20
          weight         = 0
          port           = 5222
          svr hostname   = alt4.xmpp.l.google.com
_xmpp-client._tcp.googlemail.com        SRV service location:
          priority       = 5
          weight         = 0
          port           = 5222
          svr hostname   = xmpp.l.google.com
_xmpp-client._tcp.googlemail.com        SRV service location:
          priority       = 20
          weight         = 0
          port           = 5222
          svr hostname   = alt1.xmpp.l.google.com
_xmpp-client._tcp.googlemail.com        SRV service location:
          priority       = 20
          weight         = 0
          port           = 5222
          svr hostname   = alt2.xmpp.l.google.com


Where xmpp.l.google.com = talk.google.com = talk.l.google.com

Clearly states that the XMPP service is NOT hosted on googlemail.com or gmail.com !

To simplify things ... if you are looking at the log files and you found a : connection refused (somewhat similar exception) then

1. the DNS lookup failed OR
2. the server + port configuration is incorrect.

All other failures occur due

1a. Bugish Smack API (there are several bugs reports for SASL auth)
2a. Using TLS but connecting to the wrong port (it happens that a XMPP server may has two ports, one for non TLS connections, one for TLS connections)

Regardless of those failures in 1a and 2a, you will NOT get a connection refused exception and so indicating that you are at least connected to the XMPP server !

Conclusion: Always leave the server and port field blank ! Unless your IT department has not set up an SRV (or you are using a JVM distribution that does not contain the com.sun.jndi.dns.DnsContextFactory class and its dependicies). There is a good reason why those fields (including SASL and TLS) are only available under the advanced options. It assumes that the user knows what he/she is doing when changing those values.

BR,
Stefan



------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
DPP-Devel mailing list
DPP-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dpp-devel

Reply via email to