Could not connect to network CUPS server

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read this

Could not connect to network CUPS server

Postby vajente on Fri Dec 28, 2012 9:09 am

I upgraded to Mint 14 from Mint 12. Everything worked perfectly, except printing.
My computer is connected to a local network with a cups server. I used to connect to it simply adding a /etc/cups/client.conf file with the following line:

ServerName <address-of-the-server>

With Mint 12 everything went smoothly and I could see all printers in the Print dialog of any application. Now I see nothing. If I try to launch system-config-printer I get
the error:

There was an error during the CUPS operation: 'client-error-bad-request'.

I'm running Mint 14 Cinnamon 64 bit.

Thanks for your help, I could not find any solution in the web.
vajente
Level 1
Level 1
 
Posts: 1
Joined: Fri Dec 28, 2012 9:03 am

Linux Mint is funded by ads and donations.
 

Re: Could not connect to network CUPS server

Postby TheNadger on Mon Mar 18, 2013 8:32 pm

I'm having EXACTLY the same issue. After several years of using cups on various linux distros (Debian,Gentoo,Fedora,SciLinux, and Ubuntu), I've never had anything like this before. The print network addresses have not changed, and even with exactly the same cups settings that currenlty work on my other machine (Ubuntu 10.04.4 lucid), I get nothing. I'm able to ping the server just fine, and the localhost:631 html access works fine too (however all internal options return a 403 Forbidden). I've tried pretty much everything I could think of, list is below:

i) Direct copy of working Ubuntu settings to new machine
ii) Manual alteration of cupsd.conf to a variety of different settings
iii) Complete removal and reinstallation of cups
Code: Select all
sudo apt-get purge cups && sudo apt-get autoremove
sudo apt-get update && sudo apt-get install cups

iv) A CUPS reconfig
Code: Select all
sudo dpkg-reconfigure cups

v) Altering the firewall (which is off anyway) to allow printing with CUPS
Code: Select all
sudo ufw allow CUPS


....and none of it has worked.

For those that might be interested, my cups error log (/var/log/cups/error_log) looks like this:
Code: Select all
W [18/Mar/2013:16:51:36 -0700] Unknown LogLevel warning on line 1.
E [18/Mar/2013:16:51:36 -0700] Unknown directive SystemGroup on line 2 of /etc/cups/cupsd.conf.
W [18/Mar/2013:16:51:36 -0700] No limit for Validate-Job defined in policy default and no suitable template found.
W [18/Mar/2013:16:51:36 -0700] No limit for Cancel-Jobs defined in policy default - using Pause-Printer's policy.
W [18/Mar/2013:16:51:36 -0700] No limit for Cancel-My-Jobs defined in policy default - using Send-Document's policy.
W [18/Mar/2013:16:51:36 -0700] No limit for Close-Job defined in policy default - using Send-Document's policy.
W [18/Mar/2013:16:51:36 -0700] No limit for CUPS-Get-Document defined in policy default - using Send-Document's policy.
W [18/Mar/2013:16:51:36 -0700] No JobPrivateAccess defined in policy default - using defaults.
W [18/Mar/2013:16:51:36 -0700] No JobPrivateValues defined in policy default - using defaults.
W [18/Mar/2013:16:51:36 -0700] No SubscriptionPrivateAccess defined in policy default - using defaults.
W [18/Mar/2013:16:51:36 -0700] No SubscriptionPrivateValues defined in policy default - using defaults.


I'm running Mint 14, kernel 3.5.0-17

A solution to this would prevent me from killing any more braincells through a combination of banging my head against the desk and drinking excessively.

Cheers,
-Kyle
User avatar
TheNadger
Level 1
Level 1
 
Posts: 4
Joined: Mon Mar 18, 2013 8:05 pm
Location: Vancouver, BC, Canada

Re: Could not connect to network CUPS server

Postby TheNadger on Wed Mar 20, 2013 5:40 pm

Ok...so I think I FINALLY figured this out. It appears as though the default for the CUPS_SERVER location was not defined on the local machine, so I redefined it and the problem is solved.

