Operating System - HP-UX
1820882 Members
3569 Online
109628 Solutions
New Discussion юеВ

Re: Can't print to network printer

 
SOLVED
Go to solution
Bill Sadvary
Frequent Advisor

Can't print to network printer

I give.

I can't print to a network spooled printer.

I suspect bastille even after doing a "bastille -r", no luck. I can print from another identical system that has yet to have bastille config'ed on it.

This is the first network spooled printer to be configured, via Sam and JetDirect.

System name - DB2, HP-UX 11.23

Queue name - sc5si

To add the printer I...

SAM/Printers and Plotters/LP SPooler/Printer and Plotters/Actions/Add Network-Based Printer/Plotter which then fired up JetDirect..

JetDirect Printer Installer for UNIX vE.10.34 /opt/hpnpl/bin/hppi

1) Default Queue [NO]
2) Status Log [/opt/hpnpl/tmp/sc5si.log]
3) Network Address [192.x.x.x]
(Actual IP omitted)

Advanced settings..

1) Job Recovery [ON]
2) True End-of-Job [ON]
3) Banner Page [OFF]
4) Default Printing Language [AUTO]
5) PostScript Level [Level 2]

Modelscript used for this queue is net_lj5x

I can print a test page via the JetDirect Diagnostics that is running on DB2. So DB2 can talk to the printer. Also from DB2, I can telnet to the printer port 9100 and print text on the printer.

The spooler is running, the queue enabled and the printer shows to be idle.

So here's the situation..

% lp -dsc5si .login
request id is sc5si-56 (1 file)

% cat /opt/hpnpl/tmp/sc5si.log
Feb 23 19:04:07%%[ status: Job: sc5si-56; User: root ]%%
Feb 23 19:04:07%%[ status: making connection to 192.x.x.x; source: ethernet ]%%
Feb 23 19:04:07%%[ status: connected to 192.x.x.x; source: ethernet ]%%
Feb 23 19:04:07%%[ status: transmitting data ]%%
Feb 23 19:04:07%%[ status: finish sending print data ]%%
Feb 23 19:04:09%%[ status: printed 0 pages ]%%
Feb 23 19:04:09%%[ status: User: root; total printed pages: 0 ]%%
Feb 23 19:04:09%%[ status: end of job ]%%

Notice the 0 pages printed above, which is accurate, unfortunately.

% cat /usr/spool/lp/log
sc5si-56 root sc5si Feb 23 19:04
/etc/lp/interface/model.orig/sc5si
/opt/hpnpl/bin/hpnpf -j sc5si-56+root -w -a1 -x 192.x.x.x -s /opt/hpnpl/tmp/sc5si.log

% grep printer /etc/inetd.conf
printer stream tcp nowait root /usr/sbin/rlpdaemon rlpdaemon -i

% grep 515 /etc/services
printer 515/tcp spooler # remote print spooling

The host is in the /etc/hosts file even though it really doesn't have to be since I used the ip address during the jetadmin setup.

% lpsched
scheduler is running

What else is there to check? Is it possible to setup some debugging? Any one have any ideas?

Thanks!
-Bill
22 REPLIES 22
Steve Steel
Honored Contributor
Solution

Re: Can't print to network printer

Hi

1)lpshut ; lpsched -v

Printing puts a lot mo ein /var/adm/lp/log


2)Use hpnpadmin to check printer

export MANPATH=/opt/hpnpl/man
man hpnpadmin


Check especially if machine has printer access

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Bill Sadvary
Frequent Advisor

Re: Can't print to network printer

I did the "lpshut ; lpsched -v" and here's what the log files says..


***** LP LOG: Feb 24 07:49 *****
lpsched: FIFO: Feb 24 07:49 r 370 1109249384 0 58 0 0 32 bnrdb2 root sc5si -
sc5si-58 root sc5si Feb 24 07:49
/etc/lp/interface/model.orig/sc5si
/opt/hpnpl/bin/hpnpf -j sc5si-58+root -w -a1 -x 192.102.232.19 -s /opt/hpnpl/tmp/sc5si.log
lpsched: CHILD: Feb 24 07:49 sc5si 58 0000
lpsched: FIFO: Feb 24 07:49 m sc5si c

The hpnpadmin is an awesome tool, thanks, but I'm not seeing any obvious problems..

Some outputs..

db2 is allowed access to 192.x.x.x

192.x.x.x is a network printer


Printer Description:
--------------------
MANUFACTURER :Hewlett-Packard;
COMMAND SET :PJL,MLC,PCL,POSTSCRIPT;
MODEL :HP LaserJet 5Si;

Printer ID : 11

192.x.x.x: multi-channel printer
NOVELL : Disabled
DLC/LLC : Disabled
TCP/IP : Enabled
ETHERTALK : Enabled

Uptime : 19:18:02
Connections Accepted: 43
Connections Denied : 0 (not on access list)
Connections Aborted : 1
Last Host : x.dickinson.edu (172.16.33.x)
Last Host TCP Port: 3585
Reason : idle timeout
Time Since Abort : 19:12:40
Connections Killed : 0
Bytes Received : 0 (current connection)
Bytes Sent : 0 (current connection)
Total Bytes Received: 3578197 (since power-on or reconfig)
Total Bytes Sent : 3935 (since power-on or reconfig)

Control Panel : READY
Line State : Online

5 Interface Type: JetDirect, ethernet

192.x.x.x does not support ECP/MLC

TCP Statistics

2810 segments received
0 segments received in error
82 segments received in order
0 segments received out of order
0 zero window probes
0 segments discarded
179 segments sent

UDP Statistics

621 datagrams received and delivered
9259 discarded due to no application at the destination port
0 discarded due to other reasons
623 datagrams sent

IP Statistics

101656 datagrams received
0 discarded due to IP header errors
0 discarded due to address error
0 discarded due to an unknown or unsupported protocol
90957 datagrams transmission requests
1 discarded due to lack of resources
0 discarded due to no route to destination
0 valid routing entries discarded

ICMP Statistics

10 messages received
0 messages received with ICMP-specific errors
0 destination unreachable
0 time exceeded
0 source quench
0 redirect
10 echo
10 messages sent
0 destination unreachable
0 time exceeded
10 echo reply

SNMP Statistics

624 packets received
623 GetRequests
0 GetNexts
0 SetRequests
0 bad community names
0 operation not allowed by the SNMP community named
618 packets sent
0 traps


Bill Sadvary
Frequent Advisor

Re: Can't print to network printer

I'm not sure why my post now has a "Magical Response" icon, this issue still isn't resolved.

Help!

-Bill
Bill Sadvary
Frequent Advisor

Re: Can't print to network printer

OK, I see, I gave Steve too high of a rating and that considered my problem resolved. Lesson learned. Sorry.

-Bill
TwoProc
Honored Contributor

Re: Can't print to network printer

Bill - just the basics... are you sure the IP address is correct? I've had this problem before and this mistake once or twice...
Can u ping it? I can't remember if the 5si has it - but newer models of the HPLJ have a browser running at port 80... what if you point a browser at that IP address?
We are the people our parents warned us about --Jimmy Buffett
RAC_1
Honored Contributor

Re: Can't print to network printer

What if you power cycle the printer and check??
There is no substitute to HARDWORK
Bill Sadvary
Frequent Advisor

Re: Can't print to network printer

Recycling the power didn't help.

But thanks, that was one thing I didn't try yet.

I rebooted the system earlier this morning, that didn't help either.

-Bill
RAC_1
Honored Contributor

Re: Can't print to network printer

Search the forums for bill Hassels replies on sch postings. I remember, he spoke about debugging options and the procedure to resolve similar problem. You can also delete and add the printer. Use addqueue command this time.

Also look at the -a and -A options of the hpnpadmin command.

Anil
There is no substitute to HARDWORK
Bill Sadvary
Frequent Advisor

Re: Can't print to network printer

To answer a previous post, the IP address is correct. I'm positive.

Anil, I'll look for Bill's postings.

I did delete and do a re-add via Sam (the same way I added the printer to the other system, which can print) but I'll try re-adding by hand as well.

The output of hpnpadmin -a and -A...

bnrdb2 is allowed access to 192.x.x.x
192.x.x.x is a network printer

Another thing I noticed is that I'm not seeing any Print Average (AV) times like I do on the other system.
performance analysis is done from Feb.24 '05 11:12 through Feb.24 '05 11:17
---printers ----wait---- ---print--- ---bytes--- -sum- num_of
/classes-- AV SD AV SD AV SD KB requests
sc5si 0'00 0 0'00 0 370 0 1 2


Question. What IP port is the system sending out from? Or better yet, what ports need to be allowed on the host side?

