[jitsi-dev] Connect to SRV records error


#1

Hi devs,

I have got a lot of errors when trying to connect a XMPP account using SRV records (this makes tough to see "real" errors/exceptions occurring, while debugging). Most of them occurs (i.e. log below) because XMPP tries to connect to an IPv6 address, whereas I do not have any global IPv6 address.
Indeed, there is a "logger.error" for each SRV record that failed to connect and another "logger.error" if all SRV records have failed. The attached patch propose to at least changes the first "logger.error" into a "logger.info": Is everything OK with that proposition? Or does someone is currently using this log to debug a specific problem?

Cheers,
Vincent

      [java] 08:09:36.413 SEVERE: impl.protocol.jabber.ProtocolProviderServiceJabberImpl.connectUsingSRVRecords().842 Error connecting to talk.l.google.com./2a00:1450:8005:0:0:0:0:7d:5222 for domain:sip-communicator.org serviceName:sip-communicator.org
      [java] XMPPError connecting to 2a00:1450:8005:0:0:0:0:7d:5222.: remote-server-error(502) XMPPError connecting to 2a00:1450:8005:0:0:0:0:7d:5222.
      [java] -- caused by: java.net.NoRouteToHostException: Network is unreachable
      [java] at org.jivesoftware.smack.XMPPConnection.connectUsingConfiguration(XMPPConnection.java:540)
      [java] at org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:977)
      [java] at net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberImpl.connectAndLogin(ProtocolProviderServiceJabberImpl.java:1184)
      [java] at net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberImpl.connectAndLogin(ProtocolProviderServiceJabberImpl.java:895)
      [java] at net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberImpl.connectUsingSRVRecords(ProtocolProviderServiceJabberImpl.java:836)
      [java] at net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberImpl.connectAndLogin(ProtocolProviderServiceJabberImpl.java:648)
      [java] at net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberImpl.register(ProtocolProviderServiceJabberImpl.java:453)
      [java] at net.java.sip.communicator.plugin.reconnectplugin.ReconnectPluginActivator$ReconnectTask.run(ReconnectPluginActivator.java:884)
      [java] at java.lang.Thread.run(Thread.java:679)
      [java] Nested Exception:
      [java] java.net.NoRouteToHostException: Network is unreachable
      [java] at java.net.PlainSocketImpl.socketConnect(Native Method)
      [java] at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:327)
      [java] at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:193)
      [java] at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)
      [java] at java.net.Socket.connect(Socket.java:546)
      [java] at java.net.Socket.connect(Socket.java:495)
      [java] at org.jivesoftware.smack.proxy.DirectSocketFactory.createSocket(DirectSocketFactory.java:28)
      [java] at org.jivesoftware.smack.XMPPConnection.connectUsingConfiguration(XMPPConnection.java:528)
      [java] at org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:977)
      [java] at net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberImpl.connectAndLogin(ProtocolProviderServiceJabberImpl.java:1184)
      [java] at net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberImpl.connectAndLogin(ProtocolProviderServiceJabberImpl.java:895)
      [java] at net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberImpl.connectUsingSRVRecords(ProtocolProviderServiceJabberImpl.java:836)
      [java] at net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberImpl.connectAndLogin(ProtocolProviderServiceJabberImpl.java:648)
      [java] at net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberImpl.register(ProtocolProviderServiceJabberImpl.java:453)
      [java] at net.java.sip.communicator.plugin.reconnectplugin.ReconnectPluginActivator$ReconnectTask.run(ReconnectPluginActivator.java:884)
      [java] at java.lang.Thread.run(Thread.java:679)

connectUsingSRVRecords_log.patch (752 Bytes)

···

--
Vincent Lucas, Ph.D. Jitsi developer
chenzo@jitsi.org http://jitsi.org


#2

Yup, I think we can keep the message as info, and print the stack trace
only if we are in trace mode. Would that work?

Emil

···

