kdeprint can not contact cups

Bug #33173 reported by magilus
136
Affects Status Importance Assigned to Milestone
Ubuntu
Invalid
Medium
Unassigned
kdebase (Ubuntu)
Fix Released
High
Kubuntu Bugs
Breezy
Invalid
Medium
Unassigned

Bug Description

When starting kdeprint via kcontrol in Dapper it can not contact the cups server although it is running.

Revision history for this message
magilus (magilus) wrote :

Setting status to confirmed because some people confirm this in #28812 although the bug report is against gnome-cups-manager.

Changed in kdebase:
status: Unconfirmed → Confirmed
Revision history for this message
Raphaël Pinson (raphink) wrote :

I think this cannot be linked to a bug reported against gnome-cups-manager. I've got the KDE bug here, but gnome-cups-manager works fine.

This bug exists in Kubuntu Dapper Flight 4 CD, so it is due to a bug that existed before its release (Feb 17th).

I found the message displayed by kdeprint (or kprinter, too) in the kdelibs package, in kdelibs-3.5.1/kdeprint/cups/kmcupsmanager.cpp, on line 978 , it says :

 setErrorMsg( i18n( "Connection to CUPS server failed. Check that the CUPS server is correctly installed and running. "
    "Error: %1." ).arg( errcode == QSocket::ErrConnectionRefused ? i18n( "connection refused" ) : i18n( "host not found" ) ) );

This is part of the KMCupsManager::slotConnectionFailed( int errcode ) function and only called by KMCupsManager::checkUpdatePossibleInternal() on line 926 :

 m_socket = new QSocket( this );
 connect( m_socket, SIGNAL( connected() ), SLOT( slotConnectionSuccess() ) );
 connect( m_socket, SIGNAL( error( int ) ), SLOT( slotConnectionFailed( int ) ) );

Revision history for this message
Raphaël Pinson (raphink) wrote :

I'd add that while KDE won't let me add a printer or use one, gnome-cups-manager worked fine, and I can print without a problem using gnome apps or lp in a console.

There is absolutely no problem with he cups server. It starts well and there's no error in /var/log/cups/error_log.

However, /var/log/cups/access_log have entries like :
localhost - - [01/Mar/2006:16:43:44 +0100] "POST /admin/ HTTP/1.1" 200 358 CUPS-Add-Printer client-error-bad-request

Revision history for this message
Raphaël Pinson (raphink) wrote :

I just upgraded with today's updates and now it works!

I can't seem to understand what update fixed this. Could anyone confirm that this bug is fixed in current Dapper?

Revision history for this message
magilus (magilus) wrote :

hm, I think that it can be linked against that bugeport :-). In it there write some Kubuntu users and complain about problems with kdeprint.

I will look if the issue still exists today.

Revision history for this message
Raphaël Pinson (raphink) wrote :

Still doesn't work. This is a mistake I was using LPR so of course I wouldn't see the CUPS error ;)

Revision history for this message
Anthony Mercatante (tonio) wrote :

The "host not found" problem is resolved within kubuntu-default-settings now.
The problem is just that the actual default kdeprintrc file sets cups as default print manager, but does not configure it correctly.

Revision history for this message
Anthony Mercatante (tonio) wrote :

There is another problem when this one is resolved.
kdeprint complains :
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.

The problem seems to be resolved by installing a printer, but that error message should be avoided

Revision history for this message
Luka Renko (lure) wrote :

I have linked this to KDE bug (CUPS 1.2 support):
http://bugs.kde.org/show_bug.cgi?id=115891

Kenny Duffus (kduffus)
Changed in kdebase:
assignee: nobody → kubuntu-team
Revision history for this message
Kenny Duffus (kduffus) wrote :

This was fixed for me then stopped working again yesterday

Revision history for this message
kirky101010 (marckirk) wrote :

What's the status with this bug. It has a major severity so im guessing it should have been fixed some time ago. I tried the printer this morning and the same.

Revision history for this message
Rocco Stanzione (trappist) wrote :

This works for me now with the shiny new cupsys. Can someone confirm and close this bug?

Revision history for this message
Rocco Stanzione (trappist) wrote :

After testing on another machine, I'll say it this way: this works with the new cupsys, *after a printer has been successfully added to cups*. Say, via the cups web admin interface (which is now enabled because pitti is a rock star).

Revision history for this message
Luka Renko (lure) wrote :

Still the same here: however you did not have to use web interface at all. Just ignore the reported error and configure one printer anyhow - this worked for me and when at least one printer was added, this problem is not reported anymore.

I think the missing (private) API that kdeprint uses was added back just recently (rc1) and cups in Dapper still looks to be on Beta1 state.

Revision history for this message
Rocco Stanzione (trappist) wrote :

Some parts of it look to be beta1, but it seems to be from an arbitrary svn revision. I wouldn't mind seeing cupsys upgraded to rc1 if it fixes this.

Revision history for this message
Jonathan Riddell (jr) wrote :

rc1 doesn't fix it (tested with a current SVN checkout). Looks like we'll need a cups 1.1 package in the archive as well.

Revision history for this message
AljoshaNL (princimrahil) wrote :

I still have this problem, even after updating.

Revision history for this message
AljoshaNL (princimrahil) wrote :

In newest flight 6

Revision history for this message
Juan Matias Granda (insulae) wrote :

after updating now with cupsys_1.1.99.b1.r4929-0ubuntu8_i386.deb cupsys-client_1.1.99.b1.r4929-0ubuntu8_i386.deb i have the same error from kprinter (the conection with CUPS fail), if i go to http://localhost:631 cups work find.

Revision history for this message
tehkgb (tehkgb) wrote :

I get the following error when starting cupsys:

$ sudo /etc/init.d/cupsys start
 * Starting Common Unix Printing System: cupsd cupsd: Child exited on signal 15!

Revision history for this message
Luka Renko (lure) wrote :

tehkgb: please submit this as new bug - it is not related to KDE print, but it is separate issue in cups.

Revision history for this message
mmezo (mmezo) wrote :

I had this bug too. Back then I changed the settings to use localhost:631 instead of the socket and it worked.

Now since an upgrade (I cannot tell exactly which one, because I don't print too often from this machine), but it was last week (10-16 april 2006) I get this error.
----
Hubo un error al cargar kdeprint_cups. El diagnóstico es:
(There was an error loading kdeprint_cups. Diagnostic is:)
/usr/lib/kde3/kdeprint_cups.so: undefined symbol: _ZN13KMCupsManager20slotConnectionFailedEi
----

I tried changing the config to use the "default socket", but the error continues to show.

Also tried to switch to the newest default config file (cupsd.conf) (from ¿6-4-2006?) which I had as an .dpkg.dist file with no result.

Trying to print from any kde app shows the same error.

Revision history for this message
moret (moret-sjg) wrote :

I have this bug too, but it seems a KDE problem to me. I can print well from Firefox and other Not-KDE app, so, it is a kdelibs4c2a package problem.

Revision history for this message
Gregor Mückl (gregormueckl) wrote :
Download full text (20.1 KiB)

I can confirm this on a rather fresh Kubuntu installation. I installed Kubuntu 6.06 flight 6 on April 13th and applied all updates that day and the day after and then the problem started to appear. This excerpt from dpkg.log shows all updates to the the KDE libs and cups. I hope this helps:

2006-04-13 18:47:19 upgrade dpkg 1.13.11ubuntu2 1.13.11ubuntu2
2006-04-13 18:47:42 upgrade base-files 3.1.9ubuntu4 3.1.9ubuntu4
2006-04-13 18:47:42 upgrade base-passwd 3.5.11 3.5.11
2006-04-13 18:47:44 upgrade debconf 1.4.72ubuntu1 1.4.72ubuntu1
2006-04-13 18:47:44 upgrade dpkg 1.13.11ubuntu2 1.13.11ubuntu2
2006-04-13 18:47:47 upgrade libc6 2.3.6-0ubuntu15 2.3.6-0ubuntu15
2006-04-13 18:47:53 upgrade mawk 1.3.3-11ubuntu1 1.3.3-11ubuntu1
2006-04-13 18:47:54 upgrade perl-base 5.8.7-10ubuntu1 5.8.7-10ubuntu1
2006-04-13 19:17:36 upgrade console-tools 1:0.2.3dbs-60ubuntu2 1:0.2.3dbs-60ubuntu3
2006-04-13 19:17:36 upgrade libconsole 1:0.2.3dbs-60ubuntu2 1:0.2.3dbs-60ubuntu3
2006-04-13 22:02:06 upgrade bash 3.1-2ubuntu8 3.1-2ubuntu9
2006-04-13 22:02:08 upgrade dpkg 1.13.11ubuntu2 1.13.11ubuntu5
2006-04-13 22:02:09 upgrade coreutils 5.93-5ubuntu2 5.93-5ubuntu3
2006-04-13 22:02:10 upgrade libc6 2.3.6-0ubuntu15 2.3.6-0ubuntu17
2006-04-13 22:02:19 upgrade libc6-i686 2.3.6-0ubuntu15 2.3.6-0ubuntu17
2006-04-13 22:02:19 upgrade belocs-locales-bin 2.3.5-5ubuntu3 2.3.5-5ubuntu5
2006-04-13 22:02:19 upgrade locales 2.3.12 2.3.14
2006-04-13 22:02:21 upgrade libpam-runtime 0.79-3ubuntu10 0.79-3ubuntu12
2006-04-13 22:02:21 upgrade libpam0g 0.79-3ubuntu10 0.79-3ubuntu12
2006-04-13 22:02:23 upgrade libpam-modules 0.79-3ubuntu10 0.79-3ubuntu12
2006-04-13 22:02:23 upgrade login 1:4.0.13-7ubuntu2 1:4.0.13-7ubuntu3
2006-04-13 22:02:24 upgrade sysvinit 2.86.ds1-6ubuntu22 2.86.ds1-6ubuntu25
2006-04-13 22:02:25 upgrade tar 1.15.1-2ubuntu1 1.15.1-2ubuntu2
2006-04-13 22:02:26 upgrade libdevmapper1.01 2:1.01.05-1ubuntu2 2:1.01.05-1ubuntu3
2006-04-13 22:02:26 upgrade lvm2 2.01.15-0ubuntu1 2.01.15-0ubuntu4
2006-04-13 22:02:26 upgrade debconf-i18n 1.4.72ubuntu1 1.4.72ubuntu2
2006-04-13 22:02:26 upgrade debconf 1.4.72ubuntu1 1.4.72ubuntu2
2006-04-13 22:02:27 upgrade foomatic-db 20060113-1 20060408-1ubuntu1
2006-04-13 22:02:29 upgrade foomatic-filters 3.0.2-20060113-1 3.0.2-20060318-2
2006-04-13 22:02:30 upgrade foomatic-db-engine 3.0.2-20060113-1 3.0.2-20060318-1
2006-04-13 22:02:30 upgrade language-pack-de 1:6.04+20060316 1:6.06+20060407
2006-04-13 22:02:30 upgrade language-pack-de-base 1:6.04+20060316 1:6.06+20060407
2006-04-13 22:02:33 upgrade language-pack-en 1:6.04+20060316 1:6.06+20060407
2006-04-13 22:02:33 upgrade language-pack-en-base 1:6.04+20060316 1:6.06+20060407
2006-04-13 22:02:33 upgrade passwd 1:4.0.13-7ubuntu2 1:4.0.13-7ubuntu3
2006-04-13 22:02:36 upgrade screen 4.0.2-4.1ubuntu3 4.0.2-4.1ubuntu4
2006-04-13 22:02:37 upgrade xkeyboard-config 0.8-5 0.8-6
2006-04-13 22:02:37 upgrade x11-common 7.0.0-0ubuntu25 7.0.0-0ubuntu28
2006-04-13 22:02:39 upgrade gcc-4.0-base 4.0.3-1ubuntu3 4.0.3-1ubuntu4
2006-04-13 22:02:39 upgrade libgcc1 1:4.0.3-1ubuntu3 1:4.0.3-1ubuntu4
2006-04-13 22:02:40 upgrade libstdc++6 4.0.3-1ubuntu3 4.0.3-1ubuntu4
2006-04...

Revision history for this message
Gregor Mückl (gregormueckl) wrote :

Sorry about that long log. I've actually shortened it to the list of relevant packages but pasted the wrong one after all.

Small update: downgrading to -0ubuntu1 actually worked for me. My guess is that the change that is applied to kdelibs-3.5.2/debian/patches/kubuntu_34_cups12.diff in kdelibs_3.5.2-0ubuntu5.diff around line 59.422 is responsible for this because the end result is that the KMCupsManager::slotConnectionFailed function is removed from the code but seems to be referenced from some other library.

Revision history for this message
Warren Woodford (warren-mepis) wrote :

The kdeprint_cups.so bug is happening for the MEPIS testers. The problem began with the update of kdelibs4c2a a few days ago.

It appears that the error message is triggered when kjobviewer runs.

Some components of kdeprint and kdelibs are out of sync?

Revision history for this message
Dennis Kaarsemaker (dennis) wrote :

No need for 3 open tasks

Changed in kdebase:
status: Unconfirmed → Rejected
Revision history for this message
Frode M. Døving (frode) wrote :

Does this problem still exist?

Revision history for this message
Warren Woodford (warren-mepis) wrote :

AFAIK, the problems reported by MEPIS users have been fixed. Thanks!

Jonathan Riddell (jr)
Changed in kdebase:
status: Confirmed → Fix Released
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.