I have the firewall turned off but I still suspect the bastille config changed something and didn't undo it when the did the bastille revert.

-Bill



RAC_1
Honored Contributor

Re: Can't print to network printer

I think JetDirect uses port 9000 and 9001.

Anil
There is no substitute to HARDWORK
RAC_1
Honored Contributor

Re: Can't print to network printer

Got one of the Bill's thread. This speaks about debugging with hpnpf and lp command. I think this will something to start with.

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=623748

I think this thread will resolve your problem. Hats off to bill. there is always something that I am yet to learn.

Anil
There is no substitute to HARDWORK
Bill Sadvary
Frequent Advisor

Re: Can't print to network printer

Thanks for the Bill Hassell link!

I deleted the queue and re-added using Bill's commands and I was able to print to the printer via the command...

hpnpf -x 12.34.56.78 -s /var/tmp/hpnp.log

But then a step later when asked to do a..

lp -d prx1 -odebugm/var/tmp/debug.log /etc/issue

Nothing prints and nothing goes to the log file, /var/tmp/debug.log. I did get an write error though in /var/adm/lp/log..

sc5si-76 root sc5si Feb 24 13:11
/var/tmp/debug.log is not writable. write to /opt/hpnpl/tmp/sc5si.
lpsched: CHILD: Feb 24 13:11 sc5si 76 0000
lpsched: FIFO: Feb 24 13:11 m sc5si c
lpsched: FIFO: Feb 24 13:20 r 53 1109269210 0 77 0 0 32 bnrdb2 root sc5si -

This doesn't make sense because when I do this on the other system it doesn't give the error and has no problem creating the log file with the owner of lp. If su to lp, I can create a file in that directory.
Also, neither system prints the file to the printer. So I changed the debug file to be /tmp/sc5si and though it didn't give a write error, it still didn't create a debug file.



RAC_1
Honored Contributor

Re: Can't print to network printer

Notice following.

/var/tmp/debug.log is not writable. write to /opt/hpnpl/tmp/sc5si.

there may be write perms problem on /var/tmp, do not give /var/tmp. Do as follows.

lp -d prx1 -odebugm/tmp/debug.log /etc/issue

(Assuming that anybody can write to /tmp)
There is no substitute to HARDWORK
A. Clay Stephenson
Acclaimed Contributor

Re: Can't print to network printer

My best guess as to what is wrong is that some setuid and/or setgid bits on the lp commands have been lost. Lp is extremely sensitive to having these bits set properly and the correct owner/groups assigned.
If it ain't broke, I can fix that.
Bill Sadvary
Frequent Advisor

Re: Can't print to network printer

Ok, I did the..

lp -d prx1 -odebugm/tmp/debug.log /etc/issue

and still nothing in the /tmp/debug.log, nothing prints and I only get a timestamp in the /tmp/debug.log..

sc5si-93 root sc5si Feb 24 14:53

------------------------------------
As far as the setuid and/or setgid bits on the lp commands, everything looks the same as it does on the other system (that is able to print).

Here's what I have..

# lsa /usr/bin/ | grep lp
-r-sr-xr-x 1 lp bin 69632 Aug 26 2004 cancel*
-r-sr-xr-x 1 lp bin 61440 Aug 26 2004 disable*
-r-sr-xr-x 1 lp bin 57344 Aug 26 2004 enable*
lr-xr-xr-t 1 root sys 17 Jan 28 10:34 help@ -> /usr/bin/sccshelp
-r-sr-xr-x 1 root bin 69632 Aug 26 2004 lp*
-r-sr-xr-x 1 root bin 69632 Aug 26 2004 lpalt*
-r-xr-xr-x 1 bin bin 613 Sep 3 2003 lpr*
-r-sr-xr-x 1 lp bin 73728 Aug 26 2004 lpstat*
-r-xr-xr-x 1 bin bin 28672 Aug 26 2004 sccshelp*
-r-sr-xr-x 1 lp bin 24576 Sep 3 2003 slp*
-r-xr-xr-x 1 bin bin 1690 Sep 3 2003 slpdc*

drwxr-xr-x 2 bin bin 8192 Feb 23 09:11 ./
drwxr-xr-x 13 bin bin 8192 Feb 23 09:11 ../
-rwx------ 1 root bin 36864 May 28 2002 addqueue*
-rwxr-xr-x 1 bin bin 16384 May 28 2002 fsize*
-rwxr-xr-x 1 bin bin 28672 May 28 2002 hpnpadmin*
-rwxr-xr-x 1 bin bin 53248 May 28 2002 hpnpf*
-rwxr-xr-x 1 bin bin 20480 May 28 2002 hpnps*
-rwxr-xr-x 1 bin bin 28672 May 28 2002 hpnptyd*
lrwxr-xr-x 1 root sys 22 Feb 23 09:11 hppi@ -> /opt/hpnpl//admin/hppi
-rwxr-xr-x 1 bin bin 20480 May 28 2002 ishpnp*
-rwx------ 1 root bin 36864 May 28 2002 modifyqueue*
-rwxr-xr-x 1 bin bin 65536 May 28 2002 mpage*
-rwx------ 1 root bin 24576 May 28 2002 multiaddqueue*
-rwx------ 1 root bin 20480 May 28 2002 multiremovequeue*
-rwx------ 1 root bin 32768 May 28 2002 removequeue*
-rwxr-xr-x 1 bin bin 32768 May 28 2002 rptrcfg*
-rwx------ 1 root bin 22670 May 28 2002 transferqueue*



RAC_1
Honored Contributor

Re: Can't print to network printer

what did this gave??

hpnpf -x 12.34.56.78 -s /var/tmp/hpnp.log
There is no substitute to HARDWORK
Bill Sadvary
Frequent Advisor

Re: Can't print to network printer

It prints and the log file shows...

Feb 25 09:00:40%%[ status: Job: ; User: ]%%
Feb 25 09:00:40%%[ status: making connection to 192.x.x.x; source: ethernet ]%%
Feb 25 09:00:40%%[ status: connected to 192.x.x.x; source: ethernet ]%%
Feb 25 09:00:40%%[ status: transmitting data ]%%
Feb 25 09:00:40%%[ status: finish sending print data ]%%
Bill Sadvary
Frequent Advisor

Re: Can't print to network printer

I just wanted to add that the print out wasn't formatted as it should have been. It looks like it didn't do the carriage returns.

So it looked kinda like this..

#
_#
__# This is a test
___________________# Please recycle.
____________________________________# Blaa Blaa Blaa

(Pretend that the underscores (_) are blanks, when I did a preview it removed the spaces)

...and it didn't print the rest of the file.

But at least I'm talking to the printer.
Bill Sadvary
Frequent Advisor

Re: Can't print to network printer

RESOLVED!

Are you ready for this?

Before..
/etc/lp/interface# ls -al
drwx------ 2 root sys 96 Feb 25 09:51 model.orig

After..
drwxr-xr-x 2 root sys 96 Feb 25 09:51 model.orig

How this got change I'm not really sure but it had to be me.

THANKS for all of the help guys. I learned a lot these last two days!
Bill Sadvary
Frequent Advisor

Re: Can't print to network printer

Wait a minute. It wasn't my wrong doing, the incorrect perms, that is, as I stated above.

It had to be bastille. Maybe when I disabled the lpr services, which I thought would disable the host from being a remote print server. ??

When I went to add a printer to another system, running bastille with the same config, it had the perms set to 700. On yet another system where I have yet to run bastille, the perms are correctly set to 755. Not conclusive evidence but..
Robert Fritz
Regular Advisor

Re: Can't print to network printer

Hi Bill,

I'm sorry for the trouble you've had. I'm on the Bastille development team, and hopefully, I can help clear up a couple things.

Bastille doesn't actually directly chmod file permissions on system files, though it does perform a directory permissions audit, if you select that option. That produces a template script that has to be edited and run manually.

The most likely scenario that involves Bastille and is consistent with the scenario you describe would be the feature that, if you ask it to, Bastille will change the default umask to the setting you specify. This affects files you create, and sometimes, configuration or installation scripts that don't explicitly set the permissions they need.

If you'd installed or updated model.orig while the umask was 077 (set by you or Bastille), and then saw this behavior, then please submit a defect against that product, since products should be explicit about the permissions they need. A umask change is a supported option.

Since Bastille only reverts changes it makes, Bastille would not "revert" this file, just the umask default

Or alternatively, another application or administrative change could have occurred.

Hope that helps.

-Robert
Those Who Would Sacrifice Liberty for Security Deserve Neither." - Benjamin Franklin
Bill Sadvary
Frequent Advisor

Re: Can't print to network printer

closing