CUPS server could not be contacted

Bug #28812 reported by Weman
This bug report is a duplicate of:  Bug #33173: kdeprint can not contact cups. Edit Remove
8
Affects Status Importance Assigned to Milestone
Ubuntu
Invalid
High
Unassigned

Bug Description

Breezy Badger 5.10
I cannot access "system/administration/printers" without getting the message "The CUPS server could not be contacted"

I have tried "/etc/init.d/cupsys restart" and get the response:
"* Restarting Common Unix Printing System: cupsd [ ok ]" so there it is and I can see it in the "Service management tool".

I have tried to reinstall all CUPS part I can find in "Synaptic package manager".
I have tried "http://localhost:631" and from there I could send at test page, so again I have it, but it did not fix anything.

I have found others i ubuntuforum with similar problem, one of them posted to my thread and told that he got rid of the problem by complet reinstall and then not accepting updates for packages.

I have tried every hint I have found in the forum and by google. Neither gnome or KDE can access CUPS though the CUPS is there and running.

I have an older PC with Breezy 5.10 that works fine, the difference between the two PC-s is some more programs installed on the troublesome one. Which programs that is, you can see in my thread at the forum: http://ubuntuforums.org/showthread.php?t=105423&page=2

It feels like a BUG.

Kind regards. / Weman

Revision history for this message
BertJan (bertjanbakker) wrote :

I can confirm this bug.
I observed this bug from kubuntu dapper flight 2
and flight 3 both out-of-the-box.

Right after install go to systemsettings,
choose printers and immediately ran into this bug. I checked that the cupsd was running and also that it has a listening socket on port 631 for localhost.

Another thing is that when I (by mistake) tried to use a blank hostname field for the print server the whole systemsettings application hung!

I also tried to start systemsettings as root
but I got the same behaviour.

Revision history for this message
Martin Pitt (pitti) wrote :

can you please do the following:

 * open a terminal and run 'gnome-cups-manager'. This starts the manager, but you can see messages on the terminal. Please paste them here.

 * Please send /var/log/cups/error_log after the above.

Thanks!

Revision history for this message
Weman (w-ake) wrote :

Here is the cups manager, the command brings out the small message window that says "Cups serve could not be contacted":

ake@w-dell:~$ gnome-cups-manager

** (gnome-cups-manager:7692): WARNING **: IPP request failed with status 1280
ake@w-dell:~$

And here is the error_log:
I [26/Jan/2006:19:12:00 +0100] Listening to 0:631
I [26/Jan/2006:19:12:00 +0100] Loaded configuration file "/etc/cups/cupsd.conf"
I [26/Jan/2006:19:12:00 +0100] Configured for up to 100 clients.
I [26/Jan/2006:19:12:00 +0100] Allowing up to 100 client connections per host.
I [26/Jan/2006:19:12:00 +0100] Full reload is required.
I [26/Jan/2006:19:12:01 +0100] LoadPPDs: Read "/etc/cups/ppds.dat", 4105 PPDs...
I [26/Jan/2006:19:12:01 +0100] LoadPPDs: No new or changed PPDs...
I [26/Jan/2006:19:12:01 +0100] Full reload complete.

Good luck / Weman

Martin Pitt (pitti)
Changed in gnome-cups-manager:
status: Needs Info → Unconfirmed
Revision history for this message
Erik (eramseth) wrote :

