DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Installation and Upgrading

OpenBSD Installation and Upgrading Installing and upgrading OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 20th December 2012
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default lpd printing in Current

Network printing broke in 5.2current about 2-3 months ago and I rode with it on the assumption that it would be fixed over a couple of upgrade cycles.

I think the error has something to do with detecting the Trendnet TE100-P1P print server.
Code:
Bear$ lpc status all
hp5l:
	queuing is enabled
	printing is enabled
	1 entry in spool area
	waiting for 9100@192.168.1.2 to come up
    :
	queuing is enabled
	printing is enabled
	cannot examine spool directory
I was using apsfilter and have also tried a ghostscript filter and a foomatic filter - all wait on 9100@192.168.1.2 to come up.

I briefly had trouble with printing *pdf files which went away with an upgrade. My last upgrade:
Code:
OpenBSD 5.2-current (GENERIC.MP) #2: Mon Dec 10 18:39:29 MST 2012
    deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.M

I really like the simplicity of lpr and would like to fix it rather then change over to cups.

Thanks in advance for any insights
Reply With Quote
  #2   (View Single Post)  
Old 20th December 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Can you prove that you are able to connect to port 9100 on the printer's IP address? I'd use tcpdump(8) with telnet(1) or nc(1) and confirm you complete a TCP 3-way handshake. This looks like a networking issue, and I'd suspect your PF configuration of being the root cause if you cannot establish a connected state.

Logging PF blocks and passes will also aid your analysis of you cannot establish a connection to destination port 9100.
Reply With Quote
  #3   (View Single Post)  
Old 20th December 2012
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

Code:
Bear$ lpr -P hp5l cornbread.txt
Bear$ lpc
lpc> ^C
lpc> q
Bear$ lpc status all
hp5l:
	queuing is enabled
	printing is enabled
	1 entry in spool area
	waiting for 9100@192.168.1.2 to come up
Bear$ nc -z 192.168.1.2 80
Connection to 192.168.1.2 80 port [tcp/www] succeeded!
Bear$ nc -z 192.168.1.2 9100
Bear$ lpq
waiting for 9100@192.168.1.2 to come up
Rank   Owner      Job  Files                               Total Size
1st    jsh        8    cornbread.txt                       677 bytes
Bear$ lprm 8
dfA008Bear.home.yak dequeued
cfA008Bear.home.yak dequeued
The above output is with pf=NO in my /etc/rc.conf.local. I returned to my last working printcap - the one with apsfilter. There an update for the base install that I will put in place and will test w/ and w/o pf. I'm relatively snow bound today and there is much to read on tcpdump and pf. I'll report back in a couple of hours.
Reply With Quote
  #4   (View Single Post)  
Old 20th December 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

The nc(1) -z option uses getservbyport(3) to test the connection. For TCP, it will report a message only upon successful 3-way handshake. From this, where there is no report:
Code:
Bear$ nc -z 192.168.1.2 80 
Connection to 192.168.1.2 80 port [tcp/www] succeeded! 
Bear$ nc -z 192.168.1.2 9100 
Bear$
and this:
Quote:
The above output is with pf=NO in my /etc/rc.conf.local.
I can jump to the conclusion that port 9100 is not open on the printer. I could be wrong, of course. I often am.

FYI: Port 9100 is the default for HP's JetDirect protocol, though of course many printers may use it for multiple protocols. You might try using the default port for lpd(8), which is 515. See /etc/services.
Reply With Quote
  #5   (View Single Post)  
Old 20th December 2012
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

I reconfigured the print server and enabled port 81 for ipp:// printing and was able to successfully print with the old printcap
Quote:
# APS1_BEGINrinter1
# - don't delete start label for apsfilter printer1
# - no other printer defines between BEGIN and END LABEL
hp5l|lp|ljet4;r=300x300;q=draft;c=gray;p=letter;m= auto:\
:lp=9100@192.168.1.2:\
:if=/etc/apsfilter/basedir/bin/apsfilter:\
:sd=/var/spool/lpd/hp5l:\
:lf=/var/spool/lpd/hp5l/log:\
:af=/var/spool/lpd/hp5l/acct:\
:mx#0:\
:sh:
# APS1_END - don't delete this
Still have
Quote:
Bear$ nc -z 192.168.1.2 9100
Bear$ nc -z 192.168.1.2 81
Connection to 192.168.1.2 81 port [tcp/*] succeeded!
I have no clue what is going on but at least it works.
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
unwanted printing - cracking? lumiwa FreeBSD Security 9 10th July 2012 01:28 PM
Printing. The final frontier. girarde OpenBSD General 11 5th January 2011 01:03 PM
FBSD 8.1, KDE4 Printing Woes Mantazz FreeBSD Ports and Packages 3 25th November 2010 12:19 AM
Poster printing program map7 FreeBSD Ports and Packages 3 7th November 2010 07:41 PM
Problem with printing unicyclist OpenBSD General 8 1st May 2009 07:06 PM


All times are GMT. The time now is 08:55 AM.


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