kanotix.com

General Support - Applications can't connect to CUPS

Ashton - 09.10.2006, 23:59 Uhr
Titel: Applications can't connect to CUPS
There have been a lot of CUPS-related complaints over the past several months. I've searched through them and not found resolution. Here's the situation:

After a recent dist-upgrade, printing was broken. I could install printers from the web interface (local via a parallel cable and others over local network), and could print test pages. However, the usual apps are unable to connect to CUPS. I get the following Kprinter error:
An error occurred while retrieving the printer list:

Connection to CUPS server failed. Check that the CUPS server is correctly installed and running. Error: localhost: read failed (15).

I attempted the apt-get --purge / reinstall approach for CUPS mentioned elsewhere in the forums; this didn't help. This almost seems like a permissions problem. Any thoughts or suggestions for resolving it would be greatly appreciated.
hubi - 10.10.2006, 00:01 Uhr
Titel:
Could you please post your version of cupsys?
Code:
dpkg -l cupsys

hubi
Ashton - 10.10.2006, 00:05 Uhr
Titel:
Thanks for the quick reply, Hubi:
cupsys 1.2.4-2
hubi - 10.10.2006, 00:29 Uhr
Titel:
If you have not tried http://localhost:631 before, it might be of use. I had to reinstall all my printers this way, and since then they are up and running. I used the same version as you have, but they were all connected through USB, did not try network printers.

Btw, newest is: cupsys 1.2.4-2+b1. Came in yesterday I suppose, but no issues yet here.

Hope it works,
greetings
hubi
Swynndla - 10.10.2006, 01:40 Uhr
Titel:
I share my one usb printer to my other pc's ... I set it up yesterday and I couldn't believe how easy it was. I went to http://localhost:631 in konquror like hubi says and added my printer and it worked with no problems. Then I selected the Administration tab and selected:
x Share published printers connected to this system
x on Allow remote administration
x on Allow users to cancel any job (not just their own)
... and now my other networked pc's see and print to the printer with me having to do anything to the networked pc's (well I did have to install cups on one of them as it didn't have it).

Ashton, okay I know that doesn't help you, but I could help but mention it. In fact reading your post carefully it seems that you had done all this before the dist-upgrade.

But if it really is a permission problem, then does an app started as root have the same problems? ... eg from Konsole, use sux (not su) to get to root and start say kwrite ... does that print? If not then maybe it's not a permissions problem as such?

I guess you've tried commenting out the line:
Listen /var/run/cups/cups.sock
in /etc/cups/cupsd.conf ?
gardyloo - 10.10.2006, 06:37 Uhr
Titel: Re: Applications can't connect to CUPS
Ashton hat folgendes geschrieben::
There have been a lot of CUPS-related complaints over the past several months. I've searched through them and not found resolution. Here's the situation:

After a recent dist-upgrade, printing was broken. I could install printers from the web interface (local via a parallel cable and others over local network), and could print test pages. However, the usual apps are unable to connect to CUPS. I get the following Kprinter error:
An error occurred while retrieving the printer list:

Connection to CUPS server failed. Check that the CUPS server is correctly installed and running. Error: localhost: read failed (15).

I attempted the apt-get --purge / reinstall approach for CUPS mentioned elsewhere in the forums; this didn't help. This almost seems like a permissions problem. Any thoughts or suggestions for resolving it would be greatly appreciated.


Though I can't help in any meaningful way, I'll say that I've run into just the same problem recently (and tried the same fixes). If I do a
Code:
sudo /etc/init.d/cupsys restart
and then try printing, things usually go through OK, THE FIRST TIME. After that, it's pretty much a tossup as to whether things will print from then on (when they don't, it's with the same error message you quote above).

Best of luck.
Ashton - 10.10.2006, 14:25 Uhr
Titel:
Good morning; a big thanks to all who replied! Clearly CUPS is a problem for many of us.

Specific responses:

hubi: (Wow, Budapest - I spent a great two weeks in the summer of '92 in Budapest; it's one of my favorite European places!) I used http://localhost:631 to set things up. Within the administration tools there I can connect to my printers and even print test pages. However, Kprinter simply can't interface with CUPS, and therefore neither can my other applications. If I switch to Administrator mode in Kprinter, I can see my printers but I still can't do basic things, like restart the print server.


Swynndla: CUPS has worked fine for me for several years, including most of the past 18 months or so that I've used Kanotix. And it really works great, or at least it did. It's been in the past month or so that I've had problems.

Your question about root was a good one, and I tried your suggestion. Root is also unable to print; I get the same error. Interestingly, I can print test pages from http://localhost:631, so the problem seems to be miscommunication between CUPS and the rest of the system, not CUPS and the printers. And this miscommunication includes root, so it's not a permissions thing. Does anybody have any thoughts on this?


gardyloo: Your error seems similar to mine. I've tried restarting the CUPS server (from the command line as root, as you suggest) with no luck - not even the first time. Either a bunch of us have screwed up our systems in similar ways, or there are real problems with CUPS now.
piper - 10.10.2006, 16:12 Uhr
Titel:
Have you tried this

modprobe lp
echo lp >> /etc/modules
apt-get remove --purge cupsys
apt-get install cupsys or apt-get install cupsys cupsys-driver-gutenprint hplip

then go to http://localhost:631/

this is the only thing that works for me
Ashton - 10.10.2006, 20:43 Uhr
Titel:
Hello Piper, I've tried some variants on that. Just now I tried it exactly the way you suggest, but printing continues to fail to work. Currently I am getting no errors when I try to print from, say, Kwrite. However, it doesn't see any printers, even though several are installed via localhost:631.

Starting Kprinter gives the usual error about being unable to connect to CUPS.

At this stage would it make sense to dump CUPS and try LPD? Printing isn't the main thing I do on this computer, but it is kind of required.
DeepDayze - 11.10.2006, 02:47 Uhr
Titel:
That can work...but you will lose the flxibility of CUPS. LPD is older and simpler and there are much fewer drivers available for printers
Ashton - 11.10.2006, 17:23 Uhr
Titel:
Thanks DeepDayze. I've messed around with the settings. So far printing works - even over the network - but does not look very pretty.

For others in a similar bind, call this a PARTIAL SOLUTION: Instead of CUPS, use an alternative print server inside kprinter. Setup is similar, though much more limited, as DeepDayze indicates.

Thanks to all for your help! I will continue lurking, and hopefully CUPS will fix itself soon.
DeepDayze - 11.10.2006, 17:32 Uhr
Titel:
Not sure if you can use LPD printing system alongside CUPS...is that possible?
jlowery - 12.10.2006, 21:28 Uhr
Titel:
In my case kprint is the issue currently not CUPS.

Easiest thing I have found is to:

apt-get install gnome-cups-manager

kdesu gnome-cups-manager

I was able to install printer this way. Firefox and OpenOffice seem to work ok printing. KDE specific apps won't work.
bluewater - 13.10.2006, 05:08 Uhr
Titel:
Have a quick check in Control Centre>Periphs>Printers, bottom right hand corner see what "Server" is showing if its showing "Server cups.sock" go to this thread


http://kanotix.com/PNphpBB2-viewtopic-t ... rt-75.html
http://kanotix.com/PNphpBB2-viewtopic-t ... r-asc.html
glennthigpen - 17.10.2006, 02:14 Uhr
Titel:
I cannot get kprint to connect with the cups server. I get this message "Connection to CUPS server failed. Check that the CUPS server is correctly installed and running. Error: localhost: read failed (15)." This was on a fresh install of kanotix 2006.1 rc4.
I have similiar problems with debian sid. I cannot even install my samsung networked laser printer using the cups web interface. Something is screwed up with cups 1.2.4 and kprint 3.5.x
drb - 17.10.2006, 19:50 Uhr
Titel:
I had the same kprinter error message; all I did was logged into administrator mode and my printers appeared and I was able to manage them withput any problems.

drb
CrashedAgain - 18.10.2006, 00:25 Uhr
Titel:
It gets worse: I have now had printers fail on three independent systems:

After having my 2005-04 system fail following a dist-upgrade (see previous post http://kanotix.com/index.php?name=PNphp ... highlight= ) I have installed 2006-01-RC3. I then did a dist-upgrade & installed several packages which are not included with Kanotix (tuxracer, some wine-apps, & many others...long list but I don't think it's relevant) including the lastest openoffice from unstable. I had problems installing printers ("unable to connect to cups server..." problem which appears to be common) but printers installed OK using hp installer ("sudo hp-setup") & then cups seemed to be working & printers showed up in Control Center & tested OK.

I now have three separate systems installed:

1. An old Kanotix BH9 system on hda8 using hda5 as a home directory. This system has not been upgraded for some time & was working reliably.
2. New 2006-01 system on hdb3
3. A clone of the BH9 system on hdb4 but with home also on hdb4 intended to be a backup system

However, the first time I used openoffice on the new hdb3 system, it printed OK but then I was unable to print from any other application. Printers still showed installed OK in Control Center but I got the "unable to connect to cups server" error when attempting to print from any other application.

I then tried the other systems & found that not only did they also have the "unable to connect to cups server error, the printers were gone & cups is giving a "child exited with status 127" error. So now the only way to print anything is through openoffice on the new system...and it is crashing every few minutes.
I was able to get the printers working on the new hdb3 system but re-running "sudo hp-setup" but even then they would only work after first printing a test page from hplip.
That was yesterday. Today I did 'apt-get purge remove cupsys" then reinstalled cupsys & cupsys-driver-gutenprint on both the BH9 systems. The printers the showed up in control center but wouldn't work until I removed & reinstalled them. I tried the same on the new install but so far it is still "unable to connect".

Question:
There is no interconnection between any of these systems. The only thing they share is they all use the same swap files. What can possibly be happening to affect all three systems?
michael7 - 19.10.2006, 02:50 Uhr
Titel: Thanks, piper.
piper wrote:
Zitat:
Have you tried this

modprobe lp
echo lp >> /etc/modules
apt-get remove --purge cupsys
apt-get install cupsys or apt-get install cupsys cupsys-driver-gutenprint hplip

then go to http://localhost:631/

this is the only thing that works for me


Thank you. That worked!
Gowator - 19.10.2006, 10:38 Uhr
Titel: Re: Thanks, piper.
michael7 hat folgendes geschrieben::
piper wrote:
Zitat:
Have you tried this

modprobe lp
echo lp >> /etc/modules
apt-get remove --purge cupsys
apt-get install cupsys or apt-get install cupsys cupsys-driver-gutenprint hplip

then go to http://localhost:631/

this is the only thing that works for me


Thank you. That worked!


worked for me too.
Thx piper
greybeard - 22.10.2006, 19:25 Uhr
Titel: RE: Re: Thanks, piper.
This worked for me.

http://kubuntuforums.net/forums/index.php?topic=9959.0

Essentially telling kprinter to look for 127.0.0.1 instead of localhost.
Ashton - 23.10.2006, 01:47 Uhr
Titel: Printing through CUPS now works for me!
I started this thread off a while back, tried everything people suggested without success, and watched as more folks piled in with CUPS problems.

Today (October 22), after a dist-upgrade, it simply works again. Huh. Sometimes there's nothing to add. I hope an upgrade solves any other issues posters here were having with CUPS/KDE connections.

Thanks for all of the suggestions. This is a terrific forum!
DeepDayze - 23.10.2006, 14:34 Uhr
Titel: RE: Printing through CUPS now works for me!
CUPS is now at 1.2.5. Will give that a whirl too as I was very wary of CUPS as well.
sherlock - 27.10.2006, 18:18 Uhr
Titel: RE: Printing through CUPS now works for me!
After googling around found these two fixes for cups and kprint:

Cups - edit /etc/cups/cupsd.conf so that it listens only to localhost:631

# Only listen for connections from the local machine.
Listen localhost:631
#Listen /var/run/cups/cups.sock -----note # added to start of this line

restart cups

For kprint:
edited /etc/kde3/kdeprintrc by adding the following section as there was no [CUPS] stanza at all:

[CUPS]
Host=localhost
InstallDir=
Login=
Port=631
SavePassword=false

Best of luck - it worked for me but your mileage may vary.

Sherlock
davidsyes - 05.11.2006, 03:28 Uhr
Titel: Additional CUPS-related info, just in case it helps
Hi,

After installing the RPMfind rpm for:

cups-1.1.23-17mdk

I have had immediate problems with CUPS. Kprint will not even start (anymore). Restarting the CUPS service is when I noticed problems (I had stopped the service, then restarted after upgrading in-place the CUPS files, which had several dependencies). But, I read all the posts prior to mine. IWhen I run kprinter (as root and as my own account), I get this error:

kprinter: relocation error: /usr/lib/libcups.so.2: symbol __snprintf_chk, version GLIBC_2.3.4 not defined in file libc.so.6 with link time reference

When I run:

rpm -q glibc

I get:

glibc-2.3.3-21mdk


However, please note that I am using Mandrake/Mandriva 10.1. Also, I had CUPS that came with the distro, but when CUPS showed my Epson Stylus Photo R320 as R300, I installed cups-1.1.23-17mdk.i586.rpm. Drakconf (the Mandrake configurator) found the R320, but of course CUPS itself only found R300. Also, one tool would properly see the printer at USB, while other tools would not see it at all. Manually typing the path into (I think it was Kprint) did no good.

I am not good at symlinks or the like, but I think I will just remove cups-1.1.23-17mdk.i586.rpm and try the next lower version

However, if you want to know the dependencies I had to satisfy just to get past cups-common, here they are in the demanded order:

liblzo2_2-2.01-1mdk.i586.rpm

libgnutls13-1.4.0-1mdv2007.0.i586.rpm

libcups2-1.2.3-3mdv2007.0.i586.rpm

cups-common-1.1.23-17mdk.i586.rpm

cups-1.1.23-17mdk.i586.rpm
bluewater - 05.11.2006, 04:17 Uhr
Titel:
KANOTIX is not RPM based, its Debian 'deb' based. and you try RPMs in debian well your tough luck

For help with Mandriva you need to go to Mandriva Forums
Gowator - 10.11.2006, 00:12 Uhr
Titel:
bluewater hat folgendes geschrieben::
KANOTIX is not RPM based, its Debian 'deb' based. and you try RPMs in debian well your tough luck

For help with Mandriva you need to go to Mandriva Forums


www.mandrivausers.org
Alle Zeiten sind GMT + 1 Stunde
PNphpBB2 © 2003-2007