I had this problem initially. (I didn't upgrade, but rather reinstalled a fresh kubuntu).

 When I opened the printer settings it gave me the error, but then I tried to add a new printer, added it, and I no longer get the error. I am not sure what would have caused it. I will post this on the bug report as well.

Revision history for this message
Foaming Draught (foamingdraught) wrote :

Gnome under GDE on Dapper Flight3:

"IPP request failed with status 1030"

But it's a locally-attached USB printer (Epson CX5100) which works fine under Breezy, and which is detected by HAL and shows up properly on lsusb.
I can't persuade localhost:631 that I have a usb port, leave alone a printer on it. USB is working for every other device.
If I go back to Breezy everything's rosy again, so I'd guess that the new Gutenprint drivers might be implicated on Dapper?

Revision history for this message
weatherman (thaw) wrote :

Hi, got the same problem here. I'm on kubuntu dapper (flight 4) with a usb attached samsung ML 1520.
When I go on System Settings -> Printers I get:
"Unable to retrieve the printer list. Error message received from manager:
Connection to CUPS server failed. Check that the CUPS server is correctly installed and running. Error: host not found."
My CUPS is running fine.

Revision history for this message
Txukie (albertodetena) wrote :

Same here as Waterman, running Kubuntu 6.04, cups works fine but KDE print can't connect to it! Been like that for several weeks now. localhost:631 works perfectly, I can print with non-KDE apps (like Firefox or OpenOffice) but not with the rest of them.
This bug is very real, VERY annoying and has been there for way too much time! Please somebody fix this!

Changed in gnome-cups-manager:
status: Unconfirmed → Confirmed
Revision history for this message
zikade (kfischer) wrote :

I do remenber that within kubuntu KDE tried to contact cups via socket, after I changed it I could print.

Revision history for this message
Robert Wood (vze22st7) wrote :

Running Dapper in gnome I can print test page as well as from internet but not within system applications or files. My printer is canon bjc-2110 with usb connection.

Revision history for this message
Txukie (albertodetena) wrote :

Ive tried setting cupsys config (through dpkg --reconfigure cupsys) to localhost:631 and to socket with no difference whatsoever.

Revision history for this message
BasWillems (bas-sefcom) wrote :

Hello,

I got similiar problems.
i solved it by changing the server path in the kprinter manager menu.
(Kubuntu).
In the System settings -> Printers -> Printer Manager -> Configure Manager -> CUPS server.

Change the server from/ var/run/cups/cups.sock to localhost or 127.0.0.1
After that i installed the printer and made sure my user was allowed to print.

Everything worked fine after i changed these settings...

Revision history for this message
daniel2501 (daniel2501) wrote :

Thanks for the Kubuntu tip! Works perfectly. I was really pulling my hair out...

Revision history for this message
Reinhard (reinhard-fischerconsult) wrote :

Same here, no connection from Printer Manager to cups - until I added a printer using http://localhost:631 - then it suddenly worked. (I had already localhost as server address (BasWillems post))

Revision history for this message
Martin Pitt (pitti) wrote :

It seems that most of you guys use KDE; kdeprint is currently known broken with cups (see bug 33173).

Do you still get this issue with gnome-cups-manager under Gnome? It's working just fine on both of my boxes.

Martin Pitt (pitti)
Changed in gnome-cups-manager:
status: Confirmed → Needs Info
Revision history for this message
Weman (w-ake) wrote :

Hi Martin, I'm not sure what you mean. In the bug report at the beginning of this thread I explain that I cannot access System>Administration>Printers without error message. I guess that is a part of Gnome.

Revision history for this message
George Tar (gtaranti) wrote :

I have the exact same problem.

I can print with the CUPS web interface a test-page but I get the "CUPS server could not be contacted" message when I try to access System->Administration->Printing.

Revision history for this message
George Tar (gtaranti) wrote :

I resolved the problem following the
<a href="http://occy.net/printing">Advice here</a>

and adding the local IP address 192.168.1.* to the Allowed clients in

<Location />
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From 10.10.0.*
</Location>

..block.

Everything then were back to normal.
I can access System->Admin->Printing w/o errors about CUPS Server.

Revision history for this message
Weman (w-ake) wrote :

Thank's for the hint George, I tried it, but no luck there either.

/ Weman

Revision history for this message
essexman (ralphsmail) wrote :

Thanks George - But not Luck for me (I got all excited!).

Martin - this is a problem for me in Kubuntu and Ubuntu 6.04 FL4
I posted it some weeks ago as gnome-cups-manager, but this can't be the problem.

However, the recent upgrade to FL5 has meant I can't even set it up via cups

Revision history for this message
oblio (kbros) wrote :

Posted in Kubuntu-Forum:

   [solved] Connection to CUPS server fails...
« on: March 03, 2006, 01:48:22 pm » Reply with quote Modify message Remove message
Hi,

Unable to "add printer" in Kubuntu 6.04 Dapper Drake Flight 4 (aka Flight 4 henceforth) , right after installation on HD :

"Unable to retrieve the printer list. Error message received from manager:
Connection to CUPS server failed. Check that the CUPS server is correctly installed and running. Error: host not found".

I noticed this also on the Flight 3 installation, and on a recent Kubuntu 6.04 AMD64 installation (build 24.02.2006). I did not find a cure for it. I have never seen this failure in any linux distro that I tried.

{Added # 1}
After learning elsewhere that there might be a wrong entry in System Settings | Printers | Print Manager | Configure Manager | Cups Server under "Host" like "/var/run/cups/cups.sock". It needed to changed to "localhost".
I did so. But the problem of not being able to add a printer is more persistent (although the error message has now - at the end) :

"Unable to retrieve the printer list. Error message received from manager:
Connection to CUPS server failed. Check that the CUPS server is correctly installed and running. Error: the IPP request failed for an unknown reason".

{Added # 2}

After some additional research :

In /etc/cups/cupsd.conf make the following change:

comment out the line:
AuthType Basic
in the <Location/admin> section at the bottom of the file (comment out
with #'s). Then, restart CUPS.

After this I could add my HP Laserjet 4M (parallel connected) and Epson C44UX (USB) like I always could in any debian-based distro. Only thing left: the installed printers did NOT show up immediately under "installed printers".
I had to exit System Settings and open again; then they were there.

Problem solved (at least for me). Apparently much more people have encountered this problem in some K/Ubuntu version.

Ko

Revision history for this message
Martin Pitt (pitti) wrote :

Ok, if this is all about *Kubuntu*, then this is known as bug 33173, closing as duplicate. The bug was assigned to gnome-cups-manager.

Changed in gnome-cups-manager:
assignee: pitti → nobody
status: Needs Info → Rejected
Revision history for this message
Weman (w-ake) wrote :

Well I believe I started this #28812 and I am sure using Ubuntu Breezy Badger and have installed all updates that have been offered by the automatic distribution.

Still can't contact CUPS from the menu System>administration>printers but gets the message "cups serve could not be contacted"

/ Weman

Revision history for this message
iik (ilari) wrote :

I got also the same problem. The solution for me, was to set up the lo device (local loopback). That should be done at boot time, but for some reason it does not work at my Ubuntu. Check your Network devices at Terminal Promt by typing "sudo ifconfig -a". If you would not get loopback address 127.0.0.1, your loopback device is down. Set it up by typing "sudo ifconfig lo 127.0.0.1". For me that was also the reason for many other problems. "Netstat -noap" -command reveals you that CUPS server uses 127.0.0.1 loopback.

Revision history for this message
ShamrockUK (uplift) wrote :

Thanks iik, ifconfig -a and then ifup lo did the job for me.

Revision history for this message
Ivica Petrinic (ivicap) wrote :

I couldn't start gnome-cups-manager as well, until i edited client.conf:
sudo gedit /etc/cups/client.conf

and changed whatever name of the server to:
ServerName localhost

After that I restarted cupsys:
sudo /etc/init.d/cupsys restart

and now I can use gnome-cups-manager again!

Revision history for this message
Weman (w-ake) wrote : Re: [Bug 28812] Re: CUPS server could not be contacted

Ivica Petrinic wrote:

>*** This bug is a duplicate of bug 33173 ***
>
>I couldn't start gnome-cups-manager as well, until i edited client.conf:
>sudo gedit /etc/cups/client.conf
>
>and changed whatever name of the server to:
>ServerName localhost
>
>After that I restarted cupsys:
>sudo /etc/init.d/cupsys restart
>
>and now I can use gnome-cups-manager again!
>
>
Hi, that did it, many thanks.
Kind regards / Weman

Revision history for this message
Weman (w-ake) wrote :

Thanks very much for that final hint.

It FINALLY SOLVED my problem.

The default line is "#ServerName myhost.domain.com". It is commented out and I think I have tried it and some other lines without luck.

So, is this the heart of the bug that has been bugging me since late last year?

My ubuntu machine is smiling again.

/ Weman

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.