Operating System - HP-UX
1827280 Members
2219 Online
109717 Solutions
New Discussion

missing a character in print out

 
SOLVED
Go to solution
Grace Li
Frequent Advisor

missing a character in print out

End-user reported an order print off this morning which is missing information. It printed off asking ot sell IGI04 when it should have said IGI014. We've done below process but the issue remain unresolved. (1) a firmware upgrade (2) replace the actual "Jet direct" print server and all attached cables (3) move the data drop to a new port on the switch. Any idea what else we can do?
33 REPLIES 33
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: missing a character in print out

Yes, you can better describe your problem. Specifically, what model printer? I realize that you said "Jet direct" but that does not automatically make this a Network printer rather than a Remote printer (in HP-UX speak). It could even be a directly attached printer for all I know. In any event, I suspect what is happening is that depending upon what the final characters are, the printer is not flushing it's page buffer. The "missing" characters may be on the next page that never is printed because the next job clears the buffer. Generally, you need to add some control sequences to the interface file that will flush output rather than waiting for a timeout but since I have no idea of the printer model or connection mode, I refuse to guess. In many cases, all that is required is tacking on an ASCII FF.
If it ain't broke, I can fix that.
Grace Li
Frequent Advisor

Re: missing a character in print out

It is a dot matrix printer, network printer connected to a HP-UX server. The character missing is random. Does not look like occurs on next page, but rather a the top part for first page.
Patrick Wallek
Honored Contributor

Re: missing a character in print out

I'm not sure how dropping a character in the middle of a work (IGI04 vs. IGI014) could be defined as a printer problem.

Have you checked to actual order to verify that is does in fact say IGI014? That would be my first step rather than changing out printer components.
Grace Li
Frequent Advisor

Re: missing a character in print out

I did checked the order and confirmed one character is missing. In fact, this issue is not new to us. We've changed printer, network hardware, but the issue remains. At one time, a firmware upgrade fix the problem, but now it happens again. Another thing is the software program definately did not generate this error (i.e. program is not interlegent enough to omit just on character randomly). --grace
A. Clay Stephenson
Acclaimed Contributor

Re: missing a character in print out

Your description of the problem is a bit garbled and your description of your printer/jetdirect combination is still lacking in detail.

It printed off asking ot sell IGI04 when it should have said IGI014.

If that means that a '1' was dropped from '014' (and if I can assume that this is an external jetdirect connected via a parallel or serial port to the dot matrix printer) and since you said characters are being dropped randomly then that is the classic definition of a handshake problem. It means that the printer needs to tell the external jetdirect to wait but either the printer isn't doing that or the jetdirect isn't listening or even getting that signal. Handshaking can either be hardware or software but since you aren't very big on details ...

In some cases, control sequnces must be sent to the printer to set up handshaking and in others is set via front panels or DIP switches.
If it ain't broke, I can fix that.
Grace Li
Frequent Advisor

Re: missing a character in print out

I am novice SA.
(1) How to implement the "control sequence" to the interface file? It seems to me the dox matrix printer is dedicated to the unix server. I was told only the fialed order goes to this printer. Nothing else will be printed out.
(2) How to find out the config/description details of this printer? I check the hosts file, I can see the IP and name "mfoms1", but when i check the /var/spool/lp/interface I can NOT find the file "mfoms1".
A. Clay Stephenson
Acclaimed Contributor

Re: missing a character in print out

Note that a print queue can be named anything and multiple logical printers (queues) can be associated with the same physical printer (e.g queue mickey might use physical printer mouse and default to portrait mode whereas queue minnie might also use physical printer mouse but default to landscape mode).

You need to find out what queue name is actually associated with mport. If this is a standard network interface file then there will be a line /var/spool/lp/interface/xxx that looks like this:
PERIPH=mport
or
PERIPH=mport_ip_address

However, it is also possible that the application does not use the spooler at all but instead outputs directly to the 9100 port or uses the hpnpf filter.
If it ain't broke, I can fix that.
Grace Li
Frequent Advisor

Re: missing a character in print out

That's right. The standard lp interface is NOT used in this case. I am pretty sure the printer's logical name and there is no such file "/var/spool/lp/interface" associated with it.
By the way, I found out more info RE this printer: Lexmark Forms printer 2400 series.

Here is another issue user just reported: it shows "AGF01" when it should have printed "AGF801".

