DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 27th February 2020
acampbell acampbell is offline
Real Name: Anthony Campbell
Shell Scout
 
Join Date: Sep 2014
Location: London, UK
Posts: 138
Default Printing with CUPS suddenly failed

I have a networked Brother-HL5350DN printer which has worked fine with CUPS for over a year. Two days ago it suddenly refused to print on my desktop running -current I reconfigured the printer several times without effect.

I then set up CUPS on a laptop running -release. It also failed. In both cases the printer appears on screen and I can queue jobs for printing as normal but they don't print. The printer itself is working normally from my wife's computer.

I turned on debug and found this:
[Job 30] Unable to locate printer \"BRN001BA92DB44A\"

I'm mystified. Whenever I've set up the printer in CUPS previously it has always worked. The only clue I found was on Arch Linux where they talk about needing to set up avahi jn such cases, but I don't know if that is relevant here.

Any ideas gratefully received.




U
Reply With Quote
  #2   (View Single Post)  
Old 27th February 2020
frcc frcc is offline
Don't Worry Be Happy!
 
Join Date: Jul 2011
Location: hot,dry,dusty,rainy,windy,straight winds, tornado,puts the fear of God in you-Texas
Posts: 181
Default

I have had good luck with Apsfilter and its dependants with my Brother HL-2140
Matter of fact there is a posting by me on that printer setup with OpenBSD in this forum if interested in searching and if applicable.
Reply With Quote
  #3   (View Single Post)  
Old 27th February 2020
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,910
Default

When CUPS works, it works well. When a problem occurs, figuring out the root cause can be exceedingly difficult, because there are so many state changes which occur in a typical process flow.

Without more information, I can only point you in the direction of general debugging help - such as https://wiki.debian.org/CUPSDebugging
Reply With Quote
  #4   (View Single Post)  
Old 28th February 2020
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,336
Default

Quote:
Job 30] Unable to locate printer \"BRN001BA92DB44A\"
I not sure of the details, but I think this is an alias that is supposed to deal with the inconsistent allocation of dhcp addresses. I would first check to see if you can ping the printers IP address to rule out a failed network card on the printer. If you're using dhcp, it should be listed in your router.

I have better luck assigning the printer a static IP and selecting AppSocket/HP JetDirect and manually entering socket://(IPV4 staticIP):9100
That way the IP can never change and the alias will not have to be redirected.

http://praxis.rocketknowledge.com/20...-1004-lts.html

Last edited by shep; 28th February 2020 at 04:04 PM.
Reply With Quote
  #5   (View Single Post)  
Old 28th February 2020
acampbell acampbell is offline
Real Name: Anthony Campbell
Shell Scout
 
Join Date: Sep 2014
Location: London, UK
Posts: 138
Default

Thanks to everyone for replies.

To iggimi: The link to debian is helpful - thanks for that. I'll trawl through the debug file to try to see something relevant..

To frcc: I've used apsfilter in the past and I tried it again this time, but it didn't seem to find the printer now (similar to CUPS?). Of course apsfilter is old and no longer maintained. I may try again if I continue to fail with CUPS. I also tried modifying the printcap file from /etc/examples but no luck there either.

To shep: Yes, I thought of the connection to the printer too, but I can ping it and it shows up in the router's dhcp list. Also, as I said previously, network printing is still working for my wife/s computer (a Mac). I may try a statoc IP address but I don't think that can be the problem.

I thought of a permissions problem but that can hardly be the case since it also happens on my laptop, running -release.
Reply With Quote
  #6   (View Single Post)  
Old 28th February 2020
CiotBSD CiotBSD is offline
c107:b5d::
 
Join Date: Jun 2019
Location: Under /
Posts: 66
Default

Just to be sure: How do you configure your network printer into Cups?
What is your connection ? with 'lpd' ? or 'snd-ds' ?
__________________
GPG:Fingerprint ed25519 : 072A 4DA2 8AFD 868D 74CF 9EA2 B85E 9ADA C377 5E8E
GPG:Fingerprint rsa4096 : 4E0D 4AF7 77F5 0FAE A35D 5B62 D0FF 7361 59BF 1733
Reply With Quote
  #7   (View Single Post)  
Old 28th February 2020
acampbell acampbell is offline
Real Name: Anthony Campbell
Shell Scout
 
Join Date: Sep 2014
Location: London, UK
Posts: 138
Default

Quote:
Originally Posted by CiotBSD View Post
Just to be sure: How do you configure your network printer into Cups?
What is your connection ? with 'lpd' ? or 'snd-ds' ?
As far as I know Cups uses lpd, I don't know anything about snd-ds.
Reply With Quote
  #8   (View Single Post)  
Old 28th February 2020
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,336
Default

Quote:
network printing is still working for my wife/s computer (a Mac).
Sorry, I glossed over that on your 1st post.
Apple bought CUPs and newer Mac's use it. Maybe you could look at and replicate the settings.
Reply With Quote
  #9   (View Single Post)  
Old 28th February 2020
acampbell acampbell is offline
Real Name: Anthony Campbell
Shell Scout
 
Join Date: Sep 2014
Location: London, UK
Posts: 138
Default

Well, at least I've now got the laptop to print, by putting an entry for "socket://<printer-ip>". It still doesn't work on my desktop although the message about not finding the printer no longer appears, which I suppose is progress. There is stuff about Dirty files which may part of the problem.

I never needed this socket entry previously.
Reply With Quote
Old 28th February 2020
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,910
Default

Quote:
Originally Posted by acampbell View Post
I never needed this socket entry previously.
You are perceiving "CUPS" as a single entity that should just work. If you peel back the cover of that perceived black box, you will discover that underneath that cover -- there are a LOT of moving parts that could be in play.

Obviously, something changed in your environment, because it used to work, then stopped working, and you report now that when you provision one of the hundreds of widgets available with or for CUPS, you have a partial circumvention.

I don't like CUPS, but I use it, because CUPS/GTK integration is necessary for printer integration with GTK apps, such as browsers, document editors, and photo editors.
Reply With Quote
Old 29th February 2020
acampbell acampbell is offline
Real Name: Anthony Campbell
Shell Scout
 
Join Date: Sep 2014
Location: London, UK
Posts: 138
Default

Thanks, iggimi. I take your point - I have a limited understanding of Cups, which I would also prefer to avoid if I could.

You say "Obviously something changed in your environment", which makes sense but doesn't explain why I have to set "socket://" on the laptop running -release. And I've just had exactly the same thing happen on a second laptop, also running -release. I've never tried to print from either of these previously so I don't know if the "socket" requirement is new.

As to why printing doesn't work on the desktop even with "socket://" set up, it's occurred to me that a couple of times during recent -current upgrades I was unable to do the recommended deletions of Cups files because the screen showing the instructions disapared before I could do so. Perhaps this introduced some errors into Cups?

I'm thinking ahout reinstalling Cups from scratch to see if that fixes things. If it doesn't, I may have to consider replacing -current with -release since I really can't manage without printing, though that's obviously a last resort.
Reply With Quote
Old 29th February 2020
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,336
Default

Quote:
I've never tried to print from either of these previously so I don't know if the "socket" requirement is new.
It is not new. Conceptually, the printer can accept jobs through different ports: http = port 80, https = port 443, IPP=port 631, AppSocket/HPJetdirect =port 9100. Port 9100 has been dedicated for printing for several decades.
https://www.godaddy.com/garage/whats...ide-for-https/
https://en.wikipedia.org/wiki/Intern...nting_Protocol
https://en.wikipedia.org/wiki/List_o...P_port_numbers

You can use any of the above ports when configuring a network printer. Port 9100 has a reputation of stability, a reputation that is consistent with my experience.
Reply With Quote
Old 29th February 2020
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 6,910
Default

Quote:
Originally Posted by acampbell View Post
... I've never tried to print from either of these previously ....
Wait... What? You opened this thread with:
Quote:
Originally Posted by acampbell View Post
I have a networked Brother-HL5350DN printer which has worked fine with CUPS for over a year. Two days ago it suddenly refused to print....
Could you take the time to clarify -- or reconcile --what appears to me to be conflicting information?
Reply With Quote
Old 29th February 2020
acampbell acampbell is offline
Real Name: Anthony Campbell
Shell Scout
 
Join Date: Sep 2014
Location: London, UK
Posts: 138
Default