On 12.07.12 08:35, Vincent Lucas wrote:

Hi devs,

I have got a lot of errors when trying to connect a XMPP account using
SRV records (this makes tough to see "real" errors/exceptions occurring,
while debugging). Most of them occurs (i.e. log below) because XMPP
tries to connect to an IPv6 address, whereas I do not have any global
IPv6 address.
Indeed, there is a "logger.error" for each SRV record that failed to
connect and another "logger.error" if all SRV records have failed. The
attached patch propose to at least changes the first "logger.error" into
a "logger.info": Is everything OK with that proposition? Or does someone
is currently using this log to debug a specific problem?

Cheers,
Vincent

      [java] 08:09:36.413 SEVERE:
impl.protocol.jabber.ProtocolProviderServiceJabberImpl.connectUsingSRVRecords().842
Error connecting to talk.l.google.com./2a00:1450:8005:0:0:0:0:7d:5222
for domain:sip-communicator.org serviceName:sip-communicator.org
      [java] XMPPError connecting to 2a00:1450:8005:0:0:0:0:7d:5222.:
remote-server-error(502) XMPPError connecting to
2a00:1450:8005:0:0:0:0:7d:5222.
      [java] -- caused by: java.net.NoRouteToHostException: Network is
unreachable
      [java] at
org.jivesoftware.smack.XMPPConnection.connectUsingConfiguration(XMPPConnection.java:540)
      [java] at
org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:977)
      [java] at
net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberImpl.connectAndLogin(ProtocolProviderServiceJabberImpl.java:1184)
      [java] at
net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberImpl.connectAndLogin(ProtocolProviderServiceJabberImpl.java:895)
      [java] at
net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberImpl.connectUsingSRVRecords(ProtocolProviderServiceJabberImpl.java:836)
      [java] at
net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberImpl.connectAndLogin(ProtocolProviderServiceJabberImpl.java:648)
      [java] at
net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberImpl.register(ProtocolProviderServiceJabberImpl.java:453)
      [java] at
net.java.sip.communicator.plugin.reconnectplugin.ReconnectPluginActivator$ReconnectTask.run(ReconnectPluginActivator.java:884)
      [java] at java.lang.Thread.run(Thread.java:679)
      [java] Nested Exception:
      [java] java.net.NoRouteToHostException: Network is unreachable
      [java] at java.net.PlainSocketImpl.socketConnect(Native Method)
      [java] at
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:327)
      [java] at
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:193)
      [java] at
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)
      [java] at java.net.Socket.connect(Socket.java:546)
      [java] at java.net.Socket.connect(Socket.java:495)
      [java] at
org.jivesoftware.smack.proxy.DirectSocketFactory.createSocket(DirectSocketFactory.java:28)
      [java] at
org.jivesoftware.smack.XMPPConnection.connectUsingConfiguration(XMPPConnection.java:528)
      [java] at
org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:977)
      [java] at
net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberImpl.connectAndLogin(ProtocolProviderServiceJabberImpl.java:1184)
      [java] at
net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberImpl.connectAndLogin(ProtocolProviderServiceJabberImpl.java:895)
      [java] at
net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberImpl.connectUsingSRVRecords(ProtocolProviderServiceJabberImpl.java:836)
      [java] at
net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberImpl.connectAndLogin(ProtocolProviderServiceJabberImpl.java:648)
      [java] at
net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberImpl.register(ProtocolProviderServiceJabberImpl.java:453)
      [java] at
net.java.sip.communicator.plugin.reconnectplugin.ReconnectPluginActivator$ReconnectTask.run(ReconnectPluginActivator.java:884)
      [java] at java.lang.Thread.run(Thread.java:679)

--
Emil Ivov, Ph.D. 67000 Strasbourg,
Project Lead France
Jitsi
emcho@jitsi.org PHONE: +33.1.77.62.43.30
http://jitsi.org FAX: +33.1.77.62.47.31