Re: lpadmin: corrupted member file (289 Views)
Reply
Acclaimed Contributor
Dennis Handly
Posts: 24,978
Registered: ‎03-06-2006
Message 26 of 38 (392 Views)

Re: server inaccessible via telnet (rc.config.d garbage)

>You mean that the /sbin/init.d/SnmpMaster is the script that is having syntax error and not the /etc/rc.config.d/SnmpMaster file?

 

Not quite.  I meant a copy of  /sbin/init.d/SnmpMaster was changed then moved to
/etc/rc.config.d/SnmpMaster.


>>Can you check the directory modification dates of /etc/rc.config.d?

>kindly find attached corresponding output.

 

Sorry, directory modification date.  Not files.  You need to add a -d.

>It's a backup server that each dept can use, how can I find if someone enabled SnmpMaster?

 

The size changed back in Nov.  Has the system been up that long until recently?

 

>I will try to post the output of an older one stored in /etc/rc.log.old

 

That's not likely to be old enough.  You want one old enough to cover the last time it booted successfully.

>Could you clarify more regarding this point of view?

 

Someone edited the rc script (/sbin/init.d) and put it into the config (rc.config.d) directory.

>what can be the best solution to re-enable inetd?


Copy /usr/newconfig/etc/rc.config.d/SnmpMaster there.

 

I'd also be suspicious of these other modifications:

2206 Nov 16 11:10 SnmpHpunix

2272 Nov 16 11:18 SnmpMib2

 

>move the Snmp files into old and recover the original files from /usr/newconfig/etc/rc.config.d

 

Right.

Please use plain text.
Super Advisor
meekrob
Posts: 375
Registered: ‎02-24-2003
Message 27 of 38 (379 Views)

Re: server inaccessible via telnet (rc.config.d garbage)

Hello All,

 

we lately found that this behavior is occurring after each accidental restart of the server.

The new issue that we are facing is when adding a new printer to the server. We already had old printers configured on the server but right now and when adding a new one, we are getting the below output:

 

HP-UX unknown B.11.31 U ia64 (td)

 

Please wait...checking for disk quotas

(c)Copyright 1983-2006 Hewlett-Packard Development Company, L.P.

(c)Copyright 1979, 1980, 1983, 1985-1993 The Regents of the Univ. of California

(c)Copyright 1980, 1984, 1986 Novell, Inc.

Network Printer Configuration

Network Printer Configuration

 

     Configurable Parameters:             Current Settings

     ------------------------             ----------------

     1) Lp destination name:              [LPSYLIVE]

     2) Network System name:              [10.11.1.200]

     3) Printing Protocol/Interface:      [LPD]

     4) Remote Printer name:              [lpliv]

     5) lpd Banner page:                  [Enable]

 

     m) Model Script Selection:           [(N/A)]

 

 

Network Printer Configuration

 

     Configurable Parameters:             Current Settings

     ------------------------             ----------------

     0) Done. Make Configuration now!

     1) Lp destination name:              [LPSYLIVE]

     2) Network System name:              [10.11.1.200]

     3) Printing Protocol/Interface:      [LPD]

     4) Remote Printer name:              [lpliv]

     5) lpd Banner page:                  [Enable]

 

     m) Model Script Selection:           [ESCP]

     c) Configure options of the Model Script

 

     q) Quit

 

Select an item for change or select 0: 0

 

WARNING: This operation requires lp spooler be shut down.

The spooler will be running again after this operation is done.

If there are jobs currently being printed, those are reprinted in

their entirely after spooler is started again.

 

OK to continue? (y/n, default-n): y

lpadmin: corrupted member file

 

 

Error occurred during printer adding procedure!

Press the return-key to return to main menu...

 

we tried to restore the "lpadmin" file under /usr/sbin from a recent backup without success.

Any suggestion plz?

 

Regards

Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,978
Registered: ‎03-06-2006
Message 28 of 38 (375 Views)

Re: lpadmin: corrupted member file

[ Edited ]

>lpadmin: corrupted member file

>/usr/sbin/lpadmin from a recent backup without success.

 

The problem wasn't in lpadmin but one of the printer config files.

 

Please use plain text.
Super Advisor
meekrob
Posts: 375
Registered: ‎02-24-2003
Message 29 of 38 (369 Views)

Re: lpadmin: corrupted member file

Could you please specify?

How to know which file among multiple files related to lp is the one concerned?

 

Thanks in advance

Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,978
Registered: ‎03-06-2006
Message 30 of 38 (358 Views)

Re: lpadmin: corrupted member file

>Could you please specify?

 

Unfortunately the message doesn't say which.  :-(

Please use plain text.
Super Advisor
meekrob
Posts: 375
Registered: ‎02-24-2003
Message 31 of 38 (368 Views)

Re: lpadmin: corrupted member file

So in your opinion what is the best solution in this case?

 

Regards

Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,978
Registered: ‎03-06-2006
Message 32 of 38 (364 Views)

Re: lpadmin: corrupted member file

>what is the best solution in this case?

 

What program are you running to add the printer?

Run tusc on that to see which file it doesn't like:

tusc -fp -ea -o tusc.out your-program ...

Please use plain text.
Super Advisor
meekrob
Posts: 375
Registered: ‎02-24-2003
Message 33 of 38 (362 Views)

Re: lpadmin: corrupted member file

what do you mean by "What program are you running to add the printer?"

In fact, im trying to add the network printer via SMH -> Printers and Plotters

 

 

Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,978
Registered: ‎03-06-2006
Message 34 of 38 (338 Views)

Re: lpadmin: corrupted member file

>I'm trying to add the network printer via SMH -> Printers and Plotters

 

That's exactly what I mean.  You may what to start up SMH and then use tusc to trace the running PID.

Please use plain text.
Super Advisor
meekrob
Posts: 375
Registered: ‎02-24-2003
Message 35 of 38 (321 Views)

Re: lpadmin: corrupted member file

Ive just also found that when trying to remove an already existing printer, im getting a similar output as follows:

 

A problem occurred doing "lpadmin -xlp_53". stderr from this command is "/usr/sbin/lpadmin: corrupted member file." Unable to remove printer "lp_53" because of above errors.

 

What do you suggest in this case especially that im given a special authorization to access as root however, im not allowed to install 3rd party tools as "tusc" on this critical platform. Is there an alternative work-around ?

 

Thanks in advance

Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,978
Registered: ‎03-06-2006
Message 36 of 38 (311 Views)

Re: lpadmin: corrupted member file

>I've just also found that when trying to remove an already existing printer

 

That's good, you have a much smaller test case to run from tusc.

 

>I'm not allowed to install 3rd party tools as "tusc" on this critical platform. Is there an alternative work-around?

 

Not really.  tusc is the right tool for the job.

About the only thing you could do is install tusc on another system and then see what files lpadmin tries to open and compare those files on the bad system.  Unfortunately on your working system, you won't know which file is bad or which syscall is going bad.

 

Please use plain text.
Super Advisor
meekrob
Posts: 375
Registered: ‎02-24-2003
Message 37 of 38 (301 Views)

Re: lpadmin: corrupted member file

[ Edited ]

Many thanks for your support. Regarding this situation im still searching for a solution without success.

I proceeded to generate the output file from tusc.out as you suggested from a running test server and attached it.

Could you please provide some help/suggestion by taking a look into that file and help to interpret it as i do not have any idea about those HP-UX internals procedures? In your opinion, what are the critical files that need to be replaced in that case?

In addition, suppose that replacing those files didn't work as expected and in the worst case scenario can an OS reinstallation (clean install) be avoided? and suppose that i have a similar server model that is functioning properly with the same applications installed on the same network (different hostname / ip addresses...) can an image of this running server solve this issue by redeploying it to the one having problems? Does this procedure affect file systems on volume groups (vg01 / vg02 ....) having different disks hardware paths and using legacy addressing scheme?

If you were in my place how will you proceed?

 

Regards

Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,978
Registered: ‎03-06-2006
Message 38 of 38 (289 Views)

Re: lpadmin: corrupted member file

>Could you please provide some help/suggestion by taking a look into that file and help to interpret it as i do not have any idea about those HP-UX internals procedures? In your opinion, what are the critical files that need to be replaced in that case?

 

Ok.  Good thinks to look for are execve, open, access, stat and unlink:

grep -e open -e execv -e unlink -e access -e stat output.txt

 

You get something like:

[5689] execve(0x9fffffffffffec30, 0x9ffffffffffff788, 0x9ffffffffffff7a0) [entry]
                              argv[0] @ 0x9ffffffffffff840: "lpadmin"
                              argv[1] @ 0x9ffffffffffff848: "-xlp_53"
[5689] execve("/usr/sbin/lpadmin", 0x9ffffffffffff788, 0x9ffffffffffff7a0) = 0 [32-bit]
...
[5689] open("/var/spool/lp/pstatus", O_RDONLY|O_CREAT|O_NONBLOCK, 0640) = 4
[5689] close(4) .......................................... = 0
[5689] open("/var/spool/lp/qstatus", O_RDONLY|O_CREAT|O_NONBLOCK, 0640) = 4
[5689] close(4) .......................................... = 0
[5689] stat("/etc/lp/member/lp_53", 0x7fffd940) .......... = 0

 

So it look like this maybe the "member" in the error message?


[5689] open("/var/spool/lp/FIFO", O_WRONLY|O_NDELAY, 01200) = 4
[[5689] close(4) .......................................... = 0
[5689] access("/var/spool/lp/SCHEDLOCK", F_OK) ........... = 0
[5689] access("/var/spool/lp/FIFO", F_OK) ................ = 0
[5689] access("/var/spool/lp/CLD_FIFO", F_OK) ............ = 0
[5689] open("/var/spool/lp/qstatus", O_RDONLY|O_CREAT|O_NONBLOCK, 0640) = 4
[5689] close(4) .......................................... = 0
[5689] open("/etc/lp/member/lp_53", O_RDONLY|O_CREAT|O_NONBLOCK, 0640) = 4


[5689] open("/var/spool/lp/outputq", O_RDONLY|O_CREAT|O_NONBLOCK, 0640) = 5
[5689] unlink("/etc/lp/member/lp_53") .................... = 0

Here is "member" again.

 

[5689] close(5) .......................................... = 0
[5689] open("/var/spool/lp/tqstatus", O_RDWR|O_CREAT|O_TRUNC|O_NONBLOCK, 0640) = 5
[5689] open("/var/spool/lp/qstatus", O_RDWR|O_CREAT|O_NONBLOCK, 0640) = 6
[5689] unlink("/var/spool/lp/tqstatus") .................. = 0
[5689] close(6) .......................................... = 0
[5689] close(5) .......................................... = 0
[5689] open("/var/spool/lp/tpstatus", O_RDWR|O_CREAT|O_TRUNC|O_NONBLOCK, 0640) = 5
[5689] open("/var/spool/lp/pstatus", O_RDWR|O_CREAT|O_NONBLOCK, 0640) = 6
[5689] unlink("/var/spool/lp/tpstatus") .................. = 0
[5689] close(6) .......................................... = 0
[5689] close(5) .......................................... = 0

[5690] execve(0x60000000c0238a60, 0x200000007fffcdc0, 0x7ffff804) [entry]
                              argv[2] @ 0x7fffd310: "rm -fr /var/spool/lp/request/lp_53"
[5690] execve("/usr/bin/sh", 0x7fffcdc0, 0x7ffff804) ..... = 0 [32-bit]
[5691] vfork() .........(returning as child ...) ......... = 5690
[5691] execve(0x40024de0, 0x40024e00, 0x40024e80) ........ [entry]
                              argv[0] @ 0x40024e20: "rm"
                              argv[1] @ 0x40024e40: "-fr"
                              argv[2] @ 0x40024e60: "/var/spool/lp/request/lp_53"
...
[5689] unlink("/etc/lp/interface/lp_53") ................. = 0
[5689] unlink("/etc/lp/interface/#lp_53") ................ ERR#2 ENOENT
[5689] unlink("/etc/lp/interface/lp_53#") ................ ERR#2 ENOENT
[5689] unlink("/var/spool/lp/cinterface/lp_53") .......... ERR#2 ENOENT
[5689] unlink("/var/spool/lp/cinterface/#lp_53") ......... ERR#2 ENOENT
[5689] unlink("/var/spool/lp/cinterface/lp_53#") ......... ERR#2 ENOENT
[5689] unlink("/var/spool/lp/sinterface/lp_53") .......... ERR#2 ENOENT
[5689] unlink("/var/spool/lp/sinterface/#lp_53") ......... ERR#2 ENOENT
[5689] unlink("/var/spool/lp/sinterface/lp_53#") ......... ERR#2 ENOENT

[5689] unlink("/etc/lp/member/lp_53") .................... ERR#2 ENOENT

 

Things you could try removing.


[5689] open("/var/spool/lp/FIFO", O_WRONLY|O_NDELAY, 01200) = 4
[5689] close(4) .......................................... = 0
[5689] open("/var/spool/lp/default", O_RDONLY|O_CREAT|O_NONBLOCK, 0640) = 4
[5689] close(4) .......................................... = 0
[5689] open("/var/spool/lp/default", O_WRONLY|O_CREAT|O_TRUNC|O_NONBLOCK, 0640) = 4
[5689] close(4) .......................................... = 0

>suppose that replacing those files didn't work as expected and in the worst case scenario can an OS reinstallation (clean install) be avoided?

 

Sure, you just need to remove your printer config, status files and put it back.

Under SAM, there was a command to save and restore that you could use.  In your case you would have to have a backup, before it went bad.

 

>can an image of this running server solve this issue by redeploying it to the one having problems?

 

Do you have the same printers installed there?

 

>If you were in my place how will you proceed?

 

Install tusc so you can see what files have the errors.

But we do have a relation between the "member" in the error message and a directory:

/etc/lp/member/

 

What are in those files, at least the bad one and one good one?

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation