All of a sudden, my printer won't print

openSUSE 12.3
CUPS 1.5.4-5.5.1-x86_64

It’s been a while since I have been here since all has been working just fine.
The printer was working last week and now it is partially working.
By partial I mean that, from within CUPS I can print a test page, but I can’t print a test page from within YAST.
From within YAST I get an error message:

/usr/bin/lp: connection refused

Also, no application is able to print.

I think that I saw a CUPS update in the last YAST online update so maybe that had something to do with it.
I tried adding the same printer as if it were new but that didn’t solve it.

Thanks for your guidance.

On 2014-01-27 13:36, hextejas wrote:

> Code:
> --------------------
> /usr/bin/lp: connection refused
> --------------------

Is that a parallel port printer?


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

[QUOTE=robin_listas;2619697]On 2014-01-27 13:36, hextejas wrote:

> Code:
> --------------------
> /usr/bin/lp: connection refused
> --------------------

Is that a parallel port printer?

It’s a USB printer.

On 2014-01-27 14:36, hextejas wrote:
>
> robin_listas;2619697 Wrote:
>> On 2014-01-27 13:36, hextejas wrote:
>>
>>> Code:
>>> --------------------
>>> /usr/bin/lp: connection refused
>>> --------------------
>>
>> Is that a parallel port printer?
>>
>> It’s a USB printer.

But the above output means it is trying the parallel port.

Besides YaST problem to print a test page, is something else not printing?


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

Create a file called /etc/systemd/system/cups.socket (f.e. with “kdesu kwrite /etc/systemd/system/cups.socket”) with exactly the following content:

[Unit]
Description=CUPS Printing Service Sockets

[Socket]
ListenStream=/var/run/cups/cups.sock
ListenStream=631
ListenDatagram=0.0.0.0:631
BindIPv6Only=ipv6-only

[Install]
WantedBy=sockets.target

And reboot.
Everything should work just like before then.

No. /usr/bin/lp is the (cups) command to print files.
See “man lp”.

The parallel port backend is /usr/lib/cups/backend/parallel. :wink:

Lol, it got worse.
When I tried to open CUPS and print a test page, I kept getting

Google Chrome's connection attempt to **localhost** was rejected. The website may be down, or your network may not be properly configured.
**Check your Internet connection.**
Check any cables and reboot any routers, modems, or other network devices you may be using.

**Allow Chrome to access the network in your firewall or antivirus settings.**
If it is already listed as a program allowed to access the network, try removing it from the list and adding it again.

**If you use a proxy server...**
Check your proxy settings or contact your network administrator to make sure the proxy server is working. If you don't believe you should be using a proxy server: Go to the Chrome menu > Settings > Show advanced settings... > Change proxy settings...and make sure your configuration is set to "no proxy" or "direct."

Error code: ERR_CONNECTION_REFUSED

Every page that I went to in CUPS along with YAST.

Here is what the .socket file looks like.

Corky-PC:/etc/systemd/system # 
Corky-PC:/etc/systemd/system # 
Corky-PC:/etc/systemd/system # cat cups.socket
[Unit]
Description=CUPS Printing Service Sockets


[Socket]
ListenStream=/var/run/cups/cups.sock
ListenStream=631
ListenDatagram=0.0.0.0:631
BindIPv6Only=ipv6-only


[Install]
WantedBy=sockets.target
Corky-PC:/etc/systemd/system # 


Well, that’s exactly the file as shipped with 12.3. And the latest update only changed that file and nothing else.
So if it doesn’t it can’t really be caused by the update.
Remove that file again in that case.

Does printing work maybe if you start cups manually?

sudo systemctl start cups.service

Maybe Apparmor is blocking something? (wouldn’t be the first time)
Try:

sudo rcapparmor stop

On 2014-01-27 15:16, wolfi323 wrote:

> No. /usr/bin/lp is the (cups) command to print files.
> See “man lp”.

Argh. Right. What was I thinking about? :-o


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

Well, it’s getting weirder. I removed the file and still get the web page not found. I have not rebooted in a few days so I am thinking that the lst few updates might have done more than just messing around with CUPS.

When I tried to start CUPS from the command line, this is what I get.

hexdump@Corky-PC:~> sudo systemctl start cups.service
root's password:
Failed to issue method call: Unit cups.service failed to load: Invalid argument. See system logs and 'systemctl status cups.service' for details.
hexdump@Corky-PC:~> 



And when I went into Yast, it told me that it could not find any queues and that I had to start CUPS, Which of course failed.

Got this message:

Cannot access cupsd on 'localhost'

and this:

hexdump@Corky-PC:~> sudo rcapparmor stop
root's password:
sudo: rcapparmor: command not found



On 01/27/2014 12:23 PM, Carlos E. R. pecked at the keyboard and wrote:
> On 2014-01-27 15:16, wolfi323 wrote:
>
>> No. /usr/bin/lp is the (cups) command to print files.
>> See “man lp”.
> Argh. Right. What was I thinking about? :-o
>

A record you have on the old record player? :-))

Wait a moment.
You have not rebooted in a few days?
Then the updates are not even running. Or even worse, they are running partially, while others are not.
And I told you to reboot after you create that file. If you don’t, creating that file changes nothing of course.

So, create that file again. Then reboot.
Then report back whether it’s working or not.

Am 27.01.2014 18:36, schrieb hextejas:
> hexdump@Corky-PC:~> sudo rcapparmor stop
> root’s password:
> sudo: rcapparmor: command not found

Use


sudo /sbin/rcapparmor stop


PC: oS 13.1 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.11 | GTX 650 Ti
ThinkPad E320: oS 13.1 x86_64 | i3@2.30GHz | 8GB | KDE 4.11 | HD 3000
HTPC: oS 13.1 x86_64 | Celeron@1.8GHz | 2GB | Gnome 3.10 | HD 2500

Well wolfie, I am terribly embarrassed. During my effort to create the file cups.socket, I screwed up and overwrote cups.service with what’s in .socket.

So, on bended knee, can you point me to what the .service file should look like ?

No wonder I couldn’t start CUPS from the command line.

On 2014-01-27 18:30, Ken Schneider wrote:
> On 01/27/2014 12:23 PM, Carlos E. R. pecked at the keyboard and wrote:
>> On 2014-01-27 15:16, wolfi323 wrote:
>>
>>> No. /usr/bin/lp is the (cups) command to print files.
>>> See “man lp”.
>> Argh. Right. What was I thinking about? :-o
>>
>
> A record you have on the old record player? :-))

Yah.

My mind saw “/dev/lp”, I guess. :-}


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

Which one, the one in /usr/lib/ or in /etc/?
The one in /usr/lib/ should be corrected automatically when you reinstall the cups package (“Update Unconditionally” in YaST or “sudo zypper in -f cups”).
You should not have one in /etc/ anyway.
In that case just remove it and run “sudo systemctl enable cups.service” to recreate the symlink if necessary.

So, on bended knee, can you point me to what the .service file should look like ?

[Unit]
Description=CUPS Printing Service

[Service]
ExecStart=/usr/sbin/cupsd -f

[Install]
Alias=cupsd.service
Also=cups.socket cups.path
WantedBy=printer.target

No wonder I couldn’t start CUPS from the command line.

Yes. That would of course make that impossible…

On 2014-01-27 19:26, hextejas wrote:

> No wonder I couldn’t start CUPS from the command line.

Things happen :slight_smile:


Telcontar:~ # cat /etc/systemd/system/cupsd.service
[Unit]
Description=CUPS Printing Service

[Service]
ExecStart=/usr/sbin/cupsd -f

[Install]
Alias=cupsd.service
Also=cups.socket cups.path
WantedBy=printer.target
Telcontar:~ #

Telcontar:~ # cat /usr/lib/systemd/system/cups.socket
[Unit]
Description=CUPS Printing Service Sockets

[Socket]
ListenStream=/var/run/cups/cups.sock
ListenStream=631
ListenDatagram=0.0.0.0:631
BindIPv6Only=ipv6-only

[Install]
WantedBy=sockets.target
Telcontar:~ #

This is the non-updated version, I believe. For 12.3.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

As suggested, I reinstalled CUPS, rebooted, and all is back to normal again.

Phew !

Thanks again.

Thank you for that.

Since that update, both of my 13.1 machines were failing to start cups at boot.
My 12.3 print server (with the printer plugged in via USB) appears unaffected.

Cheers,

T

Same issue here; CUPS has been borked since the latest update. I can open the printer configuration utility in Yast, where I’m prompted to restart the CUPS daemon, and doing so restores the ability to print.

However, adding the file suggested upthread does nothing; my cups log is filled with

E [02/Feb/2014:14:08:35 -0500] Unable to bind socket for address [v1.::1]:631 - Cannot assign requested address.

Oddly, this doesn’t occur with every reboot. Sometimes, I’m able to print without difficulty, but mostly not.

Very, very annoying.