The CUPS server could not be contacted.

Soldato
Joined
16 Dec 2005
Posts
14,443
Location
Manchester
Arrrrgh!!!

OK, with that out the way, down to business.

For some reason my Ubuntu Feisty Fawn install suddenly throws "The CUPS server could not be contacted." at me whenever I try to access the System > Administration > Printing page.

It worked just fine a day or two ago. Now it doesn't.

The only thing I have changed was the installation of SWAT. Perhaps something I did there messed up the CUPS program... or something.

I removed and reinstalled samba and anything releated to cups and cupsys.

I have tried EVERYTHING I have found with a Google search of "The CUPS server could not be contacted."

I am at a complete loss. I really do not want to have to reinstall as that would be a monumental pain in the arse.

All help welcomed :)
 
First off, is cups actually running on your machine? Is there anything showing up in the cups logs? Is it listening on port 631? (doing netstat -antp | grep 631 should confirm this).

Also does running cupsd from the commandline as:

/usr/sbin/cupsd -f -c /etc/cupsd/cups.conf

generate any output?

Finally I found a cached experts exchange thread that suggested this problem was caused by SWAT upgrading libraries and upgrading to the latest version of CUPS fixed it.
 
aeternum@windwardx$ sudo ps ax | grep "cups"
10533 ? Ss 0:00 /usr/sbin/cupsd

So cupsd appears to be running.

aeternum@windwardx$ sudo netstat -antp | grep 631
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 10533/cupsd

Again, it appears to be running.

aeternum@windwardx$ sudo /usr/sbin/cupsd -f -c /etc/cupsd/cupsd.conf
Message from syslogd@windwardx at Mon Jul 9 11:37:09 2007 ...
windwardx cupsd: Unable to read configuration file '/etc/cupsd/cupsd.conf' - exiting!

OK now there appears to be some problem... There is definitely a cupsd.conf file and the path to it is correct. The contents of the cupsd.conf also appear to be correct [no obvious errors/corruption.]

Finally I found a cached experts exchange thread that suggested this problem was caused by SWAT upgrading libraries and upgrading to the latest version of CUPS fixed it.

I have completely removed CUPS, Samba and Swat [using purge option] and reinstalled Samaba and CUPS fresh. Everything is at the latest version [according to Synaptic].
 
Is your virtual network device set up ok? Do you have any IP loopback configuration issues? Normally a symptom of this is other GUI tools like the console taking ages to open.
 
Is there any definitive test I can use to check my virtual network devices?

Seeing if my Terminal opens quickly [which it does] or not seems a rather inconclusive way of going about it :p
 
I had an issue with my IP loopback at first and certain applications failing to load... Make sure it is in this format:

Code:
[sam@sam foldingathome]$ more /etc/hosts
#
# /etc/hosts: static lookup table for host names
#

#<ip-address>   <hostname.domain.org>   <hostname>
127.0.0.1               localhost.localdomain   localhost sam

# End of file
 
M0KUJ1N said:
Can you access the CUPS web interface at localhost:631?

The last time I tried [earlier today] I could. I am not at my linux machine at this exact moment though so I can't tell you for sure.

@Bes

I will check that too in a little while when I am at the linux machine.
 
OK

Just had a look now and http://localhost:631/ does give me access to a config page. Just had a little mess about and it appears it would let me add a printer. Not actually tried yet as 1: my printer isn't listed and 2: the options are a little confusing. However, the main thing is I can actually access it.

Make me wonder why going System > Admin > Printing doesnt work!

As for my hosts file:

aeternum@windwardx:~$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 windwardx

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

It looks different to your example. Could it be a disto-related difference or is it knackered in some way?
 
HURRAH!

I have solved it! And it was a very silly trivial thing too!

My printer was installed as a network printer, however the print server wasn't running so no longer existed as far as my CUPS/drivers were concerned!

Just deleted the ServerName line in my client.conf and all is well.

Just need to remember how I managed to install the printer in the first place :p
 
Back
Top Bottom