CUPS n'est pas démarré en début de session

Bonjour,

Je suis sous Wheezy depuis quelques mois.
Afin que mon imprimante (Lexmark S505) fonctionne, j’ai dû compiler et installer CUPS 1.5.4 (j’avais dû faire la même chose sous Ubuntu 12.04)
Cela fonctionne mais au démarrage, cups ne tourne pas (je ne sais pas si ça plante à un moment et où trouver l’éventuel message d’erreur)
La seule chose que j’ai trouvée c’est un message qui apparaît une bonne dizaine de minutes après le démarrage dans la log de CUPS (localhost:631/admin/log/error_log) :

E [10/Jan/2014:20:02:59 +0100] Returning IPP client-error-not-possible for Create-Printer-Subscription (/) from localhost
mais je ne sait pas ce que cela signifie

Pour le moment, je dois donc toujours le lancer manuellement par un

Quelqu’un pourrait-il m’indiquer comment trouver une éventuelle erreur et le cas échéant comment lancer automatiquement cups au démarrage ?

update-rc.d cups defaults ? ^’

Mais je crois que cups démarre déjà par défaut non? :angry:.

Il semble en effet y avoir un problème de ce côté-là :

fab@debian-desktop:~$ update-rc.d cups defaults update-rc.d: using dependency based boot sequencing insserv: warning: script 'K36cups' missing LSB tags and overrides insserv: warning: script 'cups' missing LSB tags and overrides insserv: warning: current start runlevel(s) (2 3 5) of script `cups' overrides LSB defaults (2 3 4 5). insserv: warning: current stop runlevel(s) (0 2 3 5) of script `cups' overrides LSB defaults (0 1 6). insserv: There is a loop at service cups if started insserv: There is a loop between service minissdpd and mountnfs if started insserv: loop involving service mountnfs at depth 9 insserv: loop involving service nfs-common at depth 8 insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Max recursions depth 99 reached insserv: loop involving service hddtemp at depth 10 insserv: There is a loop between service minissdpd and mountall if started insserv: loop involving service mountall at depth 5 insserv: loop involving service checkfs at depth 4 insserv: loop involving service mountnfs-bootclean at depth 11 insserv: There is a loop between service minissdpd and urandom if started insserv: loop involving service urandom at depth 6 insserv: loop involving service networking at depth 9 insserv: loop involving service mountall-bootclean at depth 9 insserv: There is a loop between service minissdpd and udev if started insserv: loop involving service udev at depth 1 insserv: There is a loop at service minissdpd if started insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: loop involving service rsyslog at depth 15 insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: There is a loop between service minissdpd and cryptdisks-early if started insserv: loop involving service cryptdisks-early at depth 6 insserv: loop involving service checkroot at depth 5 insserv: There is a loop between service minissdpd and mountdevsubfs if started insserv: loop involving service mountdevsubfs at depth 3 insserv: loop involving service mountkernfs at depth 1 insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: Starting cups depends on minissdpd and therefore on system facility `$all' which can not be true! insserv: There is a loop between service minissdpd and checkroot if started insserv: exiting now without changing boot order! update-rc.d: error: insserv rejected the script header

Comment résoudre le conflit entre les différents services ?

Peut être te faut il tout recommencer depuis le début : localhost:631/admin
puis installer ta machine connectée via usb et au final gagner la bataille ! @+

Commence par faire le ménage en supprimant à la main tous les symlinks concernant CUPS dans tes répertoires [mono]/etc/rc*.d[/mono]

Lance ensuite [mono]insserv -v[/mono] (en root) pour voir s’il y a toujours des problèmes. Pour exemple, un résultat sans problèmes :

# insserv -v insserv: creating .depend.boot insserv: creating .depend.start insserv: creating .depend.stop

S’il y a encore des soucis (auquel cas donne nous le résultat du [mono]insserv -v[/mono]) alors on avisera.

Sinon si tout est nickel à ce stade, montre nous les en-têtes LSB* contenues dans [mono]/etc/init.d/cups[/mono] et [mono]/etc/init.d/minissdpd[/mono] qui ont tout l’air d’être les coupables. Dis nous aussi comment tu as installé [mono]minissdpd[/mono]. (dépôts ? compilation manuelle ?)

(*) En-têtes LSB = les quelques lignes en début de fichier, commençant par [mono]### BEGIN INIT INFO[/mono] et finissant par [mono]### END INIT INFO[/mono].

Après ménage des cups, j’obtiens ceci

fab@debian-desktop:~$ sudo insserv -v insserv: warning: script 'cups' missing LSB tags and overrides insserv: remove service /etc/init.d/../rc0.d/K01hddtemp insserv: enable service ../init.d/hddtemp -> /etc/init.d/../rc0.d/K02hddtemp insserv: remove service /etc/init.d/../rc1.d/K01hddtemp insserv: enable service ../init.d/hddtemp -> /etc/init.d/../rc1.d/K02hddtemp insserv: remove service /etc/init.d/../rc6.d/K01hddtemp insserv: enable service ../init.d/hddtemp -> /etc/init.d/../rc6.d/K02hddtemp insserv: creating .depend.boot insserv: creating .depend.start insserv: creating .depend.stop

et si j’enlève cups de /etc/init.d
j’ai le résultat sans problèmes

Il semble bien que ce soit cups qui pose problème (minissdpd vient des dépôts et supprimer le paquet n’améliore pas la situation)

D’ailleurs, il n’y a tout simplement pas d’entête LSB dans le fichier /etc/init.d/cups :

[code]#!/bin/sh

“$Id: cups.sh.in 9949 2011-08-31 04:58:33Z mike $”

Startup/shutdown script for CUPS.

Copyright 2007-2011 by Apple Inc.

Copyright 1997-2007 by Easy Software Products, all rights reserved.

These coded instructions, statements, and computer programs are the

property of Apple Inc. and are protected by Federal copyright

law. Distribution and use rights are outlined in the file “LICENSE.txt”

which should have been included with this file. If this file is

file is missing or damaged, see the license at “http://www.cups.org/”.

OS-Dependent Information

Linux chkconfig stuff:

chkconfig: 235 99 00

description: Startup/shutdown script for CUPS.

NetBSD 1.5+ rcorder script lines. The format of the following two

lines is very strict – please don’t add additional spaces!

PROVIDE: cups

REQUIRE: DAEMON

OS-Dependent Configuration

case “uname” in
IRIX*)
IS_ON=/sbin/chkconfig

	if $IS_ON verbose; then
		ECHO=echo
	else
		ECHO=:
	fi
	ECHO_OK=:
	ECHO_ERROR=:
	;;

*BSD*)
    	IS_ON=:
	ECHO=echo
	ECHO_OK=:
	ECHO_ERROR=:
	;;

Darwin*)
	. /etc/rc.common

	if test "${CUPS:=-YES-}" = "-NO-"; then
		exit 0
	fi

    	IS_ON=:
	ECHO=ConsoleMessage
	ECHO_OK=:
	ECHO_ERROR=:
	;;

Linux*)
	IS_ON=/bin/true
	if test -f /etc/init.d/functions; then
		. /etc/init.d/functions
		ECHO=echo
		ECHO_OK="echo_success"
		ECHO_ERROR="echo_failure"
	else
		ECHO=echo
		ECHO_OK=:
		ECHO_ERROR=:
	fi
	;;

*)
	IS_ON=/bin/true
	ECHO=echo
	ECHO_OK=:
	ECHO_ERROR=:
	;;

esac

OS-Independent Stuff

Set the timezone, if possible… This allows the scheduler and

all child processes to know the local timezone when reporting

dates and times to the user. If no timezone information is

found, then Greenwich Mean Time (GMT) will probably be used.

for file in /etc/TIMEZONE /etc/rc.config /etc/sysconfig/clock; do
if test -f $file; then
. $file
fi
done

if test “x$ZONE” != x; then
TZ="$ZONE"
fi

if test “x$TIMEZONE” != x; then
TZ="$TIMEZONE"
fi

if test “x$TZ” != x; then
export TZ
fi

Don’t use TMPDIR environment variable from init script, as that can

cause cupsd to set TempDir to a user’s temporary directory instead

of the default…

unset TMPDIR

Make sure we have the standard program directories in the path

since some operating systems (this means YOU HP-UX!) don’t

provide a standard path on boot-up…

if test “x$PATH” = x; then
PATH="/bin:/usr/bin:/sbin:/usr/sbin"
else
PATH="/bin:/usr/bin:/sbin:/usr/sbin:$PATH"
fi

export PATH

See if the CUPS server (cupsd) is running…

case “uname” in
HP-UX* | AIX* | SINIX*)
pid=ps -e | awk '{if (match($4, ".*/cupsd$") || $4 == "cupsd") print $1}'
;;
IRIX* | SunOS*)
pid=ps -e | nawk '{if (match($4, ".*/cupsd$") || $4 == "cupsd") print $1}'
;;
UnixWare*)
pid=ps -e | awk '{if (match($6, ".*/cupsd$") || $6 == "cupsd") print $1}'
. /etc/TIMEZONE
;;
OSF1*)
pid=ps -e | awk '{if (match($5, ".*/cupsd$") || $5 == "cupsd") print $1}'
;;
Linux* | BSD | Darwin*)
pid=ps ax | awk '{if (match($5, ".*/cupsd$") || $5 == "cupsd") print $1}'
;;
*)
pid=""
;;
esac

Start or stop the CUPS server based upon the first argument to the script.

case $1 in
start | restart | reload)
if $IS_ON cups; then
if test -x /sbin/portrelease; then
/sbin/portrelease cups
fi

		if test "$pid" != ""; then
			kill -HUP $pid
		else
			prefix=/
			exec_prefix=/usr
			/usr/sbin/cupsd
			if test $? != 0; then
				$ECHO_FAIL
				$ECHO "cups: unable to $1 scheduler."
				exit 1
			fi
		fi
		$ECHO_OK
		$ECHO "cups: ${1}ed scheduler."
	fi
	;;

stop)
	if test "$pid" != ""; then
		kill $pid
		$ECHO_OK
		$ECHO "cups: stopped scheduler."
	fi
	;;

status)
	if test "$pid" != ""; then
		echo "cups: scheduler is running."
	else
		echo "cups: scheduler is not running."
	fi
	;;

start_msg)
	# HP-UX non-standard...
	echo "Starting CUPS Server"
	;;

stop_msg)
	# HP-UX non-standard...
	echo "Starting CUPS Server"
	;;

*)
	echo "Usage: cups {reload|restart|start|status|stop}"
	exit 1
	;;

esac

Exit with no errors.

exit 0

End of “$Id: cups.sh.in 9949 2011-08-31 04:58:33Z mike $”.

#[/code]

[quote=“fabsail”]Il semble bien que ce soit cups qui pose problème (minissdpd vient des dépôts et supprimer le paquet n’améliore pas la situation)

D’ailleurs, il n’y a tout simplement pas d’entête LSB dans le fichier /etc/init.d/cups :[/quote]
Ne cherche pas plus loin, depuis Squeeze les en-têtes LSB sont obligatoires dans les scripts d’init.
Quant à minissdpd, les erreurs d’insserv dans ton premier message m’ont fait croire que cups dépendait de lui. Ça m’étonnait un peu aussi qu’il y ait besoin de SSDP pour l’impression. :mrgreen:

Solution => rajouter des en-têtes LSB dans ton script /etc/init.d/cups (enfin là où tu l’as mis temporairement) puis [mono]insserv cups[/mono].
Voici celles fournies par cups-daemon 1.6.4-2 dans testing, elles devraient faire l’affaire. À insérer juste après la première ligne (shebang) de ton script :

[code]### BEGIN INIT INFO

Provides: cups

Required-Start: $syslog $remote_fs

Required-Stop: $syslog $remote_fs

Should-Start: $network avahi slapd nslcd

Should-Stop: $network

X-Start-Before: samba

X-Stop-After: samba

Default-Start: 2 3 4 5

Default-Stop: 1

Short-Description: CUPS Printing spooler and server

Description: Manage the CUPS Printing spooler and server;

make it’s web interface accessible on http://localhost:631/

END INIT INFO[/code]

Bravo, en faisant ça tout fonctionne au poil.
C’était tout bête mais fallait le savoir.
Je suppose que les paquets à compiler fournis par CUPS ne sont pas adaptés aux exigences des différentes distributions.

Un grand merci à toi Syam

Je t’en prie. :wink:
Par contre, résolu = coche verte à droite des messages et non pas dans le titre du sujet.
Pas grave je le fais pour toi mais penses-y la prochaine fois.