Can you give me an idea what kind of measure we can put in to track/correct the missing letter?
A. Clay Stephenson
Acclaimed Contributor

Re: missing a character in print out

You are making this very hard to diagnose. If you are certain that the lpsubsystem is not being used then you also need to make certain that no spooler subsystem (CUPS, Distributed Print Service) is being used. If that is the case then you need to find out exactly how the application is communicating with the printer. NOTE that is is also possible (though generally dumb) to configure a JetDirect card to use the LPR/LPD protocol and thus be a remote printer.

Before doing anything else, issue an lpstat -p and an lpstat -v command and make sure that your printer is not listed.

Also, what is the model of the JetDirect being used and how is the JetDirect connected to the printer?
If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: missing a character in print out

There's only one way to isolate this type of problem. You will have to disable the printer, print a job to it, then copy the spooler file to a temporary location. Then enable the printer and check to see if there are missing characters. If so, look at the copied file that you previously saved. If the character is missing in that file, then the application program made the mistake -- it told the printer to print exactly what you see.

If the print file is clean, then you may have a printer pacing or interface compatibility issue. Pacing is the handshake that goes on between the network card (ie, JetDirect) and the internal printer memory. Or the printer is not compatible with enhanced parallel port printing (ie, EPP or IEEE-1284 standard). Since there are many, many different JetDirect interface adapters, yours may have the ability to turn off EPP. If your JetDirect card has a web interface, this should be fairly easy.

Otherwise, you will need a good network consultant with HP-UX, Jetdirect and Lexmark printer experience and lots of time to trace the problem.

Oh, paying for the first couple of consulting hours will easily buy a new HP LaserJet with a built-in JetDirect card.


Bill Hassell, sysadmin
Grace Li
Frequent Advisor

Re: missing a character in print out

Here is the JetDirect model:
Lexmark Forms Printer 2480
NPIF98B57
Product: J3263G
Version: ROM H.08.08, EEPROM H.08.60

I also use "lpstat -p" to grep for that printer, it is not included in the list of printers.

End-user confirms that among the hunderds of order printed out every week, there are a couple of orders have the missing charactore. Further more, the error happens dynamically, not attached to specific field. Plus, the order can be displayed via the application and no charactor is missing.

We have ask the network engineer to check the traffic between the server to printer. Nothing out of ordinary.
Bill Hassell
Honored Contributor

Re: missing a character in print out

> Here is the JetDirect model:
> Product: J3263G

Yes, this is a JetDirect External print server, a fancy name for a LAN-to-printer adapter.

> I also use "lpstat -p" to grep for that printer, it is not included in the list of printers.

That is a big problem. It means that your setup is very non-standard. Are you using a commercial print spooler? What commands do you use to setup a new printer? What command do you use to print a file? Or do you not use the lp command at all?


Bill Hassell, sysadmin
Grace Li
Frequent Advisor

Re: missing a character in print out

This printer is dedicated to print orders, which is generated by a program. I check 'lpstat -pprintername' and return is printer not exist. I then use '/opt/hpnp/bin/hpnpadmin printername' and return is ready to print.
There is a reason why we still use this dot matrix printer. The order to be printed out request dedicated (not shared) printer, no interruption due to paper feed, etc.
Grace Li
Frequent Advisor

Re: missing a character in print out

where can i find the printer config data? similar to /etc/printcap in BSD system.

I tried 'lpstat -v' and it does NOT include the printer either.

I believe the software program has its own way to send print task to this printer. This has to do with the order because it is real-time/randomly generated, can NOT be recreated, and requested special attention.
Grace Li
Frequent Advisor

Re: missing a character in print out

To answer the feasibility of running some tests: there are over 1000 orders printed each week, among which only a couple of orders have missing charactor. It is like to find a needle in the hay.
However, the risk (of just one error print-out) is substantial because we found one order has the error on value, it is supposed to buy $15,505 (as displayed in the program) but the printed order shown $1,505. Here missing one digit is significant.
A. Clay Stephenson
Acclaimed Contributor

Re: missing a character in print out

Worrying about a printcap equivalent makes no sense if you are certain that the lp subsystem (or an equivalent replacement product) is not being used. The terminfo database can be used to describe printers as well as terminals and an application can query it to build control sequences.

While it is possible that someone wrote an application that directly connects to port 9100 on the printer, that would be highly unusual. You are going to have to find exactly the mechanism that is in use that connects this application to the external jetdirect. It's probably time to talk to the application developers. At the very least, there has to be something in the application that identifies the printer and if an external program is used, which one.