For those that have experienced the same problem, try adding
Code: Select all
export CUPS_SERVER=localhost

to your .bashrc (or equivalent), and you should be able to view network printers defined in your client.conf file.
User avatar
TheNadger
Level 1
Level 1
 
Posts: 4
Joined: Mon Mar 18, 2013 8:05 pm
Location: Vancouver, BC, Canada

Re: Could not connect to network CUPS server

Postby ddalley on Sun Mar 24, 2013 1:15 am

Since you didn't specify exactly which <path>/file, I searched the hard drive and found four files with ".bashrc" in their names but none with the exact same name, so, please, be a little more specific as to which one is the correct one.
ddalley
Level 4
Level 4
 
Posts: 272
Joined: Sun Mar 15, 2009 4:25 am
Location: Toronto, Canada

Re: Could not connect to network CUPS server

Postby TheNadger on Mon Mar 25, 2013 6:12 pm

Because I use a bash environment (as opposed to say sh, csh, or tcsh), the shell commands that initialize environment variables and procedures are written in a bash script that is executed when an interactive shell is started...this is called .bashrc, and is usually located in your home directory. As far as I can remember, Mint didn't have one natively, so I copied my old one that I have used for years, and simply altered it.

The most definitive explanation of .bashrc is in the bash manual, however, you can also look here:

http://superuser.com/questions/49289/what-is-the-bashrc-file

Since there is no "exact" location (only one that is defined for a given machine and/or shell environment), this is why I wrote "YOUR .bashrc (or equivalent)"
User avatar
TheNadger
Level 1
Level 1
 
Posts: 4
Joined: Mon Mar 18, 2013 8:05 pm
Location: Vancouver, BC, Canada

Re: Could not connect to network CUPS server

Postby Mr. P. on Sun Mar 31, 2013 11:49 pm

I am having a similar problem with CUPS.

I have a Dell Inspiron 8600 with Linux Mint Debian. I have an old Laserjet 4M Plus which I have been able to configure previously using its Jetdirect card with Linux Mint 13 (on another computer). Can't seem to get there in Debian for some reason. Trying to configure through CUPS I get a "forbidden" message when I try to add a printer. Hplip configured the newer Officejet 5610 with no problem (on the computer with Debian). Actually configuration was a true breeze. Just plugged it in and everything worked automatically. Trying to configure the 4M Plus through Hplip, I get a message at the end that Hplip can't connect to the CUPS server. Odd, as it connected fine to configure the 5610 and shows the printer and fax combination on the CUPS server. I would think it was a problem with the Jetdirect card, but my other computer with Mint 13 prints just fine.

Majorly in the dark here. Really like the Mint Debian distribution. Any ideas?
Mr. P.
Level 1
Level 1
 
Posts: 17
Joined: Sun Aug 12, 2012 10:53 am

Re: Could not connect to network CUPS server

Postby Mr. P. on Mon Apr 01, 2013 1:58 pm

Additional odd stuff:

The error log says:

E [29/Mar/2013:16:32:34 -0600] cupsdAuthorize: Empty Basic password!
E [29/Mar/2013:16:32:34 -0600] cupsdAuthorize: Empty Basic password!
E [29/Mar/2013:16:32:34 -0600] cupsdAuthorize: Empty Basic password!
E [29/Mar/2013:16:32:34 -0600] cupsdAuthorize: Empty Basic password!
E [29/Mar/2013:16:32:34 -0600] cupsdAuthorize: Empty Basic password!

and then repeats the last line for pages and pages... don't know how many bazillion times.

The access log says:

