1

I have two printers, a Dell V715w and a HP LaserJet P2015, connected by USB to a computer running Ubuntu for sharing to all of the laptops in my house with CUPS. I installed both printers locally on the Ubuntu computer, configured CUPS, started it, and tested printing locally, with no problems.

I connected to the HP printer on all of the laptops fine, and tested printing from all of them, also with no problems.

I've tried connecting to the Dell printer on two of the four laptops, running Vista, unsuccessfully. It errors with:

Windows cannot connect to the printer. Make sure that you have typed the name correctly, and the printer is connected to the network.

The Dell printer has wireless networking built in, but I would prefer to use USB. I'm mostly sure that I've installed it correctly, because it does print, just not over the network. The "server" computer and one of the laptops I've tried it on are directly connected to my wireless router through Ethernet. Is there anything that could be causing it to go wrong?

cups error log, as requested:

E [13/Jun/2011:16:23:06 -0400] Unable to remove temporary file "/var/spool/cups/tmp/.hplip" - Is a directory
E [13/Jun/2011:16:33:22 -0400] Unable to remove temporary file "/var/spool/cups/tmp/.hplip" - Is a directory
E [13/Jun/2011:16:46:31 -0400] [cups-driverd] Bad driver information file "/usr/share/cups/drv/sample.drv"!
E [13/Jun/2011:17:01:42 -0400] [cups-driverd] Bad driver information file "/usr/share/cups/drv/sample.drv"!
W [13/Jun/2011:17:25:41 -0400] Duplicate listen address "0.0.0.0" ignored!
W [13/Jun/2011:17:25:41 -0400] Duplicate listen address "::" ignored!
E [13/Jun/2011:17:25:42 -0400] Unable to remove temporary file "/var/spool/cups/tmp/.hplip" - Is a directory
E [13/Jun/2011:17:25:42 -0400] Unable to bind socket for address 0.0.0.0:631 - Address already in use.
E [13/Jun/2011:17:25:42 -0400] Unable to bind socket for address :::631 - Address already in use.
E [13/Jun/2011:17:25:42 -0400] Unable to bind broadcast socket - Address already in use.
W [13/Jun/2011:17:26:28 -0400] Duplicate listen address "0.0.0.0" ignored!
W [13/Jun/2011:17:26:28 -0400] Duplicate listen address "::" ignored!
E [13/Jun/2011:17:26:28 -0400] Unable to remove temporary file "/var/spool/cups/tmp/.hplip" - Is a directory
E [13/Jun/2011:17:26:28 -0400] Unable to bind socket for address 0.0.0.0:631 - Address already in use.
E [13/Jun/2011:17:26:28 -0400] Unable to bind socket for address :::631 - Address already in use.
E [13/Jun/2011:17:26:28 -0400] Unable to bind broadcast socket - Address already in use.
E [13/Jun/2011:17:27:22 -0400] Missing printer-uri, job-uri, or ppd-name attribute!
E [13/Jun/2011:17:27:22 -0400] Returning IPP client-error-bad-request for windows-ext (no URI) from 192.168.1.2
E [13/Jun/2011:17:30:20 -0400] Missing printer-uri, job-uri, or ppd-name attribute!
E [13/Jun/2011:17:30:20 -0400] Returning IPP client-error-bad-request for windows-ext (no URI) from 192.168.1.6
E [13/Jun/2011:17:33:39 -0400] Missing printer-uri, job-uri, or ppd-name attribute!
E [13/Jun/2011:17:33:39 -0400] Returning IPP client-error-bad-request for windows-ext (no URI) from 192.168.1.3
E [13/Jun/2011:17:37:16 -0400] Missing printer-uri, job-uri, or ppd-name attribute!
E [13/Jun/2011:17:37:16 -0400] Returning IPP client-error-bad-request for windows-ext (no URI) from 192.168.1.5
E [13/Jun/2011:18:01:11 -0400] [cups-driverd] Bad driver information file "/usr/share/cups/drv/sample.drv"!
E [13/Jun/2011:18:02:08 -0400] [cups-driverd] Bad driver information file "/usr/share/cups/drv/sample.drv"!
E [13/Jun/2011:18:03:25 -0400] [cups-driverd] Bad driver information file "/usr/share/cups/drv/sample.drv"!
E [13/Jun/2011:18:57:20 -0400] [Job 3] 
E [13/Jun/2011:18:57:25 -0400] [Job 3] 
W [13/Jun/2011:18:58:45 -0400] Duplicate listen address "0.0.0.0" ignored!
W [13/Jun/2011:18:58:45 -0400] Duplicate listen address "::" ignored!
E [13/Jun/2011:18:58:45 -0400] Unable to remove temporary file "/var/spool/cups/tmp/.hplip" - Is a directory
E [13/Jun/2011:18:58:45 -0400] Unable to bind socket for address 0.0.0.0:631 - Address already in use.
E [13/Jun/2011:18:58:45 -0400] Unable to bind socket for address :::631 - Address already in use.
E [13/Jun/2011:18:58:45 -0400] Unable to bind broadcast socket - Address already in use.
E [13/Jun/2011:19:01:54 -0400] [cups-driverd] Bad driver information file "/usr/share/cups/drv/sample.drv"!
E [13/Jun/2011:19:06:25 -0400] Missing printer-uri, job-uri, or ppd-name attribute!
E [13/Jun/2011:19:06:25 -0400] Returning IPP client-error-bad-request for windows-ext (no URI) from 192.168.1.2

cupsd.conf, also as requested:

LogLevel warn
MaxLogSize 0
SystemGroup lpadmin
# Allow remote access
Port 631
Listen /var/run/cups/cups.sock
Listen 631
# Share local printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseRemoteProtocols
BrowseAllow all
BrowseAddress @LOCAL
BrowseLocalProtocols CUPS dnssd
DefaultAuthType Basic
<Location />
  # Allow shared printing...
  Order allow,deny
  Allow @LOCAL
</Location>
<Location /admin>
  # Restrict access to the admin pages...
  Order allow,deny
</Location>
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  # Restrict access to the configuration files...
  Order allow,deny
</Location>
<Policy default>
  <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 CUPS-Get-Document>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  <Limit Pause-Printer Resume-Printer 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-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  <Limit Cancel-Job CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit All>
    Order deny,allow
  </Limit>
</Policy>
<Policy authenticated>
  <Limit Create-Job Print-Job Print-URI>
  AuthType Default
  Order deny,allow
</Limit>
  <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 CUPS-Get-Document>
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
  </Limit>
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
  AuthType Default
  Require user @SYSTEM
  Order deny,allow
    </Limit>
  <Limit Pause-Printer Resume-Printer 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-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
      </Limit>
  <Limit Cancel-Job CUPS-Authenticate-Job>
      AuthType Default
      Require user @OWNER @SYSTEM
      Order deny,allow
        </Limit>
  <Limit All>
        Order deny,allow
          </Limit>
