LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Disabling IPv6 seems to break CUPS (https://www.linuxquestions.org/questions/slackware-14/disabling-ipv6-seems-to-break-cups-4175518566/)

kikinovak 09-14-2014 01:19 PM

Disabling IPv6 seems to break CUPS
 
Hi,

I have a headless LAN server running Slackware64 14.1. I've disabled IPv6 using "ipv6.disable=1" in the kernel boot options.

I'm currently trying to setup a printer (Sharp AR-M256) using CUPS. Here's my cupsd.conf file:

Code:

# Log general information in error_log - change "warn" to "debug"
# for troubleshooting...
LogLevel warn

# Administrator user group...
SystemGroup sys root


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

# Show shared printers on the local network.
Browsing On
BrowseAddress @LOCAL
BrowseOrder allow,deny
BrowseAllow 192.168.2.*
BrowseLocalProtocols CUPS

# Default authentication type, when authentication is required...
DefaultAuthType Basic

# Web interface setting...
WebInterface Yes

# Restrict access to the server...
<Location />
  Order allow,deny
  Allow From 127.0.0.1
  Allow From 192.168.2.*
</Location>

# Restrict access to the admin pages...
<Location /admin>
  Order allow,deny
  Allow From 127.0.0.1
  Allow From 192.168.2.*
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  Order allow,deny
  Allow From 127.0.0.1
  Allow From 192.168.2.*
</Location>

...

I tried to send a test page to the printer and got the following error message in the CUPS web interface:

"Failed to connect to system bus"

A peek in /var/log/cups/error.log shows me this:

Code:

E [14/Sep/2014:19:42:17 +0200] Unable to open listen socket for address [v1.::1]:631 - Address family not supported by protocol.
E [14/Sep/2014:19:43:49 +0200] Unable to open listen socket for address [v1.::]:631 - Address family not supported by protocol.
E [14/Sep/2014:19:46:22 +0200] Unable to open listen socket for address [v1.::]:631 - Address family not supported by protocol.
E [14/Sep/2014:19:47:16 +0200] [cups-deviced] PID 4035 (snmp) stopped with status 1!
E [14/Sep/2014:19:48:24 +0200] [Job 1] Failed to connect to system bus
E [14/Sep/2014:19:53:41 +0200] [Job 1] Stopping unresponsive job!

I googled about the problem, but found nothing conclusive besides reactivating IPv6.

Any suggestions?

fsLeg 09-14-2014 01:30 PM

Quick googling revealed possible solution: try removing/commenting all IPv6 addresses from /etc/hosts.

kikinovak 09-14-2014 03:16 PM

Quote:

Originally Posted by fsLeg (Post 5237818)
Quick googling revealed possible solution: try removing/commenting all IPv6 addresses from /etc/hosts.

I don't have any IPv6-related lines in /etc/hosts. On the other hand, reactivating IPv6 solved the problem, at least temporarily.

fsLeg 09-14-2014 03:56 PM

Did you try to explicitly specify `Listen 127.0.0.1:631` (or whatever address you want to bind it to) instead of `Port 631`? I just did and it looks like that "Address family not supported by protocol" error is gone. But I don't have any printers, neither do I know how to work with CUPS, so I can't test if it actually helps.

It is strange that CUPS tries to bind itself to IPv6 address even if kernel doesn't have IPv6 support. It's even more strange that this doesn't happen on some installations.

kikinovak 09-14-2014 05:09 PM

Apparently this is a weird bug in CUPS.

Andersen 09-14-2014 07:28 PM

Have you tried disabling ipv6 by adding blacklist ipv6 in /etc/modprobe.d/blacklist.conf? Does it make any difference?

BratPit 09-15-2014 12:53 AM

I've got no compiled IPv6 at all /custom karnel/ and CUPS work.
Must be another cause.

EYo 09-17-2014 06:18 AM

getaddrinfo?
 
Long shot: /etc/gai.conf
Code:

# Configuration for getaddrinfo(3).
#
# So far only configuration for the destination address sorting is needed.
# RFC 3484 governs the sorting.  But the RFC also says that system
# administrators should be able to overwrite the defaults.  This can be
# achieved here.
#
# All lines have an initial identifier specifying the option followed by
# up to two values.  Information specified in this file replaces the
# default information.  Complete absence of data of one kind causes the
# appropriate default information to be used.  The supported commands include:
#

#    For sites which prefer IPv4 connections change the last line to
#
precedence ::ffff:0:0/96  100

Or this (unresolved):
Avahi reports IPv6/IPv4 and "dnssd" CUPS backend only tries IPv6, no IPv4 fallback
https://www.cups.org/str.php?L4305

keefaz 09-17-2014 07:49 AM

Maybe say explicitly to listen to an IPV4 address in cupsd.conf?
Code:

Listen 127.0.0.1:631
Edit, I believe you have to add the server network IP (192.168.2.?) to make it accessible from Lan
(not sure though)

Code:

#Port 631
Listen 127.0.0.1:631
Listen /var/run/cups/cups.sock
Listen <server IP>:631

Edit2, just noticed fsLeg posted same suggestion a long time ago, bah.. :)


All times are GMT -5. The time now is 10:43 AM.