One approach to narrowing down the search would be to use a tool such as Wireshark and examine the packets that are sent to/from the jetdirect.

If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: missing a character in print out

As Clay points out, this is a totally customized connection and you have been left with zero documentation. The lp spooler is not being used so your hpnpadmin command is simply asking for status from the JetDirect adapter. It is imperative that you get help from the application writers, first in the form of detailed documentation of how printing takes place and then how to solve the missing character(s) problem. At some point in the future, printing may stop completely and no one will be able to help except the writer.

As an aside, I would never allow any software like this to run on my production systems. The vendor may go out of business next week and now you will be waiting for a total disaster to occur. Anyone that comes in to try to fix the problem will spend many hours trying to reverse engineer this design.


Bill Hassell, sysadmin
OldSchool
Honored Contributor

Re: missing a character in print out

dropped characters in the "middle" of the print-out generally indicate that the memory buffer in the printer has overflowed.

you really need to determine how print-outs get sent to this device. Is the application a purchased product or developed in-house? If in-house, talk to the developers about how they print.


Grace Li
Frequent Advisor

Re: missing a character in print out

Thanks you guys. Good point. The program belongs to a 3rd party software, source code is encrypted. I have been dealing with this vendor for months, while they do not agree anything at the software level. I started to look at the hardware, network area.

The only thing is we can not re-produce the error.
OldSchool
Honored Contributor

Re: missing a character in print out

ok, its third party. Ask them how / where / what they do to print.

some Multi-value db products can "print" to the term emulator which sends it to Windows printer w/o ux lp in it at all.

Grace Li
Frequent Advisor

Re: missing a character in print out

Could you elaborate? How does that output to window printer work from a unix server to a remote/network printer? Just curious to know the filter/driver/config, which format the input data and might drop a letter.
A. Clay Stephenson
Acclaimed Contributor

Re: missing a character in print out

The only way I can think of to address this issue is to do it like this:

Install an absolutely identical external JetDirect and identical printer --- differing only in the IP address. Make certain that all other JetDirect and printer configurations are identical to those on your production system. Depending on the availability of the printer, you can probably find it on the used equipment market or even eBay.

Do not actually configure this printer into the lpsubsystem but rather send output to it using the hpnpf utility FROM THE SAME PRODUCTION SERVER.

You should be able to write a script that will output hundreds of output jobs. If this configuration does not drop characters then move this test JetDirect/printer combination to production (changing the IP address of the JetDirect). If characters are still dropped then you have narrowed the problem to whatever program is actually sending output to port 9100 on this printer. Hpnf observes all the port 9100 protocol rules; I suspect that your application's equivalent almost works perfectly --- the worst kind of problem to debug.

NOTE: This plan assumes that you are indeed using the port 9100 protocol; I have yet to hear you confirm even that data.
If it ain't broke, I can fix that.
OldSchool
Honored Contributor

Re: missing a character in print out

until you know "how" its getting printed, this really doesn't matter:

you keep coming back to filters, printcap et. al. when the issue really *really* appears to be a buffer overflow caused by a lack of handshaking between the JetDirect and the printer itself.

I really don't know (nor do I care) about the details of how its done, but UniVerse, MVBase and other MultiValue databases can communicate w/ emulators (such as AccuTerm) such that a print operation from the server sends data to the emulator. the emulator then allows you to specify the destination for the print. It ususally has settings for "local print" (hardwired com port) or allows printing to any printer defined in the windows network.

Those same databases usually have their own spooling software that is used to send jobs to standard unix print queues via the lp command.

until the issue of how the stuff gets printed gets sorted out, you're not going to make much progress.

I'd call the vendor's support folks and explain to them that your trying to isolate the cause of random, dropped characters in mid-print out, and you would like to know the mechanism they are using to print if it is something other than "lp".

Without that info, you can't send test data to the printer, so I don't know how you can procede w/o determining the methodology first.
OldSchool
Honored Contributor

Re: missing a character in print out

A. Clay said "Install an absolutely identical external JetDirect and identical printer --- differing only in the IP address. Make certain that all other JetDirect and printer configurations are identical to those on your production system"

I whole-heartedly agree! But from the what I've seen so far, it appears that the printer is question isn't even configured. If it is, noone appears to know even the printers logical name, much less anything else about it.