</Policy>
4
  • The Missing printer-uri, job-uri, or ppd-name attribute! error indicates Windows is trying to connect to a printer that doesn't exist. Are you sure the printer URL matches exactly, capital letters and all? When you browse to localhost:631/printers and click on the printer, the URL that appears in your address bar is exactly what should be entered in Windows.
    – Patches
    Jun 14, 2011 at 23:02
  • Sorry for the late response. I've tried that, and the error log gives me this: W [15/Jun/2011:07:50:29 -0400] Duplicate listen address "0.0.0.0" ignored! W [15/Jun/2011:07:50:29 -0400] Duplicate listen address "::" ignored! E [15/Jun/2011:07:50:29 -0400] Unable to bind socket for address 0.0.0.0:631 - Address already in use. E [15/Jun/2011:07:50:29 -0400] Unable to bind socket for address :::631 - Address already in use. E [15/Jun/2011:07:50:29 -0400] Unable to bind broadcast socket - Address already in use.
    – Mike
    Jun 15, 2011 at 12:08
  • that looks like something wrong in your CUPS config. Can you post /etc/cups/cupsd.conf?
    – Patches
    Jun 15, 2011 at 22:40
  • Okay, that error is because Listen 631 is redundant. Port 631 takes care of it. (My cupsd.conf didn't have it and I get that error when I add it.) But theoretically that has absolutely nothing to do with your problem. Since you seem to be doing everything right, this smells like a bug to me. You might want to run apport-bug cups to report it to the Ubuntu developers and see what they can make of it.
    – Patches
    Jun 16, 2011 at 5:48

3 Answers 3

5

Trying to print over Samba has always given me nothing but headaches. I suggest you use the Internet Printing Protocol (IPP) instead.

First make sure your have IPP enabled in CUPS on your print server:

  1. Browse to http://localhost:631/ on the print server machine.
  2. Go to the Administration tab.
  3. Make sure Share printers connected to this system and Allow printing from the Internet are checked.
  4. Click the Change Settings button.
  5. CUPS will restart to allow your changes to take effect.

Then, set up the printers on the Vista machines thusly:

  1. Go to Start > Devices and Printers.
  2. Click Add a printer on the toolbar.
  3. Click Add a network, wireless, or Bluetooth printer
  4. Click The printer I want isn't listed
  5. Select Select a shared printer by name
  6. Enter http://<hostname>:631/printers/<printer-name> where <hostname> is the hostname or IP address of your Ubuntu machine hosting the printer and <printer-name> is the Queue name revealed by the CUPS admin interface.
  7. Windows should connect to your printer.
  8. You'll now be prompted to select a driver for your printer. You can select the Generic manufacturer and MS Publisher Imagesetter printer driver, which will just have Windows send print jobs to CUPS in PostScript format and allow CUPS to use its driver instead, or select the driver for your printer if you need to use any advanced features it offers. (The former generally works better, IMHO.)
  9. Click OK.
  10. Windows verifies that you have successfully installed the printer. Click Next.
  11. You are given the option print a test page to verify that everything works if you'd like.
7
  • I've done all that. Step 7 (the actual connecting) in the Vista side of the setup does not happen, and it throws the error in the original question.
    – Mike
    Jun 14, 2011 at 3:45
  • @Mike: If you've enabled Internet printing in CUPS like I explained, your firewall might be getting in the way. Try running sudo ufw allow 631 on a terminal to unblock the CUPS port.
    – Patches
    Jun 14, 2011 at 3:48
  • Would that be the problem if one of the printers prints but the other doesn't? Because that is the case.
    – Mike
    Jun 14, 2011 at 3:54
  • The HP printer connected through CUPS prints fine. The Dell doesn't.
    – Mike
    Jun 14, 2011 at 3:54
  • @Mike: Ah, I missed that part. Go to the CUPS admin interface, and on the Administration tab click Manage Printers. Click on the printer, and then on its page select the Administration dropdown and choose Modify Printer. Click Continue on the first page that appears, then on the second page make sure Share this printer is checked. Then click Continue again, and click Modify this Printer to make the changes take effect. If sharing wasn't checked, it should work now.
    – Patches
    Jun 14, 2011 at 4:15
0

On my production server I am running cups version 2.3.1 in a docker container using Debian Bullseye.

My client is windows 10.

I was getting the following error recorded in /var/log/cups/error_log in the docker container:

Missing printer-uri, job-uri, or ppd-name attribute. E [24/Jan/2020:11:47:33 +0000] [Client 354] Returning IPP client-error-bad-request for windows-ext (no URI) from 192.168.0.140.

I had to do all of the above that Patches described. However, the error still persisted. The additional step that worked for me was to specify the user name and password for the cups server on my Windows 10 client. In my case the default user name and password were both 'print'. Which was the default for the olbat/cups docker container.

To set the password and user name I navigated to 'Settings', 'Printers & Scanners' and finally 'Manage' under the printer I am connecting. While on the settings page for my printer, I chose 'Printer properties.' Next, I chose the 'Ports' tab and clicked the 'Configure Port..' button.

In the Configure Internet Port window I chose the option button to 'Use the specified user account' and entered the user name and password. I was then able to print a test page without the above error repeating in my /var/log/cups/error.log file.

Hope this helps :-)

0

An other thing to check on Windows is the Software\Policies\Microsoft\Windows NT\Printers\DisableHTTPPrinting policy. When this key is set to true, even though windows will successfully install the CUPS printer, documents will not appear in the printer queue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .