KDE 3.5.3, IPv6, and CUPS

From: James Zuelow <e5z8652@zuelow.net>
Date: Sat Jun 24 2006 - 21:42:19 AKDT

Anyone else running KDE 3.5.3 on Debian testing?

I do a dist-upgrade almost every day, and there have been a lot of KDE components coming down the pipe. Testing == sometimes broken.

I recently lost the ability to resolve localhost with KDE. I originally noticed it when my desktop shortcuts to localhost stopped working and I had to use Firefox to get to my gnump3d music, but didn't pay much attention to it until I realized I couldn't print anymore. In Konqueror, http://127.0.0.1:631 would work fine, but http://localhost:631 would time out. Firefox did not have any issue with http://localhost:631, and other machines on the subnet could also connect so I was confident that it was a KDE problem and not a CUPS problem.

My firewall rules had IPv6 policy set to drop for output and input, and left that way since I didn't think I had any IPv6 services running. It turns out that KDE uses IPv6 to contact localhost, and won't fall back to IPv4 in certain situations.

Setting IPv6 policy to accept for output, and allowing IPv6 input to localhost fixed konqueror right away, but I still couldn't print.

I have to tell KDE to use BSD printing to get it to print. (I have cupsys-bsd installed so the lp commands work. Presumably KDE is running 'lpstat -a' to get the list of CUPS printers.) If I point KDE's printing subsystem at CUPS, attempting to print fails with a "host not found" error.

To test IPv6 connectivity, I tried:

james@Sovereign:~$ ping6 ::1
PING ::1(::1) 56 data bytes
64 bytes from ::1: icmp_seq=1 ttl=64 time=0.065 ms
64 bytes from ::1: icmp_seq=2 ttl=64 time=0.071 ms

So that is working. Then I tried:

ping6 localhost
unknown host

(However 'konqueror http://[localhost]:631' works. The address bar is rewritten to get rid of the brackets, might be translating to IPv4.)

Huh. Interesting. That is what kcontrol was complaining about. Quick check of /etc/hosts and I see that I should try a different name for localhost:

james@Sovereign:~$ ping6 ip6-localhost
PING ip6-localhost(ip6-localhost) 56 data bytes
64 bytes from ip6-localhost: icmp_seq=1 ttl=64 time=0.059 ms
64 bytes from ip6-localhost: icmp_seq=2 ttl=64 time=0.072 ms

Playing with /etc/hosts a little to read as follows:

::1 ip6-localhost ip6-loopback localhost

results in:

james@Sovereign:~$ ping6 localhost
PING localhost(ip6-localhost) 56 data bytes
64 bytes from ip6-localhost: icmp_seq=1 ttl=64 time=0.061 ms
64 bytes from ip6-localhost: icmp_seq=2 ttl=64 time=0.069 ms

But the printing system STILL can't find localhost. Selecting CUPS in the KDE control panel printing still results in:

Initializing manager...

Unable to retrieve the printer list. Error message received from manager:
Connection to CUPS server failed. Check that the CUPS server is correctly installed and running. Error: host not found.

We know it's running because I just connected to it with Konqueror. Still, it is an improvement over earlier when Firefox would connect but Konqueror would time out.

So is KDE using DNS to lookup localhost? Here's what I get using the ACS DNS servers (GCI just times out on me, maybe because the request is coming from the ACS netblock, or maybe because the request has to go through the lower-48 to get to GCI next door. Sigh. ACS and GCI still acting like children.)

james@Sovereign:~$ host 127.0.0.1
1.0.0.127.in-addr.arpa domain name pointer localhost.

james@Sovereign:~$ host ::1
Host 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa not found: 3(NXDOMAIN)

But IPv6 doesn't always use the arpa reverse lookup. Just to be sure:

james@Sovereign:~$ host -i ::1
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.int domain name pointer localhost.

Interesting. Using the "proper" IPv6 host syntax (the IP6.INT domain) works.

So at this point I'm guessing that KDE printing subsystem is using IPv6 to connect, does not use the /etc/hosts file to resolve localhost (although Konqueror can use /etc/hosts so this is not a universal thing with KDE), and when it uses DNS to look up localhost it looks for an arpa reverse record instead of the IPv6 inet reverse PTR.

This is a shame, since it is one more workaround I've got to do on my desktop. (kdm and ALSA are broken as well.)

If you see something about my troubleshooting that I'm missing, please let me know.
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Sat Jun 24 21:43:09 2006

This archive was generated by hypermail 2.1.8 : Sat Jun 24 2006 - 21:43:10 AKDT