Thanks, Shep, very helpful. I still haven't succeeded with Cups on my desktop, I'm going to have another go at setting up Unix printing to avoid Cups (which I'd prefer anyway).
Reply With Quote
Old 29th February 2020
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,336
Default

I have nearly the same printer, HL-5450DN and there is a forum howto on setting up OpenBSD lpr printing. The forum's author also had a BR-script3 capable printer.

http://daemonforums.org/showthread.p...t=foomatic-rip

print/a2ps is optional. See @jiggimi's post later in the thread.

Before you jump into this, be clear on what was posted earlier; gtk3 and qt4/qt5 print dialogs do not recognize BSD lpr, just cups lp. It is an extra step to work around.
Print your file to a pdf and then open the pdf in print/gv to print. Another option is to convert the *.pdf to *.ps using pdftops and then print the ps from the command line.

A last point. The Brother printer understands Postscript directly and most applications generate Postscript files. Your Brother also can use PCL6 which needs to be filtered (pre-processed) by your system before it is sent to the printer = a little slower. An upside of PCL6 is that it accepts a *.pdf directly, you do not need to convert.

I saw your post in misc@openbsd.org. Avahi discovery is where the printer advertises it's presence on your home network. If you know the printers address, you do not need it. And you would know the printers address if you assigned it a static address in the printers web interface. I believe that if you had used socket://staticIP for the initial cups setup, it would not have failed.
Reply With Quote
Old 1st March 2020
acampbell acampbell is offline
Real Name: Anthony Campbell
Shell Scout
 
Join Date: Sep 2014
Location: London, UK
Posts: 138
Default

Quote:
Originally Posted by jggimi View Post
Wait... What? You opened this thread with:
Could you take the time to clarify -- or reconcile --what appears to me to be conflicting information?
Sorry if I wasn't clear. I mostly work on my desktop and that is what I was printing from with Cups up to now. I have two (old) laptops which I use only occasionally, mostly when I'm away from home, and I hadn't tried to print from them previously. I installed Cups on them now to test if it would work.
Reply With Quote
Old 1st March 2020
acampbell acampbell is offline
Real Name: Anthony Campbell
Shell Scout
 
Join Date: Sep 2014
Location: London, UK
Posts: 138
Default

Thanks for your further comments, Shep. The daemon forums post is helpful.

I take your point about gtk3 etc.but this may be something I shal have to work round.

I can't find any sign of avahi running on my system so I don't think that is the problem.

I made the printer IP a fixed entry but it makes no difference.

Last edited by acampbell; 1st March 2020 at 11:20 AM.
Reply With Quote
Old 1st March 2020
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,336
Default

Avahi is a client <=> server implementation. Your Brother Printer previously advertised BRN001BA92DB44A. Your OpenBSD box is no longer listening. It was possible to enable some aspects of avahi in /etc/rc.conf.local. I never used it because it added a layer of complexity.

http://openbsd-archive.7691.n7.nabbl...-td311612.html
Reply With Quote
Old 2nd March 2020
acampbell acampbell is offline
Real Name: Anthony Campbell
Shell Scout
 
Join Date: Sep 2014
Location: London, UK
Posts: 138
Default

Well, I've finally got Cups working again flawlessly, exactly as before, with no need for the "socket://" stuf!. My "solution" was to stop trying to reconfigure the printer and just to delete it and start again - embarrassingly simple.

Sincere thanks to everyone who has replied to this thread. In case it's of interest, here is my latest /etc/cups/printers.conf:

# Printer configuration file for CUPS v2.3.1
# Written by cupsd on 2020-03-02 09:54
# DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING
NextPrinterId 3
<DefaultPrinter Brother_HL-5350DN_series>
PrinterId 2
UUID urn:uuid:795e4424-0458-3f6d-413a-1669af7e997e
Info Brother HL-5350DN series
Location
MakeModel Brother HL-5350DN BR-Script3
DeviceURI lpd://brother/BINARY_P1
State Idle
StateTime 1583142812
ConfigTime 1583142501
Type 8433748
Accepting Yes
Shared No
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
Attribute marker-colors \#000000,#000000,#000000
Attribute marker-levels -1,-1,54
Attribute marker-names Black Toner Cartridge,Black Toner Cartridge,Drum Unit
Attribute marker-types toner,toner,opc
Attribute marker-change-time 1583142812
</DefaultPrinter>
~
~
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Suddenly I can't boot on OpenBSD joancatala OpenBSD General 2 13th August 2019 12:46 PM
What's happening here? USB and SSD's connections disappeared suddenly betweendayandnight OpenBSD Installation and Upgrading 29 9th March 2016 04:49 PM
Printing woes (cups, apsfilter) acampbell OpenBSD General 3 25th September 2015 03:42 PM
Power Supply Fan Suddenly Stopped IdOp General Hardware 16 26th June 2010 08:36 PM
Cups + Netbsd = pstoraster failed TMD3 NetBSD Package System (pkgsrc) 2 12th February 2009 11:20 PM


All times are GMT. The time now is 10:56 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick