[cups.general] CUPS failover mechanism: clients connect to IP, not hostname?!

Michael Sweet msweet at apple.com
Wed Feb 3 10:00:41 PST 2010


On Feb 3, 2010, at 12:43 AM, sillmann at micronas.com wrote:
> As we have a need for 24/7 CUPS printing at my compnay, we do have two CUPS servers installed which should run in active/standby. Therefore we have a CNAME configured, say cups.example.com. This CNAME points to either cups1.example.com or cups2.example.com.
> 
> Now that I've switches the CNAME for the first time, it turns out that the CUPS clients do not connect to the new server automatically. Maybe this is because the cups-polld daemon is invoked with the IP address specified as parameter, e.g.
> 
> cups-polld 172.27.207.32 631 3607 631
> 
> In cupsd.conf I have NOT specified an IP address, I specified the CNAME.
> 
> Who do I configure CUPS (or DNS) in a way that changes to the CNAME are reflected on the clients?

Depending on the version of CUPS you are using, cups-polld will either stay with a single address for the life of the process or try them all when a connection fails.  If the server goes down gracefully, cups-polld will notice the loss of connection and attempt to reconnect, otherwise you have a 5 minute delay before it tries to connect again, which can take up to 5 minutes per host until a connection is found. (5 minutes is the default TCP timeout...)

If you are polling, don't bother with the CNAME and just use two BrowsePoll lines:

    BrowsePoll server1
    BrowsePoll server2

Then both servers can be live and the clients will just ping-pong between them.

___________________________________________________
Michael Sweet, Senior Printing System Engineer







More information about the cups mailing list