DNS broken for 32 bit programs on 64 bit Ubuntu if libnss-mdns installed but lib32nss-mdns not installed

Bug #220314 reported by Gary
10
Affects Status Importance Assigned to Milestone
Ubuntu
Triaged
Undecided
Matthias Klose

Bug Description

I ran updates this morning and my JDBC driver running in under 32 bit Java can no longer resolve addresses. If I configure my app with an IP address it works. So it seems to be a DNS issue. 64 bit Java seems to work fine.

Here's the stack trace.

Exception in thread "main" java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
       at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:74)
       at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:110)
       at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:171)
       at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
       at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:494)
       at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:411)
       at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:490)
       at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:202)
       at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:33)
       at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:465)
       at java.sql.DriverManager.getConnection(DriverManager.java:525)
       at java.sql.DriverManager.getConnection(DriverManager.java:171)

Again - if I specifiy an IP address instead of the hostname then it works fine. Also - 64 bit seems to work fine also.
I'm using the Oracle 11g JDBC driver.

Revision history for this message
Gary (gary-baker) wrote :

Oh ya - here are the details of the Java version.

>java -version
java version "1.5.0_15"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_15-b04)
Java HotSpot(TM) Server VM (build 1.5.0_15-b04, mixed mode)

Revision history for this message
Gary (gary-baker) wrote :
Revision history for this message
Gary (gary-baker) wrote :

I noticed that ia32libs was upgraded to 2.2ubuntu10. I wonder if that's the issue.

Revision history for this message
Gary (gary-baker) wrote :

Sure enough. Downgrading to ia32libs 2.1 resolves the issue. So this is a bug in ia32libs...

The following is a workaround:

$ wget http://us.archive.ubuntu.com/ubuntu/pool/universe/i/ia32-libs/ia32-libs_2.1ubuntu3_amd64.deb
$ sudo dpkg -i ia32-libs_2.1ubuntu3_amd64.deb
dpkg - warning: downgrading ia32-libs from 2.2ubuntu10 to 2.1ubuntu3.
(Reading database ... 170461 files and directories currently installed.)
Preparing to replace ia32-libs 2.2ubuntu10 (using ia32-libs_2.1ubuntu3_amd64.deb) ...
Unpacking replacement ia32-libs ...
Setting up ia32-libs (2.1ubuntu3) ...

Processing triggers for libc6 ...
ldconfig deferred processing now taking place
$

Revision history for this message
Gary (gary-baker) wrote :

ia32-libs_2.2ubuntu9_amd64 works fine also. so the bug is was introduced by ia32-libs_2.2ubuntu10_amd64

Revision history for this message
Gary (gary-baker) wrote :

Matthias,
I noticed that you upgraded the package, so maybe you can find out who should get this bug.
https://launchpad.net/ubuntu/hardy/+source/ia32-libs/2.2ubuntu10
Thanks,
-Gary

Revision history for this message
Matthias Klose (doko) wrote :

please install the lib32nss-mdns package; does the JDBC driver have a dependency on that libnss-mdns?

Revision history for this message
Gary (gary-baker) wrote :

That worked. Thanks.

Maybe this should be refiled as a "answer"?

Revision history for this message
mthome (mthome) wrote :

Various other packages seem to have this same effective (new) dependency, for instance thunderbird-2.0.0.12
Over-zealous repackaging of functionality? I don't see any reason why mdns should be required for imap (or java).

Revision history for this message
Gary (gary-baker) wrote :

I would imagine there is a lot of mutlicast-DNS users out there that would appreciate the dependency.

Revision history for this message
wolfwitch (wolf-mylunarden) wrote :

I can definitely confirm this. I believe the update that caused this hit the repositories sometime after Monday afternoon, April 21st, as that's when my Java apps that use DNS stopped working. I've got bugs open with Java and my application devs for this.

I'll try the fix posted by Gary. This really needs to be fixed in the repositories though.

Revision history for this message
wolfwitch (wolf-mylunarden) wrote :

Installing lib32nss-mdns per Matthias, which solved the problem. I have to agree with Gary- this really needs to be a dependency.

Revision history for this message
Peter de Kraker (peterdekraker) wrote :

Can this be looked into ? Why is it still "incomplete" ?

For me the same situation:
Fully updated Hardy and my ia32-sun-java-6 when using Aptana (eclipse) could not resolve any hostnames until I installed the lib32nss-mdns package.

Revision history for this message
Lex Ross (lross) wrote :

There is an issue with Java Web Start 1.6.0_06 (32-bit) failing to connect to server. It downloads and runs application from the web just fine, but then said application needs to connect to the server to authenticate, the error message is displayed, "Authentication error. Cannot connect to server. Try again later." There is no such issue with Gutsy 32-bit.

lib32nss-mdns version 0.10-3ubuntu2 is installed.

Revision history for this message
Meethoss (steve-thepicketts) wrote :

This solved my problem of 32bit Java (sun-j2sdk1.6_1.6.0+update10_amd64) not working on my 64bit Ubuntu installation. Thanks for the help!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.