cups : problems without IPv6

hi… i have suse 11.1 i usually immediatly disable IPv6 because is annoyning (no IPv6 support here so)…

but now i have a strange problem…

after i disabled IPv6 cups looks to be dead…

infact the command

lpstat -h localhost -r

reply “unable to connect the server”, after some troubleshooting i found on /var/log/cups/error_log that line:

**E [12/Jun/2009:22:39:58 +0200] Unable to open listen socket for address ::1:631 - Address family not supported by protocol.
**

as you can see it refer to IPv6 localhost address (::1)

so i thought, what about if i enable IPv6 again? and infact… that works…

I [12/Jun/2009:23:24:35 +0200] Listening to ::1:631 on fd 1…

i tried to un-install re-install reboot service and machine, but nothing was happening

the only way to make it work was re-enable IPv6… i think that to be a bug… any idea??

You can restrict the cups listeners.
Edit the file /etc/cups/cupsd.conf
There are entries starting with “Listen”.

the only listen part is here:


# Only listen for connections from the local machine.
Listen localhost:631
Listen /var/run/cups/cups.sock

i see nothing intresting… ideas?

No ipv6 specific entries there. May be, you should remove the ipv6 entries from the /etc/hosts file.
However, I have the exact settings like yours - ipv6 disabled and cups listening on localhost:631. But, my cups is not giving me any problems.

No, not a bug. Many services are IPv6 ready and will work over IPv6 provide both the client and the server are using IPv6. But if you are not IPv6 ready you should disable mapping of domain names to IPv6 addresses. You will find a couple of those in /etc/hosts.

well…

here /etc/hosts

#
# hosts         This file describes a number of hostname-to-address
#               mappings for the TCP/IP subsystem.  It is mostly
#               used at boot time, when no name servers are running.
#               On small systems, this file can be used instead of a
#               "named" name server.
# Syntax:
#
# IP-Address  Full-Qualified-Hostname  Short-Hostname
#

127.0.0.1       nil

# special IPv6 addresses
::1             localhost ipv6-localhost ipv6-loopback

fe00::0         nil

ff00::0         nil
ff02::1         nil
ff02::2         nil
ff02::3         nil
127.0.0.2       suse-laptop.site suse-laptop


i think that to be a bug, because on other PCs where ipv6 has been disabled too, cups search lo listen on “127.0.0.1:631” and not on ::1:631… that means it listen on an ipv4 address… looks that for a reason i don’t know, cups didn’t switch from ipv6 to ipv4… i disabled ipv6 using yast as usual

—edit—

thanks for the tip… fixed in that way:

move that line from:

127.0.0.1       nil

to

127.0.0.1       localhost ipv4-localhost ipv4-loopback

thanks for help

It looks like a bug. Generally, it does not replace it with “nil”.

However, it is good to hear that your problem is resolved.

I’ve never seen /etc/hosts with nil in it. If some YaST module or config program put that word nil in, yes that would be a bug. But you didn’t mention the nil bit until your last post.

What is not a bug is the IPv6 support. It works but you have make sure all the components work. If your client is expecting to contact an IPv6 server, then the server should be listening on an IPv6 socket. So if in doubt, just opt out of IPv6 for now.

yast bug:

https://bugzilla.novell.com/show_bug.cgi?id=513033

One may find it hard to come across such a bug. For me, I may never use Yast to edit /etc/hosts because it is too easy to use the plain old vi instead :slight_smile: