Forum Mac Os X server
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.
Forum Mac Os X server

Forum francophone sur les technologies serveur d'Apple
 
AccueilAccueil  RechercherRechercher  Dernières imagesDernières images  S'enregistrerS'enregistrer  Connexion  
-20%
Le deal à ne pas rater :
-20% Récupérateur à eau mural 300 litres (Anthracite)
79 € 99 €
Voir le deal

 

 Réinstallation services d'impression ?

Aller en bas 
3 participants
AuteurMessage
bird
Serveur X 10.4
Serveur X 10.4
bird


Nombre de messages : 162
Localisation : Azerat-Dordogne-Aquitaine-France-Europe-Planète terre
Date d'inscription : 07/04/2008

Réinstallation services d'impression ? Empty
MessageSujet: Réinstallation services d'impression ?   Réinstallation services d'impression ? EmptyLun 7 Avr - 17:36

Bonjour,

Suite à une coupure d'électricité et à la défaillance d'un onduleur, le Mac OS X Server (10.4.11) que j'utilise pour partager des ressources et gérer les imprimantes ne me permet plus de démarrer le service d'impression dans Admin Serveur.
Auriez-vous une idée de ce qu'il peut se passer et comment y remédier ?
Est-il possible de réinstaller ce service (je n'ai pas trop envie de réinstaller le système entièrement).

Merci par avance !
Revenir en haut Aller en bas
http://mloiseau.free.fr/blog
Alex_
Admin



Nombre de messages : 442
Localisation : Nantes_Fr
Date d'inscription : 13/11/2005

Réinstallation services d'impression ? Empty
MessageSujet: Re: Réinstallation services d'impression ?   Réinstallation services d'impression ? EmptyLun 7 Avr - 18:19

Bonjour Bird et bienvenue sur le forum cheers

pour ma part, j'avais sous le coude un petit memo sur la réinitialisation du service d'impression :

ce memo est extrait d'un topic sur le forum apple, avant qu'ils fassent le "ménage" et qu'ils suppriment certains sujets "sensibles"

je vous livre le fil tel quel… c'est en anglais…

Citation :
I've setup os x server (10.4.1) with a printer queue for a new printer (HP 1320n). First of all for some reason it's coming up as Generic Postscript printer instead of the name - and i can't find where to change that (even if i can). Secondly and the main thing is:

I've had it running for a couple of days then the queue stopped for no reason. I've been unable to restart it either from the server admin or command line (or cups web admin). Tried deleting the queue and creating another and the same problem... I've had to bypass the server and get the machines to talk directly to the printer - anyone have any ideas. Users have been on my case :/

_______________________

I have os X Server (10.3.9), and I have exactly the same problem with the queue stopping. I have a HP Colour Laserjet 5500 which has been working perfectly up until today when the queue stopped and will not restart. I have deleted the queue, created new ones, but to no avail. The othere queues are working fine. I can print directly to the printer but I need to go via my xserve as I enforce print quotas.

I do not know what to do...... anyone out there have any pointers?

_______________________

Here's the gold list of commands for resetting print queues:
First, start Terminal and ssh into the ailing server:

ssh -l root servername.domain.com

After you've logged in, copy and paste the following into Terminal:

/System/Library/StartupItems/PrintingServices/PrintingServices stop
rm -R /private/var/spool/cups/*
mkdir /private/var/spool/cups/tmp
/System/Library/StartupItems/PrintingServices/PrintingServices start
serveradmin stop print
serveradmin start print
serveradmin fullstatus print
serveradmin command print:command = getQueues
lpstat -p

The last command (lpstat -p) lists the queues on the server. On a one of my servers I got:

printer _10.123.1.236 disabled since Jan 01 00:00 -
        unable to create temporary file: No such file or directory
printer _10.123.1.244-1 is idle. enabled since Jan 01 00:00
printer PHOTOCOPIER disabled since Jan 01 00:00 -

Note that the date is January 1, so this server has a dead battery and/or problems synching to time.apple.com. Starting up with the wrong time can really screw up the various services, because they may start in 1970, but if timesync works, then they suddenly find themselves warping into 2005...and...hmmm...did you still want your print job 35 years later? We should replace the battery on this server, and make sure that the date and time stay current through a restart and shutdown.

But I digress...note the queue names that are disabled ("_10.123.1.236" and "PHOTOCOPIER") — these are the ones that are stuck. The previous copy-and-paste took care of deleting all print jobs and restarting all print services, so there's really no excuse for these queues to be stuck anymore. To get them going again, type the following (/usr/bin/enable queuename):

/usr/bin/enable _10.123.1.236
/usr/bin/enable PHOTOCOPIER

Now type another "lpstat -p" to see the current state of the queues:

printer _10.123.1.236 is idle. enabled since Jan 01 00:00
printer _10.123.1.244-1 is idle. enabled since Jan 01 00:00
printer PHOTOCOPIER is idle. enabled since Jan 01 00:00

Et voila! everything's back to normal again, and it took you all of 20 seconds to do it!

You can thank me later.

This works with both Panther and Tiger Server.

Oh! And I've discovered that server queues work best if they're set to Generic, rather than the correct printer PPD... (set to specific PPD, and get garbage; set to generic, and get your printouts)

_______________________

I copied the above message from one I had posted to my techs, so it included some extra commands that I'd explained verbally, but not in the email. After re-reading my Discussions posting, I realized I should elaborate...

/System/Library/StartupItems/PrintingServices/PrintingServices stop

This stops CUPS. Since we're about to trash all the queue files (which seem to pile up like crazy on Panther Server -- I had a CUPS folder with tens of thousands of items), it's always a good idea to do this and flush any outstanding jobs.

rm -R /private/var/spool/cups/*
     mkdir /private/var/spool/cups/tmp

Since I want the queues to get going again, and don't particularly care about the contents of the queues, I just delete everything in the cups folder and its tmp folder. I've had this process take several minutes (!!!!!) on a pretty fast server while tens of thousands of files get deleted. I've had cases where I was unable to delete all the files in cups and cups/tmp, because there were too many of them (there must be some limit, but I don't know what it is), so by using "rm -R" I bypass that problem. But then cups/tmp is deleted too, and I need to recreate it in order for the queues to work properly.

/System/Library/StartupItems/PrintingServices/PrintingServices start

Restart CUPS.

serveradmin stop print

Same as clicking the Stop button in Server Admin while viewing the Print screen. This stops the print server.

serveradmin start print

This restarts the print server.

serveradmin fullstatus print

This command isn't necessary, but it shows me if there are any issues with the print server.

serveradmin command print:command = getQueues

Again, this isn't necessary, but it'll show "PAUSED" for queues that aren't working.

lpstat -p

This is the important one! After resetting CUPS and the print server, if any of these queues are "disabled", then we can safely enable them now.

/usr/bin/enable [queuename]

You get the queue name from "lpstat -p" -- anything that's disabled isn't working. You could enable the printer in Printer Setup Utility, but since we're already here in Terminal, we might as well do it here.

_______________________

That's fabulous, Joachim, that last line means one doesn't have to write individual /usr/bin/enable lines for each queue.

I wasn't able to get the print queues to fully re-establish themselves on LPR/Bonjour/Rendezvous unless I also added the

serveradmin stop print
     serveradmin start print

lines. My new "/bin/resetqueues" script, thanks to you, is therefore:

/System/Library/StartupItems/PrintingServices/PrintingServices stop
rm -R /private/var/spool/cups/*
mkdir /private/var/spool/cups/tmp
/System/Library/StartupItems/PrintingServices/PrintingServices start
serveradmin stop print
serveradmin start print
/usr/bin/enable `lpstat -p | grep 'disabled' | awk '{ print $2 }'`

I'm also having trouble getting the queues to come up on restart, and have to manually run the resetqueues command. I haven't delved too far into it, but I suspect a simple "serveradmin stop/start print" sequence (or just the resetqueues script) would clear any process stuck on startup.

_______________________

I use it on lab computers, OSX clients with different printers, good with a generell enable for any printer.

I tell everybody to restart before asking me for help, therefore its good to have a startupscript cleaning the queues.

In the StartupItems-folder, I made a "BootUP" folder with the script (named "BootUP") and a StartupParameters.plist containing only:

{
  Description = "BootUP_script";
  Provides = ("stuff");
  Uses = ("");
}

Step by step....were getting there :-)

_______________________

Ah! If you're resetting server queues, though, you'll need the extra commands. I suppose your script would work very well to clear client queues too.

Well done!
Revenir en haut Aller en bas
http://www.erba-nantes.fr
bird
Serveur X 10.4
Serveur X 10.4
bird


Nombre de messages : 162
Localisation : Azerat-Dordogne-Aquitaine-France-Europe-Planète terre
Date d'inscription : 07/04/2008

Réinstallation services d'impression ? Empty
MessageSujet: Re: Réinstallation services d'impression ?   Réinstallation services d'impression ? EmptyMar 8 Avr - 11:35

Bonjour,

Ce matin, je me suis collé à tout cela et rien à faire pour faire refonctionner les services d'impression. Est-il normal d'avoir un printer.plist (Système --> Bibliothèque --> LaunchDaemons ) vide ?
Revenir en haut Aller en bas
http://mloiseau.free.fr/blog
Alex_
Admin



Nombre de messages : 442
Localisation : Nantes_Fr
Date d'inscription : 13/11/2005

Réinstallation services d'impression ? Empty
MessageSujet: Re: Réinstallation services d'impression ?   Réinstallation services d'impression ? EmptyMar 8 Avr - 12:25

Citation :
Est-il normal d'avoir un printer.plist (Système --> Bibliothèque --> LaunchDaemons ) vide ?

non, ce n'est pas normal
par contre, quelle est la date de modification de ce fichier ?
quels sont les droits ?
tu devrais avoir
Code:
-rw-r--r--  1 root  wheel  729 Sep 11  2006 printer.plist
ce fichier devrai se générer par le biais d'admin serveur à chaque changement de config du service d'impression

as-tu des logs plus précis sur ce qui se passe lors de la mise en route du service d'impression afin que l'on puisse cerner un peu mieux où sa coince ?
Revenir en haut Aller en bas
http://www.erba-nantes.fr
bird
Serveur X 10.4
Serveur X 10.4
bird


Nombre de messages : 162
Localisation : Azerat-Dordogne-Aquitaine-France-Europe-Planète terre
Date d'inscription : 07/04/2008

Réinstallation services d'impression ? Empty
MessageSujet: Re: Réinstallation services d'impression ?   Réinstallation services d'impression ? EmptyMar 8 Avr - 12:36

Ah ! Je crois m'en être sorti mais en usant d'une méthode un peu... bourrin. J'ai récupéré un printer.plist sur un poste client, je l'ai placé sur le serveur en remplaçant le plist endommagé (vraiment vide, plus rien) et j'ai redémarré le serveur. Je n'y croyais pas beaucoup mais tout est reparti !
Maintenant, je redéfinis les imprimantes et reconstruits les partages. Quelle affaire ! Smile
Revenir en haut Aller en bas
http://mloiseau.free.fr/blog
Alex_
Admin



Nombre de messages : 442
Localisation : Nantes_Fr
Date d'inscription : 13/11/2005

Réinstallation services d'impression ? Empty
MessageSujet: Re: Réinstallation services d'impression ?   Réinstallation services d'impression ? EmptyMar 8 Avr - 12:43

bien joué d'avoir ciblé ce fichier…
tu as visé juste !
Revenir en haut Aller en bas
http://www.erba-nantes.fr
bird
Serveur X 10.4
Serveur X 10.4
bird


Nombre de messages : 162
Localisation : Azerat-Dordogne-Aquitaine-France-Europe-Planète terre
Date d'inscription : 07/04/2008

Réinstallation services d'impression ? Empty
MessageSujet: Re: Réinstallation services d'impression ?   Réinstallation services d'impression ? EmptyMar 8 Avr - 13:38

Ce n'est pas de la maintenance très délicate mais bon, le résultat est là. Et merci pour le coup de main et les pistes de recherches !
Revenir en haut Aller en bas
http://mloiseau.free.fr/blog
Franck Mereo (zekiller28)
Admin
Franck Mereo (zekiller28)


Nombre de messages : 3039
Age : 50
Localisation : Paris
Date d'inscription : 09/10/2006

Réinstallation services d'impression ? Empty
MessageSujet: Re: Réinstallation services d'impression ?   Réinstallation services d'impression ? EmptyLun 14 Avr - 12:03

Vérifie bien les droits sur le fichier copié surtout !!!
Revenir en haut Aller en bas
bird
Serveur X 10.4
Serveur X 10.4
bird


Nombre de messages : 162
Localisation : Azerat-Dordogne-Aquitaine-France-Europe-Planète terre
Date d'inscription : 07/04/2008

Réinstallation services d'impression ? Empty
MessageSujet: Re: Réinstallation services d'impression ?   Réinstallation services d'impression ? EmptyLun 14 Avr - 14:13

Pas de souci, tout fonctionne.
Revenir en haut Aller en bas
http://mloiseau.free.fr/blog
Franck Mereo (zekiller28)
Admin
Franck Mereo (zekiller28)


Nombre de messages : 3039
Age : 50
Localisation : Paris
Date d'inscription : 09/10/2006

Réinstallation services d'impression ? Empty
MessageSujet: Re: Réinstallation services d'impression ?   Réinstallation services d'impression ? EmptyLun 14 Avr - 17:24

cheers cheers
Revenir en haut Aller en bas
Contenu sponsorisé





Réinstallation services d'impression ? Empty
MessageSujet: Re: Réinstallation services d'impression ?   Réinstallation services d'impression ? Empty

Revenir en haut Aller en bas
 
Réinstallation services d'impression ?
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» Control panel pour services web
» Configurer les services utilisation locale + qlq internet

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
Forum Mac Os X server :: Services d'impressions-
Sauter vers:  
Ne ratez plus aucun deal !
Abonnez-vous pour recevoir par notification une sélection des meilleurs deals chaque jour.
IgnorerAutoriser