Thanks Patrick. This solves half of my problem - failing
over to the 2nd server if the 1st is either down or the 
daemon is not running.

The 2nd part of my question deals with when all printers
are not setup on all servers. For example server1 knows
1/2 of the existing printers and server2 the remaining 1/2.

What I am trying to do was: Look for server1 (system is up
and daemon is running) and if nothing matches look for server2
and so on.

If I stop the daemon on the 1st server then what you've suggested
below works.









Regards,

Mohamed

-----Original Message-----
From: Patrick Powell [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 10, 2001 7:42 PM
To: [EMAIL PROTECTED]
Subject: Re: LPRng: How to setup print server redundancy/redundancy


> From [EMAIL PROTECTED] Fri Nov 30 16:02:31 2001
> From: "Osman, Mohamed" <[EMAIL PROTECTED]>
> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> Subject: LPRng: How to setup  print server redundancy/redundancy
> Date: Fri, 30 Nov 2001 15:08:22 -0800
>
> Hi,
>
> I have few centralized UNIX Print Servers with lprng and 
> several hundreds UNIX clients that use them. The print
> servers in turn send the jobs via LPD to Windows Print
> Servers. The reason that was done this way is that we
> do not maintain the Windows servers.
>
> So a typical printcap on the clients looks like this:
>
> *:\
> :sd=/var/spool/lpd/printers:\
> :mx#0:\
> :sh:\
> :rm=server-name
>
> This works as you expect, but we wanted to route
> the jobs (fail over to other servers) if the above
> server were to crash w/o impacting the users.
>
> I have updated the printcap file to look like this:
>
> *:\
> :sd=/var/spool/lpd/printers:\
> :mx#0:\
> :sh:\
> :rm=server1
> #
> *:\
> :sd=/var/spool/lpd/printers:\
> :mx#0:\
> :sh:\
> :rm=server2
>
> The intention was if a particular printer is not available on
> server1 then server2 will be searched, or if server1 was down
> then all jobs will be routed to server2. That's not was is 
> happening. At all time only server2 is searched, in other words
> the last entry is the one looked at.
>
> Has anyone attempted doing similar thing? Is there anything in
> the documentation that deals with this issue that I have overlook
> at?

Yes.  In fact, you should try:

 lp|*:\
 :sd=/var/spool/lpd/printers:\
 :mx#0:\
 :sh:\
 :lp=%Q@server1,server2:force_localhost@

For example:

lp|*:
 :sd=/var/tmp/LPD/printers:
 :mx#0:
 :db=lpr+4
 :sh:
 :[EMAIL PROTECTED],10.0.0.11:force_localhost@

Here is a sample of output with a 'failed' connection:

Printer: lp is [EMAIL PROTECTED],localhost
lp: getconnection: START host 10.0.0.9, timeout 10, connection_type 1
lp: getconnection: fqdn found 10.0.0.9, h_addr_list count 1
lp: Link_dest_port_num: port 4000 = 4000
lp: getconnection: AGAIN port 0, min 0, max 0, count 0, connects 0
lp: getconnection: connection to '10.0.0.9' timed out
lp: getconnection: connection to '10.0.0.9' socket -9, errormsg 'Operation
timed out'
lp: getconnection: START host 10.0.0.11, timeout 10, connection_type 1
lp: getconnection: fqdn found 10.0.0.11.my.domain, h_addr_list count 1
lp: Link_dest_port_num: port 4000 = 4000
lp: getconnection: AGAIN port 0, min 0, max 0, count 0, connects 0
lp: getconnection: sock 3, src ip 127.0.0.1, port 1884
lp: getconnection: dest ip 10.0.0.11, port 4000
lp: getconnection: connection to '10.0.0.11' socket 3, errormsg 'No Error'
lp: Link_send: host '10.0.0.11' socket 3, timeout 30
lp: Link_send: str '^Dt1
', count 4, ack 0x0
lp: Link_send: final status NO ERROR
Printer: t1@h110 'Test Printer 1'
 Queue: no

Patrick

>
>
>
>
> Thanks,
>
>
> =====================================
> Mohamed Osman
> NW Engineering Computing
> Intel Corp
> Email:    [EMAIL PROTECTED]
> =====================================
>
>
>
----------------------------------------------------------------------------
-
> YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
> The address you post from MUST be your subscription address
>
> If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
> or lprng-digest-requests) with the word 'help' in the body.  For the
impatient,
> to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
> with:                           | example:
> subscribe LIST <mailaddr>       |  subscribe lprng-digest [EMAIL PROTECTED]
> unsubscribe LIST <mailaddr>     |  unsubscribe lprng [EMAIL PROTECTED]
>
> If you have major problems,  send email to [EMAIL PROTECTED] with the
word
> LPRNGLIST in the SUBJECT line.
>
----------------------------------------------------------------------------
-
>

----------------------------------------------------------------------------
-
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the
impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:                           | example:
subscribe LIST <mailaddr>       |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr>     |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
----------------------------------------------------------------------------
-

-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address

If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body.  For the impatient,
to subscribe to a list with name LIST,  send mail to [EMAIL PROTECTED]
with:                           | example:
subscribe LIST <mailaddr>       |  subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr>     |  unsubscribe lprng [EMAIL PROTECTED]

If you have major problems,  send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------

Reply via email to