# yet another cups ipp-failed problem [solved]

## fidel

I got a small network, there are two machines that have printer connected, a Brother HL1250 on one and a Brother MFC-620CN on the other. The computer with the HL1250 connected runs all the time, it's my server (amd64, with x86_64). The other computer acts as a desktop (x86) and is configured so, that it has a /etc/cups/client.conf which tells the desktop that it should connect to cups on the server, in order to be able to print on the HL1250 through the network. 

The MFC-620CN works on the local machine, when I enter the cups interface on the desktop, I can successfully print a test page. The printer on the server is available for all machines on the network, that works. So then I wanted to add the MFC-620CN on the server as well, so that network printing works for the printer connected to the desktop as well and so that the desktop with the MFC-620CN can easily print on both printers through the network. 

When I want to add the printer connected to the desktop to the cups server on the server, cups wants to install a driver as well, this is my first concern: Do I really need to install the printer driver for the network printer on the server as well, even though the printer driver is installed on the desktop that is connected to the printer? I never needed to install a printer driver to any desktop using network printing!... If not, how could I add a network printer to the cups server without the need of specifying a printer driver?

Since I couldn't figure this out, I just added the driver anyway, was kind of a hassle, since its a driver in rpm or deb package format. Using the rpm didn't work, I got an error about stack smashing.... So I went ahead and tried the deb package. I got complaints about the packet not suits the architecture. I ran dpkg -i --force-all and the drivers got installed. When I now enter the cups webinterface I can find the driver in the list and add the printer. Trying to print fails though:

```

I [06/Apr/2007:10:39:30 +0200] Started filter /usr/libexec/cups/filter/pstops (PID 4627) for job 13.

I [06/Apr/2007:10:39:30 +0200] Started filter /usr/libexec/cups/filter/brlpdwrapperMFC620CN (PID 4628) for job 13.

I [06/Apr/2007:10:39:30 +0200] Started backend /usr/libexec/cups/backend/ipp (PID 4629) for job 13.

E [06/Apr/2007:10:39:32 +0200] PID 4629 (/usr/libexec/cups/backend/ipp) stopped with status 1!

I [06/Apr/2007:10:39:32 +0200] Hint: Try setting the LogLevel to "debug" to find out more.

I [06/Apr/2007:10:39:32 +0200] [Job 13] Backend returned status 1 (failed)

```

I have already reinstalled foomatic-filters, recompiled cups... nothing changes. I thought, it could be a problem about the url, on the desktop with the MFC-620CN the name of the printer is Brother_MFC-620CN_USB_1, so I added the url as ipp://192.168.1.60:631/printers/Brother_MFC-620CN_USB_1

I am totally disorientated....   :Confused: 

Big thanks for any tips!!!Last edited by fidel on Tue Apr 10, 2007 10:37 pm; edited 1 time in total

----------

## bunder

 *Quote:*   

> Do I really need to install the printer driver for the network printer on the server as well, even though the printer driver is installed on the desktop that is connected to the printer? I never needed to install a printer driver to any desktop using network printing!... If not, how could I add a network printer to the cups server without the need of specifying a printer driver? 

 

if you're using windows clients to print:

shortest answer, no.

longest answer, no but you will need the windows drivers if windows doesn't have them.  add the printer as a network printer with the full url you specified.  it will as you what kind of printer it is (typical windows add/remove hardware, etc).  make sure you use a pcl driver, iirc that's the only thing to check for.

if you're using linux, i'm under the impression all you need is the servername line in /etc/cups/client.conf.

hope this helps,

cheers

----------

## fidel

Thanks! I don't use Windows, only Gentoo! The problem is though, I cannot set more than one Servers in /etc/cups/client.conf but I got two cups servers. So I thought I could add the desktop printer to the cups server on the server.... Then I could use a single entry in /etc/cups/client.conf for all desktops. Any idea?

----------

## bunder

 *fidel wrote:*   

> Thanks! I don't use Windows, only Gentoo! The problem is though, I cannot set more than one Servers in /etc/cups/client.conf but I got two cups servers. So I thought I could add the desktop printer to the cups server on the server.... Then I could use a single entry in /etc/cups/client.conf for all desktops. Any idea?

 

yes.  that should work just fine... cups can support multiple printers...

edit: and printer pools as well (say if printer a runs out of paper, printer b can print a's job)

cheers

----------

## fidel

Well, then it should work that way. Now I have to fight with:

```

I [06/Apr/2007:12:42:32 +0200] Job 26 queued on "MFC-620CN" by "guest".

I [06/Apr/2007:12:42:32 +0200] Started filter /usr/libexec/cups/filter/pstops (PID 25695) for job 26.

I [06/Apr/2007:12:42:32 +0200] Started filter /usr/libexec/cups/filter/brlpdwrapperMFC620CN (PID 25696) for job 26.

I [06/Apr/2007:12:42:32 +0200] Started backend /usr/libexec/cups/backend/ipp (PID 25699) for job 26.

E [06/Apr/2007:12:42:34 +0200] PID 25699 (/usr/libexec/cups/backend/ipp) stopped with status 1!

I [06/Apr/2007:12:42:34 +0200] Hint: Try setting the LogLevel to "debug" to find out more.

I [06/Apr/2007:12:42:34 +0200] [Job 26] Backend returned status 1 (failed)

```

What could be wrong with ipp ??

----------

## fidel

I tried to do as suggested and set the LogLevel to debug, no idea though what that means:

```

I [06/Apr/2007:13:05:00 +0200] Started "/usr/libexec/cups/cgi-bin/admin.cgi" (pid=30198)

D [06/Apr/2007:13:05:00 +0200] cupsdSendCommand: 9 file=10

D [06/Apr/2007:13:05:00 +0200] [CGI] admin.cgi started...

D [06/Apr/2007:13:05:00 +0200] [CGI] http=0x555555699e90

D [06/Apr/2007:13:05:00 +0200] [CGI] op="start-printer"...

D [06/Apr/2007:13:05:00 +0200] cupsdAcceptClient: 11 from localhost (Domain)

D [06/Apr/2007:13:05:00 +0200] cupsdReadClient: 11 POST /admin/ HTTP/1.1

D [06/Apr/2007:13:05:00 +0200] cupsdAuthorize: No authentication data provided.

D [06/Apr/2007:13:05:00 +0200] Resume-Printer ipp://localhost/printers/MFC-620CN

D [06/Apr/2007:13:05:00 +0200] Discarding unused printer-state-changed event...

I [06/Apr/2007:13:05:00 +0200] Saving printers.conf...

I [06/Apr/2007:13:05:00 +0200] Printer "MFC-620CN" started by "anonymous".

D [06/Apr/2007:13:05:00 +0200] cupsdProcessIPPRequest: 11 status_code=0 (successful-ok)

D [06/Apr/2007:13:05:01 +0200] cupsdCloseClient: 11

D [06/Apr/2007:13:05:01 +0200] PID 30198 (/usr/libexec/cups/cgi-bin/admin.cgi) exited with no errors.

D [06/Apr/2007:13:05:01 +0200] [CGI] cgiCopyTemplateLang(tmpl="header.tmpl")

.....

{snip}

.....

D [06/Apr/2007:13:05:01 +0200] [CGI] Template file is "/usr/share/cups/templates/de/trailer.tmpl"...

D [06/Apr/2007:13:05:01 +0200] [CGI] Starting at file position 0...

D [06/Apr/2007:13:05:01 +0200] [CGI] Returning at file position 643 on EOF...

D [06/Apr/2007:13:05:03 +0200] cupsdReadClient: 7 POST / HTTP/1.1

D [06/Apr/2007:13:05:03 +0200] cupsdAuthorize: No authentication data provided.

D [06/Apr/2007:13:05:03 +0200] CUPS-Get-Default

D [06/Apr/2007:13:05:03 +0200] CUPS-Get-Default client-error-not-found: Kein Standarddrucker

D [06/Apr/2007:13:05:03 +0200] cupsdProcessIPPRequest: 7 status_code=406 (client-error-not-found)

D [06/Apr/2007:13:05:03 +0200] cupsdReadClient: 7 POST / HTTP/1.1

D [06/Apr/2007:13:05:03 +0200] cupsdAuthorize: No authentication data provided.

D [06/Apr/2007:13:05:03 +0200] CUPS-Get-Printers

D [06/Apr/2007:13:05:03 +0200] cupsdProcessIPPRequest: 7 status_code=0 (successful-ok)

```

And every attempt to print a test page ends with the error MFC-620CN "/usr/libexec/cups/backend/ipp failed". 

Thanks for your help! 

And by the way: Happy Easter!

----------

## fidel

hmm, another attempt, could it be an IPV6 problem? I got messages in the log of the cups server on the desktop:

```

I [06/Apr/2007:13:18:12 +0200] Scheduler shutting down normally.

I [06/Apr/2007:13:18:12 +0200] Saving remote.cache...

I [06/Apr/2007:13:18:12 +0200] Saving job cache file "/var/cache/cups/job.cache"...

I [06/Apr/2007:13:18:12 +0200] Listening to 0.0.0.0:631 (IPv4)

I [06/Apr/2007:13:18:12 +0200] Listening to :::631 (IPv6)

I [06/Apr/2007:13:18:12 +0200] Listening to /var/run/cups/cups.sock (Domain)

I [06/Apr/2007:13:18:12 +0200] Loaded configuration file "/etc/cups/cupsd.conf"

I [06/Apr/2007:13:18:12 +0200] Using default TempDir of /var/spool/cups/tmp...

I [06/Apr/2007:13:18:12 +0200] Cleaning out old temporary files in "/var/spool/cups/tmp"...

I [06/Apr/2007:13:18:12 +0200] Configured for up to 100 clients.

I [06/Apr/2007:13:18:12 +0200] Allowing up to 100 client connections per host.

I [06/Apr/2007:13:18:12 +0200] Using policy "default" as the default!

I [06/Apr/2007:13:18:12 +0200] Full reload is required.

I [06/Apr/2007:13:18:12 +0200] Loaded MIME database from '/etc/cups': 34 types, 37 filters...

I [06/Apr/2007:13:18:12 +0200] Loading job cache file "/var/cache/cups/job.cache"...

I [06/Apr/2007:13:18:12 +0200] Full reload complete.

I [06/Apr/2007:13:18:12 +0200] Listening to 0.0.0.0:631 on fd 2...

E [06/Apr/2007:13:18:12 +0200] Unable to open listen socket for address :::631 - Address family not supported by protocol.

I [06/Apr/2007:13:18:12 +0200] Listening to /var/run/cups/cups.sock on fd 3...

```

Did cups fall back to only listen to the socket?.. Don't think though, since:

```

# netstat -ap | grep cups

tcp        0      0 *:ipp                   *:*                     LISTEN      10993/cupsd         

udp        0      0 *:ipp                   *:*                                 10993/cupsd         

unix  2      [ ACC ]     STREAM     HÖRT         18071  10993/cupsd         /var/run/cups/cups.sock

```

Argh, this kills me!...

----------

## bunder

 *Quote:*   

> E [06/Apr/2007:13:18:12 +0200] Unable to open listen socket for address :::631 - Address family not supported by protocol. 

 

turn off ipv6 and recompile.   :Wink: 

cheers

----------

## fidel

Thanks for the hint! I can't choose to compile cups without ipv6 though:

```

# emerge -pv cups

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R   ] net-print/cups-1.2.9  USE="ldap nls pam php ppds samba ssl -X -dbus -jpeg -png -slp -tiff" 3,533 kB 

Total: 1 package (1 reinstall), Size of downloads: 3,533 kB

```

And ipv6 has been deactivated entirely on the machine:

```

# cat /etc/make.conf | grep ipv6

USE="mmx sse sse2 3dnow 3dnowext snmp -ipv6 foomaticdb ppds perl gd odbc dbm 

# euse -i ipv6

global use flags (searching: ipv6)

************************************************************

[- c  ] ipv6 - Adds support for IP version 6

local use flags (searching: ipv6)

************************************************************

no matching entries found

```

??

----------

## fidel

 :Embarassed: 

I finally figured it out! The problem really relies in the fact that I have two cups servers running, each one with a single printer attached. As soon as someone has got more than one cups servers running, the file /etc/cups/client.conf is useless. One would have to alter that file every time another printer is wanted. The solution is really simple! The clients need the cups daemon running as well and need to be configured to allow browsing. The servers need to address themselves through broadcast, done by:

Browsing On

BrowseOrder allow,deny

BrowseAddress 192.168.1.255

in the file /etc/cups/cupsd.conf. Whereas any clients that just want to connect to the cups servers but don't have a printer attached need entries like:

Browsing On

BrowseOrder allow,deny

BrowseAllow 192.168.1.0/255.255.255.0

Now I can print on both servers, depending on which one is really available.

----------

## SoylentGreen

@fidel:

you are a genius, thank you!   :Razz: 

man, i was looking thge documentation, wiki, howto, etc.. back and force without success   :Twisted Evil: 

could it be that he syntax has changed meanwhile, and howtos and wiki should be updated? i think so.

anyway, i can print from my linux client. now hopefully i will also get scanner and fax access (this is an HP OfficeJet here).

thx!

----------

## fidel

 *SoylentGreen wrote:*   

> could it be that the syntax has changed meanwhile

 

True! For instance Port is no longer used, instead you set the Listen directive. But not only this! The location of filters and drivers changed as well, as far as I found out, /usr/lib/cups/filter/ changed to /usr/libexec/cups/filter. So if you get errors like "/usr/lib/cups/filter/blahwrapper failed" copy the file to /usr/libexec/cups/filter/. 

This now sounds strange, but since I switched to the new cups version I noticed a better quality of the prints... of course this could have other reasons! But actually two printers, resp. two computers are affected and they both print nicer!  :Smile: 

Greets

----------

## SoylentGreen

hmm, i have found in the documentation (gentoo) something like this:

```

192.168.0.*

```

and *that* was my most problem!

```

BrowseAllow 192.168.0.255

```

did the trick for me! maybe i didnt look hard enough, but i didnt see this anywhere!

OK, just for completion i will post my cupsd client and server here (readers please note we are using 192.168.178, though you get the drift..):

SERVER:

```

#

# "$Id: cupsd.conf.in 5454 2006-04-23 21:46:38Z mike $"

#

#   Sample configuration file for the Common UNIX Printing System (CUPS)

#   scheduler.  See "man cupsd.conf" for a complete description of this

#   file.

#

# Log general information in error_log - change "info" to "debug" for

# troubleshooting...

LogLevel info

# Administrator user group...

SystemGroup lpadmin

# Only listen for connections from the local machine.

# Listen 192.168.178.22

Listen localhost:631

# Listen 192.168.178.22:631

Listen 192.168.178.2:631

# Listen /var/run/cups/cups.sock

# Show shared printers on the local network.

Browsing On

BrowseOrder allow,deny

BrowseAllow 192.168.178.255

# Default authentication type, when authentication is required...

DefaultAuthType Basic

# Restrict access to the server...

<Location />

  Order allow,deny

  Allow localhost

  Allow 192.168.178.2

  Allow 192.168.178.22

</Location>

# Restrict access to the admin pages...

<Location /admin>

  Encryption Required

  Order allow,deny

  Allow localhost

  Allow 192.168.178.2

  Allow 192.168.178.22

</Location>

# Restrict access to configuration files...

<Location /admin/conf>

  AuthType Basic

  Require user @SYSTEM

  Order allow,deny

  Allow localhost

</Location>

# Set the default printer/job policies...

<Policy default>

  # Job-related operations must be done by the owner or an adminstrator...

  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job>

    Require user @OWNER @SYSTEM

    Order deny,allow

  </Limit>

  # All administration operations require an adminstrator to authenticate...

  <Limit Pause-Printer Resume-Printer Set-Printer-Attributes Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Add-Printer CUPS-Delete-Printer CUPS-Add-Class CUPS-Delete-Class CUPS-Accept-Jobs CUPS-Reject-Jobs CUPS-Set-Default>

    AuthType Basic

    Require user @SYSTEM

    Order deny,allow

  </Limit>

  # Only the owner or an administrator can cancel or authenticate a job...

  <Limit Cancel-Job CUPS-Authenticate-Job>

    Require user @OWNER @SYSTEM

    Order deny,allow

  </Limit>

  <Limit All>

    Order deny,allow

  </Limit>

</Policy>

#

# End of "$Id: cupsd.conf.in 5454 2006-04-23 21:46:38Z mike $".

#

```

CLIENT:

```

#

# "$Id: cupsd.conf.in 5454 2006-04-23 21:46:38Z mike $"

#

#   Sample configuration file for the Common UNIX Printing System (CUPS)

#   scheduler.  See "man cupsd.conf" for a complete description of this

#   file.

#

# Log general information in error_log - change "info" to "debug" for

# troubleshooting...

LogLevel info

# Administrator user group...

SystemGroup lpadmin

# Only listen for connections from the local machine.

Listen *:631

Listen /var/run/cups/cups.sock

# Show shared printers on the local network.

Browsing On

BrowseOrder allow,deny

BrowseAllow 192.168.178.0/255.255.255.0

# BrowseAllow All

# Default authentication type, when authentication is required...

DefaultAuthType Basic

# Restrict access to the server...

<Location />

  Order allow,deny

  Allow localhost

  Allow 192.168.178.*

</Location>

# Restrict access to the admin pages...

<Location /admin>

  Encryption Required

  Order allow,deny

  Allow localhost

  Allow 192.168.178.*

</Location>

# Restrict access to configuration files...

<Location /admin/conf>

  AuthType Basic

  Require user @SYSTEM

  Order allow,deny

  Allow localhost

  Allow 192.168.178.*

</Location>

# Set the default printer/job policies...

<Policy default>

  # Job-related operations must be done by the owner or an adminstrator...

  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job>

    Require user @OWNER @SYSTEM

    Order deny,allow

  </Limit>

  # All administration operations require an adminstrator to authenticate...

  <Limit Pause-Printer Resume-Printer Set-Printer-Attributes Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Add-Printer CUPS-Delete-Printer CUPS-Add-Class CUPS-Delete-Class CUPS-Accept-Jobs CUPS-Reject-Jobs CUPS-Set-Default>

    AuthType Basic

    Require user @SYSTEM

    Order deny,allow

  </Limit>

  # Only the owner or an administrator can cancel or authenticate a job...

  <Limit Cancel-Job CUPS-Authenticate-Job>

    Require user @OWNER @SYSTEM

    Order deny,allow

  </Limit>

  <Limit All>

    Order deny,allow

  </Limit>

</Policy>

#

# End of "$Id: cupsd.conf.in 5454 2006-04-23 21:46:38Z mike $".

#

```

Good Luck!  anyone  :Razz: 

BTW: the printer is hooked to .2, and .22 is the client.

//edit @fidel:

dunno about the filters, we are using HP, foomatic and hpijs. so that wasnt an issue to me.

//edit2: i just see the client conf has errors too, there is a printer atached as well, though, i didnt use it sofar, but it might need updateing.

----------

