[jitsi-dev] DNS problem


#1

Hi Ingo, all,

I got a problem while testing Jitsi on a old MacBook 1,1 with Java 5. It seems that it cannot resolve certain name (for provisioning server, STUN server, backup DNS, ...). If I comment "System.setProperty("sun.net.spi.nameservice.provider.1", "dns,dnsjava");" line in SIPCommunicator.java, all works fine again.

Here is one of a stacktrace I got:
        [java] DNSJavaNameService: Unexpected error.
        [java] java.net.UnknownHostException: backup-resolver.jitsi.net
        [java] at org.xbill.DNS.spi.DNSJavaNameService.lookupAllHostAddr(DNSJavaNameService.java:174)
        [java] at org.xbill.DNS.spi.DNSJavaNameService.invoke(DNSJavaNameService.java:122)
        [java] at $Proxy0.lookupAllHostAddr(Unknown Source)
        [java] at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1194)
        [java] at java.net.InetAddress.getAllByName0(InetAddress.java:1144)
        [java] at java.net.InetAddress.getAllByName(InetAddress.java:1073)
        [java] at java.net.InetAddress.getAllByName(InetAddress.java:1009)
        [java] at java.net.InetAddress.getByName(InetAddress.java:959)
        [java] at net.java.sip.communicator.util.NetworkUtils.getInetAddress(NetworkUtils.java:839)
        [java] at net.java.sip.communicator.util.NetworkUtils.createLookup(NetworkUtils.java:1224)
        [java] at net.java.sip.communicator.util.NetworkUtils.getSRVRecords(NetworkUtils.java:591)
        [java] at net.java.sip.communicator.util.NetworkUtils.getSRVRecords(NetworkUtils.java:681)
        [java] at net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberImpl.connectUsingSRVRecords(ProtocolProviderServiceJabberImpl.java:673)
        [java] at net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberImpl.connectAndLogin(ProtocolProviderServiceJabberImpl.java:587)
        [java] at net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberImpl.register(ProtocolProviderServiceJabberImpl.java:416)
        [java] at net.java.sip.communicator.impl.gui.main.login.LoginManager$RegisterProvider.run(LoginManager.java:418)

Best regards,

···

--
Seb


#2

Hey Seb

That is an interesting one...
The log you see there is output that comes directly from DNSJAVA's SPI. The only reason I could come up with that it cannot resolve e.g. the backup-resolver IP is that it doesn't have a valid address of ANY resolver.

Could you do a Wireshark trace for DNS events when such exceptions are logged? The interesting part of that trace would be destination IP of the sent DNS packets. Is it the one you'd expect it to go (normally this would the one configured on the system, e.g. the router on a home network, the ISP's servers, or the one of the company network)?

I often move between two networks and I sometimes had the case that DNSJAVA was still using the DNS servers of the previous network. r9212/b3829 should have fixed that, but there might still be some circumstances left.

(Even if you comment out said line, you might still run into issues, at least on Windows: There's a bug in the JRE's DNS server retrieval code so that it lists DNS servers of disabled network interfaces. Bug ID: 7006496)

Regards,
Ingo

···

-----Original Message-----
From: Sebastien Vincent [mailto:seb@jitsi.org]
Sent: Freitag, 9. Dezember 2011 15:42
To: Bauersachs Ingo
Cc: dev@jitsi.java.net
Subject: DNS problem
Hi Ingo, all,

I got a problem while testing Jitsi on a old MacBook 1,1 with Java 5. It
seems that it cannot resolve certain name (for provisioning server, STUN
server, backup DNS, ...). If I comment
"System.setProperty("sun.net.spi.nameservice.provider.1",
"dns,dnsjava");" line in SIPCommunicator.java, all works fine again.

Here is one of a stacktrace I got:
        [java] DNSJavaNameService: Unexpected error.
        [java] java.net.UnknownHostException: backup-resolver.jitsi.net
        [java] at