localhost - - [29/Mar/2013:16:23:33 -0600] "POST / HTTP/1.1" 200 253 Create-Printer-Subscription successful-ok
localhost - - [29/Mar/2013:16:23:43 -0600] "POST / HTTP/1.1" 401 167 CUPS-Get-Devices successful-ok
localhost - root [29/Mar/2013:16:23:43 -0600] "POST / HTTP/1.1" 200 1774 CUPS-Get-Devices -
localhost - root [29/Mar/2013:16:23:44 -0600] "POST / HTTP/1.1" 200 242 CUPS-Get-Devices -
localhost - - [29/Mar/2013:16:25:14 -0600] "POST / HTTP/1.1" 200 2799386 CUPS-Get-PPDs -
localhost - - [29/Mar/2013:16:27:01 -0600] "POST / HTTP/1.1" 200 15427 CUPS-Get-PPD -
localhost - - [29/Mar/2013:16:27:53 -0600] "POST /admin/ HTTP/1.1" 401 15464 CUPS-Add-Modify-Printer successful-ok
localhost - perry [29/Mar/2013:16:27:53 -0600] "POST /admin/ HTTP/1.1" 403 15464 CUPS-Add-Modify-Printer successful-ok
localhost - - [29/Mar/2013:16:27:53 -0600] "POST /admin/ HTTP/1.1" 401 15464 CUPS-Add-Modify-Printer successful-ok
localhost - - [29/Mar/2013:16:27:53 -0600] "POST /admin/ HTTP/1.1" 401 15464 CUPS-Add-Modify-Printer successful-ok
localhost - - [29/Mar/2013:16:27:53 -0600] "POST /admin/ HTTP/1.1" 401 15464 CUPS-Add-Modify-Printer successful-ok

and similarly repeats the last line innumerable times although the "success" doesn't result in an installed printer.

Net result is no install of Laserjet 4mp with Jetdirect card on Linux Mint Debian.

As I say above, in Linux Mint 13, same printer installs without problem and works fine.

Any ideas?
Mr. P.
Level 1
Level 1
 
Posts: 17
Joined: Sun Aug 12, 2012 10:53 am

Re: Could not connect to network CUPS server

Postby Mr. P. on Thu Apr 04, 2013 11:06 am

Hmm, resounding response on my last post/question.... Turns out the problem I was having is due to a bug in Debian.
Thought I'd post from the CUPS forum for benefit of others experiencing the same issue:

Brian,
Perfect. The description of the problem in the link you sent is exactly what I was experiencing.

In the terminal, I added:

usermod -a -G lpadmin MyUser

With my username and everything works great now. I am amazed that you found that link.

Thanks again,
Perry

> On Tue 02 Apr 2013 at 15:18:00 -0700, Perry wrote:
>
> > perry@per:~$ dpkg -l | grep "python-cups"
> > ii python-cups 1.9.48-1+b1 i386 Python bindings for CUPS
>
> Debian testing has 1.9.48-1.1, which contains a fix for this bug:
>
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=667995
>
> I'm unfamiliar with Linux Mint Debian but you could try updating it.
>
Mr. P.
Level 1
Level 1
 
Posts: 17
Joined: Sun Aug 12, 2012 10:53 am

Re: Could not connect to network CUPS server

Postby rcjhawk on Sat Jul 20, 2013 9:29 pm

Let me add to this:

I just installed 64-bit LMDE, replacing Ubuntu. I have a Brother HL-2240 USB printer that worked just fine with Ubuntu and Brother's proprietary driver. But under LMDE I got the

/usr/lib/cups/filter /pdftops failed

message. It didn't take too long to find this forum, but when I tried

sudo apt-get install --reinstall libgs9

The response was

The following packages have unmet dependencies:
cupswrapperhl2240:i386 : Depends: libc6:i386 (>= 2.3.4-1) but it is not going to be installed
hl2240lpr:i386 : Depends: libc6:i386 (>= 2.3.4-1) but it is not going to be installed


Fortunately, while I was doing some preparatory reading last week I found a statement in the LMDE documentation to the effect that

sudo dpkg --add-architecture i386

was necessary for 32 bit applications to work. When I tried that, and the reinstalled libgs9, everything worked.

So my problem was that I was trying to live in a 64 bit world with 32 bit apps. Well, partly. The other part was that Brother told me to install the drivers with the --force-all option, so I never saw an error message.

All is well now. Thanks to everyone for helping me out.
rcjhawk
Level 1
Level 1
 
Posts: 4
Joined: Sat Jul 20, 2013 7:21 pm

Linux Mint is funded by ads and donations.
 

Return to Other networking topics

Who is online

Users browsing this forum: No registered users and 6 guests