org.xbill.DNS.spi.DNSJavaNameService.lookupAllHostAddr(DNSJavaNameService.jav
a:174)
        [java] at
        org.xbill.DNS.spi.DNSJavaNameService.invoke(DNSJavaNameService.ja
        va:122) [java] at $Proxy0.lookupAllHostAddr(Unknown Source)
        [java] at
        java.net.InetAddress.getAddressFromNameService(InetAddress.java:1
        194) [java] at
        java.net.InetAddress.getAllByName0(InetAddress.java:1144) [java]
          at java.net.InetAddress.getAllByName(InetAddress.java:1073)
        [java] at
        java.net.InetAddress.getAllByName(InetAddress.java:1009) [java]
         at java.net.InetAddress.getByName(InetAddress.java:959) [java]
         at
net.java.sip.communicator.util.NetworkUtils.getInetAddress(NetworkUtils.java:
839)
        [java] at
net.java.sip.communicator.util.NetworkUtils.createLookup(NetworkUtils.java:12
24)
        [java] at
net.java.sip.communicator.util.NetworkUtils.getSRVRecords(NetworkUtils.java:5
91)
        [java] at
net.java.sip.communicator.util.NetworkUtils.getSRVRecords(NetworkUtils.java:6
81)
        [java] at
net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberI
mpl.connectUsingSRVRecords(ProtocolProviderServiceJabberImpl.java:673)
        [java] at
net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberI
mpl.connectAndLogin(ProtocolProviderServiceJabberImpl.java:587)
        [java] at
net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberI
mpl.register(ProtocolProviderServiceJabberImpl.java:416)
        [java] at
net.java.sip.communicator.impl.gui.main.login.LoginManager$RegisterProvid
er.r un(LoginManager.java:418)

Best regards,


#3

Hi Ingo,

Thanks you for this clarification.

I will try to do wireshark traces shortly. Note that the old MacBook is in LAN and never move between networks.

In fact it is only with the old MacBook with JRE 5 that show up the problem, my other recent MacBook and my Linux laptop works fine with Java 6. Could it be related to Java 5 ?

Regards,

···

--
Seb

Le 09/12/11 16:18, Bauersachs Ingo a �crit :

Hey Seb

That is an interesting one...
The log you see there is output that comes directly from DNSJAVA's SPI. The only reason I could come up with that it cannot resolve e.g. the backup-resolver IP is that it doesn't have a valid address of ANY resolver.

Could you do a Wireshark trace for DNS events when such exceptions are logged? The interesting part of that trace would be destination IP of the sent DNS packets. Is it the one you'd expect it to go (normally this would the one configured on the system, e.g. the router on a home network, the ISP's servers, or the one of the company network)?

I often move between two networks and I sometimes had the case that DNSJAVA was still using the DNS servers of the previous network. r9212/b3829 should have fixed that, but there might still be some circumstances left.

(Even if you comment out said line, you might still run into issues, at least on Windows: There's a bug in the JRE's DNS server retrieval code so that it lists DNS servers of disabled network interfaces. Bug ID: 7006496)

Regards,
Ingo

-----Original Message-----
From: Sebastien Vincent [mailto:seb@jitsi.org]
Sent: Freitag, 9. Dezember 2011 15:42
To: Bauersachs Ingo
Cc: dev@jitsi.java.net
Subject: DNS problem
Hi Ingo, all,

I got a problem while testing Jitsi on a old MacBook 1,1 with Java 5. It
seems that it cannot resolve certain name (for provisioning server, STUN
server, backup DNS, ...). If I comment
"System.setProperty("sun.net.spi.nameservice.provider.1",
"dns,dnsjava");" line in SIPCommunicator.java, all works fine again.

Here is one of a stacktrace I got:
         [java] DNSJavaNameService: Unexpected error.
         [java] java.net.UnknownHostException: backup-resolver.jitsi.net
         [java] at
org.xbill.DNS.spi.DNSJavaNameService.lookupAllHostAddr(DNSJavaNameService.jav
a:174)
         [java] at
         org.xbill.DNS.spi.DNSJavaNameService.invoke(DNSJavaNameService.ja
         va:122) [java] at $Proxy0.lookupAllHostAddr(Unknown Source)
         [java] at
         java.net.InetAddress.getAddressFromNameService(InetAddress.java:1
         194) [java] at
         java.net.InetAddress.getAllByName0(InetAddress.java:1144) [java]
           at java.net.InetAddress.getAllByName(InetAddress.java:1073)
         [java] at
         java.net.InetAddress.getAllByName(InetAddress.java:1009) [java]
          at java.net.InetAddress.getByName(InetAddress.java:959) [java]
          at
net.java.sip.communicator.util.NetworkUtils.getInetAddress(NetworkUtils.java:
839)
         [java] at
net.java.sip.communicator.util.NetworkUtils.createLookup(NetworkUtils.java:12
24)
         [java] at
net.java.sip.communicator.util.NetworkUtils.getSRVRecords(NetworkUtils.java:5
91)
         [java] at
net.java.sip.communicator.util.NetworkUtils.getSRVRecords(NetworkUtils.java:6
81)
         [java] at
net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberI
mpl.connectUsingSRVRecords(ProtocolProviderServiceJabberImpl.java:673)
         [java] at
net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberI
mpl.connectAndLogin(ProtocolProviderServiceJabberImpl.java:587)
         [java] at
net.java.sip.communicator.impl.protocol.jabber.ProtocolProviderServiceJabberI
mpl.register(ProtocolProviderServiceJabberImpl.java:416)
         [java] at
net.java.sip.communicator.impl.gui.main.login.LoginManager$RegisterProvid
er.r un(LoginManager.java:418)

Best regards,


#4

Hey

Well it's certainly possible that there is a Java 1.5 issue in DNSJAVA, but then I'd have expected to see such errors also outside of the SPI (e.g. every time when the queries are sent through NetworkUtils). Generally Java 1.5 should work, I successfully ran Jitsi on JDK1.5.22 on Windows before I committed the SPI change.

If the Wireshark trace shows that the packets go to the expected destination, we should probably look into stepping through DNSJAVA on that Macbook. The dnsjava.jar is based upon SVN revision 1665 of DNSJAVA and the attached patch.

Ingo

dnsjava-1665-spi.patch (4.61 KB)

···

-----Original Message-----
From: Sebastien Vincent [mailto:seb@jitsi.org]
Sent: Freitag, 9. Dezember 2011 16:27
To: Bauersachs Ingo
Cc: dev@jitsi.java.net
Subject: Re: DNS problem
Hi Ingo,

Thanks you for this clarification.

I will try to do wireshark traces shortly. Note that the old MacBook is
in LAN and never move between networks.

In fact it is only with the old MacBook with JRE 5 that show up the
problem, my other recent MacBook and my Linux laptop works fine with
Java 6. Could it be related to Java 5 ?

Regards,


#5

Hi Ingo,

After looking at the wireshark traces, I see that it connect to a "manually added" DNS server (and it does not reply stuff outside of its network)... my bad.

After I remove the entry, all works as expected.

Regards,

···

--
Seb

Le 09/12/11 16:39, Bauersachs Ingo a �crit :

Hey

Well it's certainly possible that there is a Java 1.5 issue in DNSJAVA, but then I'd have expected to see such errors also outside of the SPI (e.g. every time when the queries are sent through NetworkUtils). Generally Java 1.5 should work, I successfully ran Jitsi on JDK1.5.22 on Windows before I committed the SPI change.

If the Wireshark trace shows that the packets go to the expected destination, we should probably look into stepping through DNSJAVA on that Macbook. The dnsjava.jar is based upon SVN revision 1665 of DNSJAVA and the attached patch.

Ingo

-----Original Message-----
From: Sebastien Vincent [mailto:seb@jitsi.org]
Sent: Freitag, 9. Dezember 2011 16:27
To: Bauersachs Ingo
Cc: dev@jitsi.java.net
Subject: Re: DNS problem
Hi Ingo,

Thanks you for this clarification.

I will try to do wireshark traces shortly. Note that the old MacBook is
in LAN and never move between networks.

In fact it is only with the old MacBook with JRE 5 that show up the
problem, my other recent MacBook and my Linux laptop works fine with
Java 6. Could it be related to Java 5 ?

Regards,


#6

Well, I am afraid there's definitely something rotten after the dnsjava
switch :(. With regular use (i.e. with working internet connectivity) I
see the following exceptions:

java.net.UnknownHostException: download.sip-communicator.org
  at org.xbill.DNS.spi.DNSJavaNameService.lookupAllHostAddr(DNSJavaNameService.java:174)
  at org.xbill.DNS.spi.DNSJavaNameService.invoke(DNSJavaNameService.java:122)
  at $Proxy0.lookupAllHostAddr(Unknown Source)
  at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1202)
  at java.net.InetAddress.getAllByName0(InetAddress.java:1153)
  at java.net.InetAddress.getAllByName(InetAddress.java:1083)
  at java.net.InetAddress.getAllByName(InetAddress.java:1019)
  at java.net.InetAddress.getByName(InetAddress.java:969)
  at net.java.sip.communicator.plugin.provisioning.ProvisioningActivator.retrieveConfigurationFile(ProvisioningActivator.java:369)
  at net.java.sip.communicator.plugin.provisioning.ProvisioningActivator.start(ProvisioningActivator.java:205)
  at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:629)
  at org.apache.felix.framework.Felix.activateBundle(Felix.java:1904)
  at org.apache.felix.framework.Felix.startBundle(Felix.java:1822)
  at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1192)
  at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:266)
  at java.lang.Thread.run(Thread.java:680)

and this:

java.net.UnknownHostException: vcs2.msg.yahoo.com
  at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:195)
  at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)
  at java.net.Socket.connect(Socket.java:529)
  at java.net.Socket.connect(Socket.java:478)
  at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
  at sun.net.www.http.HttpClient.openServer(HttpClient.java:395)
  at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
  at sun.net.www.http.HttpClient.<init>(HttpClient.java:234)
  at sun.net.www.http.HttpClient.New(HttpClient.java:307)
  at sun.net.www.http.HttpClient.New(HttpClient.java:324)
  at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:970)
  at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:911)
  at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:836)
  at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1172)
  at java.net.URL.openStream(URL.java:1010)
  at ymsg.network.DirectConnectionHandler.updateHost(Unknown Source)
  at ymsg.network.DirectConnectionHandler.open(Unknown Source)
  at ymsg.network.Session.login(Session.java:146)
  at net.java.sip.communicator.impl.protocol.yahoo.ProtocolProviderServiceYahooImpl.connectAndLogin(ProtocolProviderServiceYahooImpl.java:190)
  at net.java.sip.communicator.impl.protocol.yahoo.ProtocolProviderServiceYahooImpl.register(ProtocolProviderServiceYahooImpl.java:114)
  at net.java.sip.communicator.plugin.reconnectplugin.ReconnectPluginActivator$ReconnectTask.run(ReconnectPluginActivator.java:877)
  at java.lang.Thread.run(Thread.java:680)

and this.

java.net.UnknownHostException: messenger.hotmail.com
  at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:195)
  at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)
  at java.net.Socket.connect(Socket.java:529)
  at java.net.Socket.connect(Socket.java:478)
  at net.sf.jml.net.Session$1.run(Session.java:130)
  at java.lang.Thread.run(Thread.java:680)

The above keep appearing in the logs and as a result I can no longer
connect to MSN and Yahoo!. It also seems updates won't be working either
(although I haven't verified that for sure since there haven't been any
builds, newer than the one I have).

A different issue is that if I start Jitsi with no Internet connectivity
(i.e. all ifaces either down or disconnected), I see exceptions like
this one:

java.lang.NoClassDefFoundError: Could not initialize class org.xbill.DNS.Lookup
  at net.java.sip.communicator.util.NetworkUtils.createLookup(NetworkUtils.java:1181)
  at net.java.sip.communicator.util.NetworkUtils.getNAPTRRecords(NetworkUtils.java:708)
  at net.java.sip.communicator.impl.protocol.sip.net.AutoProxyConnection$LocalNetworkUtils.getNAPTRRecords(AutoProxyConnection.java:57)
  at net.java.sip.communicator.impl.protocol.sip.net.AutoProxyConnection.getNextAddressInternal(AutoProxyConnection.java:203)
  at net.java.sip.communicator.impl.protocol.sip.net.AutoProxyConnection.getNextAddressFromDns(AutoProxyConnection.java:158)
  at net.java.sip.communicator.impl.protocol.sip.net.AutoProxyConnection.getNextAddressInternal(AutoProxyConnection.java:178)
  at net.java.sip.communicator.impl.protocol.sip.net.AutoProxyConnection.getNextAddressFromDns(AutoProxyConnection.java:158)
  at net.java.sip.communicator.impl.protocol.sip.net.ProxyConnection.getNextAddress(ProxyConnection.java:115)
  at net.java.sip.communicator.impl.protocol.sip.ProtocolProviderServiceSipImpl.registerUsingNextAddress(ProtocolProviderServiceSipImpl.java:2392)
  at net.java.sip.communicator.impl.protocol.sip.ProtocolProviderServiceSipImpl.register(ProtocolProviderServiceSipImpl.java:304)
  at net.java.sip.communicator.impl.gui.main.login.LoginManager$RegisterProvider.run(LoginManager.java:418)

or like this one:

java.lang.NoClassDefFoundError: Could not initialize class org.xbill.DNS.Lookup
  at org.xbill.DNS.spi.DNSJavaNameService.lookupAllHostAddr(DNSJavaNameService.java:170)
  at org.xbill.DNS.spi.DNSJavaNameService.invoke(DNSJavaNameService.java:122)
  at $Proxy0.lookupAllHostAddr(Unknown Source)
  at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1202)
  at java.net.InetAddress.getAllByName0(InetAddress.java:1153)
  at java.net.InetAddress.getAllByName(InetAddress.java:1083)
  at java.net.InetAddress.getAllByName(InetAddress.java:1019)
  at java.net.InetAddress.getByName(InetAddress.java:969)
  at java.net.InetSocketAddress.<init>(InetSocketAddress.java:124)
  at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
  at sun.net.www.http.HttpClient.openServer(HttpClient.java:395)
  at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
  at sun.net.www.http.HttpClient.<init>(HttpClient.java:234)
  at sun.net.www.http.HttpClient.New(HttpClient.java:307)
  at sun.net.www.http.HttpClient.New(HttpClient.java:324)
  at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:970)
  at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:911)
  at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:836)
  at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1172)
  at java.net.URL.openStream(URL.java:1010)
  at ymsg.network.DirectConnectionHandler.updateHost(Unknown Source)
  at ymsg.network.DirectConnectionHandler.open(Unknown Source)
  at ymsg.network.Session.login(Session.java:146)
  at net.java.sip.communicator.impl.protocol.yahoo.ProtocolProviderServiceYahooImpl.connectAndLogin(ProtocolProviderServiceYahooImpl.java:190)
  at net.java.sip.communicator.impl.protocol.yahoo.ProtocolProviderServiceYahooImpl.register(ProtocolProviderServiceYahooImpl.java:114)
  at net.java.sip.communicator.impl.gui.main.login.LoginManager$RegisterProvider.run(LoginManager.java:418)

Not sure what to make of it all. It definitely makes me wonder if we
should indeed be relying on dnsjava as our primary DNS resolver. Or are
we somehow using it in the wrong way?

Emil

···

On 09.12.11 17:17, Sebastien Vincent wrote:

Hi Ingo,

After looking at the wireshark traces, I see that it connect to a
"manually added" DNS server (and it does not reply stuff outside of its
network)... my bad.

After I remove the entry, all works as expected.

Regards,
--
Seb

Le 09/12/11 16:39, Bauersachs Ingo a écrit :

Hey

Well it's certainly possible that there is a Java 1.5 issue in DNSJAVA, but then I'd have expected to see such errors also outside of the SPI (e.g. every time when the queries are sent through NetworkUtils). Generally Java 1.5 should work, I successfully ran Jitsi on JDK1.5.22 on Windows before I committed the SPI change.

If the Wireshark trace shows that the packets go to the expected destination, we should probably look into stepping through DNSJAVA on that Macbook. The dnsjava.jar is based upon SVN revision 1665 of DNSJAVA and the attached patch.

Ingo

-----Original Message-----
From: Sebastien Vincent [mailto:seb@jitsi.org]
Sent: Freitag, 9. Dezember 2011 16:27
To: Bauersachs Ingo
Cc: dev@jitsi.java.net
Subject: Re: DNS problem
Hi Ingo,

Thanks you for this clarification.

I will try to do wireshark traces shortly. Note that the old MacBook is
in LAN and never move between networks.

In fact it is only with the old MacBook with JRE 5 that show up the
problem, my other recent MacBook and my Linux laptop works fine with
Java 6. Could it be related to Java 5 ?

Regards,

--
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


#7

Hmmm... :frowning:
I'll take a deeper look tomorrow (well, until taking the train to Strasbourg). Just to clarify: this is on Java 1.5 Mac?

Both exceptions are interesting:
- NoClassDefFoundError: This might be a packaging problem. The util-bundle is directly on the classpath (added as vm-option) and as an OSGi-Bundle. Maybe it needs to be restricted to the vm-classpath (and thus be exported through org.osgi.framework.system.packages.extra)

- UnknownHostException: These are all plain simple A/AAAA queries. I don't get why they fail from the SPI but apparently do (sometimes) work when called from our NetworkUtils class. Are you sure that packets don't get sent to a wrong server?

Well, after all, that is an attempt/experiment for the DNSSEC stuff. If it shows that we can't rely on it, then I need to go back to square one, maybe start injecting SocketFactories and redirect the lookup to NetworkUtils where possible, and declare support for DNSSEC as "partial" (for SIP and Jabber).

Cu,
Ingo

···

-----Original Message-----
From: Emil Ivov [mailto:emcho@jitsi.org]
Sent: Freitag, 9. Dezember 2011 19:36
To: dev@jitsi.java.net
Cc: Sebastien Vincent; Bauersachs Ingo
Subject: Re: [jitsi-dev] Re: DNS problem
Well, I am afraid there's definitely something rotten after the dnsjava
switch :(. With regular use (i.e. with working internet connectivity) I
see the following exceptions:

java.net.UnknownHostException: download.sip-communicator.org
  at

org.xbill.DNS.spi.DNSJavaNameService.lookupAllHostAddr(DNSJavaNameService.jav
a:174)

  at
org.xbill.DNS.spi.DNSJavaNameService.invoke(DNSJavaNameService.java:122)
   at $Proxy0.lookupAllHostAddr(Unknown Source) at
java.net.InetAddress.getAddressFromNameService(InetAddress.java:1202)
  at java.net.InetAddress.getAllByName0(InetAddress.java:1153) at
java.net.InetAddress.getAllByName(InetAddress.java:1083) at
java.net.InetAddress.getAllByName(InetAddress.java:1019) at
java.net.InetAddress.getByName(InetAddress.java:969) at

net.java.sip.communicator.plugin.provisioning.ProvisioningActivator.retrieveC
onfigurationFile(ProvisioningActivator.java:369)

  at

net.java.sip.communicator.plugin.provisioning.ProvisioningActivator.start(Pro
visioningActivator.java:205)

  at

org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java
:629)

  at org.apache.felix.framework.Felix.activateBundle(Felix.java:1904)
  at org.apache.felix.framework.Felix.startBundle(Felix.java:1822) at
org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1192)
  at
org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:266)
  at java.lang.Thread.run(Thread.java:680)

and this:

java.net.UnknownHostException: vcs2.msg.yahoo.com
  at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:195)
  at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)
  at java.net.Socket.connect(Socket.java:529)
  at java.net.Socket.connect(Socket.java:478)
  at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
  at sun.net.www.http.HttpClient.openServer(HttpClient.java:395)
  at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
  at sun.net.www.http.HttpClient.<init>(HttpClient.java:234)
  at sun.net.www.http.HttpClient.New(HttpClient.java:307)
  at sun.net.www.http.HttpClient.New(HttpClient.java:324)
  at

sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnectio
n.java:970)

  at

sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.ja
va:911)

  at

sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:83
6)

  at

sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.
java:1172)

  at java.net.URL.openStream(URL.java:1010)
  at ymsg.network.DirectConnectionHandler.updateHost(Unknown Source)
  at ymsg.network.DirectConnectionHandler.open(Unknown Source)
  at ymsg.network.Session.login(Session.java:146)
  at

net.java.sip.communicator.impl.protocol.yahoo.ProtocolProviderServiceYahooImp
l.connectAndLogin(ProtocolProviderServiceYahooImpl.java:190)

  at

net.java.sip.communicator.impl.protocol.yahoo.ProtocolProviderServiceYahooImp
l.register(ProtocolProviderServiceYahooImpl.java:114)

  at

net.java.sip.communicator.plugin.reconnectplugin.ReconnectPluginActivator$Rec
onnectTask.run(ReconnectPluginActivator.java:877)

  at java.lang.Thread.run(Thread.java:680)

and this.

java.net.UnknownHostException: messenger.hotmail.com
  at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:195)
  at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)
  at java.net.Socket.connect(Socket.java:529)
  at java.net.Socket.connect(Socket.java:478)
  at net.sf.jml.net.Session$1.run(Session.java:130)
  at java.lang.Thread.run(Thread.java:680)

The above keep appearing in the logs and as a result I can no longer
connect to MSN and Yahoo!. It also seems updates won't be working either
(although I haven't verified that for sure since there haven't been any
builds, newer than the one I have).

A different issue is that if I start Jitsi with no Internet connectivity
(i.e. all ifaces either down or disconnected), I see exceptions like
this one:

java.lang.NoClassDefFoundError: Could not initialize class
org.xbill.DNS.Lookup at

net.java.sip.communicator.util.NetworkUtils.createLookup(NetworkUtils.java:11
81)

  at

net.java.sip.communicator.util.NetworkUtils.getNAPTRRecords(NetworkUtils.java
:708)

  at

net.java.sip.communicator.impl.protocol.sip.net.AutoProxyConnection$LocalNetw
orkUtils.getNAPTRRecords(AutoProxyConnection.java:57)

  at

net.java.sip.communicator.impl.protocol.sip.net.AutoProxyConnection.getNextAd
dressInternal(AutoProxyConnection.java:203)

  at

net.java.sip.communicator.impl.protocol.sip.net.AutoProxyConnection.getNextAd
dressFromDns(AutoProxyConnection.java:158)

  at

net.java.sip.communicator.impl.protocol.sip.net.AutoProxyConnection.getNextAd
dressInternal(AutoProxyConnection.java:178)

  at

net.java.sip.communicator.impl.protocol.sip.net.AutoProxyConnection.getNextAd
dressFromDns(AutoProxyConnection.java:158)

  at

net.java.sip.communicator.impl.protocol.sip.net.ProxyConnection.getNextAddres
s(ProxyConnection.java:115)

  at

net.java.sip.communicator.impl.protocol.sip.ProtocolProviderServiceSipImpl.re
gisterUsingNextAddress(ProtocolProviderServiceSipImpl.java:2392)

  at

net.java.sip.communicator.impl.protocol.sip.ProtocolProviderServiceSipImpl.re
gister(ProtocolProviderServiceSipImpl.java:304)

  at

net.java.sip.communicator.impl.gui.main.login.LoginManager$RegisterProvid
er.r un(LoginManager.java:418)

or like this one:

java.lang.NoClassDefFoundError: Could not initialize class
org.xbill.DNS.Lookup at

org.xbill.DNS.spi.DNSJavaNameService.lookupAllHostAddr(DNSJavaNameService.jav
a:170)

  at
org.xbill.DNS.spi.DNSJavaNameService.invoke(DNSJavaNameService.java:122)
   at $Proxy0.lookupAllHostAddr(Unknown Source) at
java.net.InetAddress.getAddressFromNameService(InetAddress.java:1202)
  at java.net.InetAddress.getAllByName0(InetAddress.java:1153) at
java.net.InetAddress.getAllByName(InetAddress.java:1083) at
java.net.InetAddress.getAllByName(InetAddress.java:1019) at
java.net.InetAddress.getByName(InetAddress.java:969) at
java.net.InetSocketAddress.<init>(InetSocketAddress.java:124) at
sun.net.NetworkClient.doConnect(NetworkClient.java:163) at
sun.net.www.http.HttpClient.openServer(HttpClient.java:395) at
sun.net.www.http.HttpClient.openServer(HttpClient.java:530) at
sun.net.www.http.HttpClient.<init>(HttpClient.java:234) at
sun.net.www.http.HttpClient.New(HttpClient.java:307) at
sun.net.www.http.HttpClient.New(HttpClient.java:324) at

sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnectio
n.java:970)

  at

sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.ja
va:911)

  at

sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:83
6)

  at

sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.
java:1172)

  at java.net.URL.openStream(URL.java:1010)
  at ymsg.network.DirectConnectionHandler.updateHost(Unknown Source)
  at ymsg.network.DirectConnectionHandler.open(Unknown Source)
  at ymsg.network.Session.login(Session.java:146)
  at

net.java.sip.communicator.impl.protocol.yahoo.ProtocolProviderServiceYahooImp
l.connectAndLogin(ProtocolProviderServiceYahooImpl.java:190)

  at

net.java.sip.communicator.impl.protocol.yahoo.ProtocolProviderServiceYahooImp
l.register(ProtocolProviderServiceYahooImpl.java:114)

  at

net.java.sip.communicator.impl.gui.main.login.LoginManager$RegisterProvid
er.r un(LoginManager.java:418)

Not sure what to make of it all. It definitely makes me wonder if we
should indeed be relying on dnsjava as our primary DNS resolver. Or are
we somehow using it in the wrong way?

Emil

On 09.12.11 17:17, Sebastien Vincent wrote:

Hi Ingo,

After looking at the wireshark traces, I see that it connect to a
"manually added" DNS server (and it does not reply stuff outside of its
network)... my bad.

After I remove the entry, all works as expected.

Regards,
--
Seb

Le 09/12/11 16:39, Bauersachs Ingo a écrit :

Hey

Well it's certainly possible that there is a Java 1.5 issue in DNSJAVA,

but then I'd have expected to see such errors also outside of the SPI (e.g.
every time when the queries are sent through NetworkUtils). Generally Java
1.5 should work, I successfully ran Jitsi on JDK1.5.22 on Windows before I
committed the SPI change.

If the Wireshark trace shows that the packets go to the expected

destination, we should probably look into stepping through DNSJAVA on that
Macbook. The dnsjava.jar is based upon SVN revision 1665 of DNSJAVA and the
attached patch.

Ingo

-----Original Message-----
From: Sebastien Vincent [mailto:seb@jitsi.org]
Sent: Freitag, 9. Dezember 2011 16:27
To: Bauersachs Ingo
Cc: dev@jitsi.java.net
Subject: Re: DNS problem
Hi Ingo,

Thanks you for this clarification.

I will try to do wireshark traces shortly. Note that the old MacBook is
in LAN and never move between networks.

In fact it is only with the old MacBook with JRE 5 that show up the
problem, my other recent MacBook and my Linux laptop works fine with
Java 6. Could it be related to Java 5 ?

Regards,