1827073 Members
2648 Online
109713 Solutions
New Discussion

Re: Printing Headaches

 
SOLVED
Go to solution
Sean Furman_1
Advisor

Printing Headaches

I posted before trying to copy the configuration data for all my printers from a failed server to a new server. Now, I am getting an error indicating "lpstat" can't open output queue file. I have stopped and started the lp process. Any ideas?
I had started copy some directories from my old drive. When I finished I had problems so I copied everything back to the way it was before I messed with it. Still is indicating that error.
17 REPLIES 17
V.Tamilvanan
Honored Contributor

Re: Printing Headaches

Hi,

Check the ownership of /etc/lp,/var/spool/lp directories . They suppose to have user ownership of lp and group ownership of bin.

HTH
Sridhar Bhaskarla
Honored Contributor
Solution

Re: Printing Headaches

Hi,

Looks like you missed something. Do you have anything there under /var/spool/lp directory?. There should be a file called "outputq" with lp as the owner and sys as the group. If the file is missing, then 'touch outputq' and chown the owner and group
with 644 permissions.

Permissions are very important for the printer setup. While copying the dictories/files, if you didn't preserve the permissions, then printers wont work.

/etc/lp, /var/spool/lp and /var/adm/lp should be owned by lp and the group bin.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sean Furman_1
Advisor

Re: Printing Headaches

You were correct. The permissions were set wrong. I changed the permission on the pstatus outputq and q status to lp:sys. I am not sure what the "644" permission thing you spoke about. I copied my printer config from my bad server from /etc/lp to my good /etc/lp. Copied ok however when I run lpstat I do not see any printers. I no longer get errors when I type lpstat. Should all of the files in that /var/spool/lp have the same permissions. I need a better explaination of the permissions.
Sean Furman_1
Advisor

Re: Printing Headaches

Also, I checked sam, and all of the printers appear in the list put I cannot get the print spooler to start. I am very close I guess. I might have a permissions issue with some of the other files.
Sridhar Bhaskarla
Honored Contributor

Re: Printing Headaches

Hi,

The outputq should have 644 permissions something like this

-rw-r--r-- 1 lp sys 996 Aug 19 2002 outputq


As I said before copying /etc/lp alone is not sufficient. You will need to have /var/adm/lp and /var/spool/lp also as they are without permission or ownership changes.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sridhar Bhaskarla
Honored Contributor

Re: Printing Headaches

I forgot to mention - you will get more information from /var/adm/lp/log file.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sean Furman_1
Advisor

Re: Printing Headaches

Hey Sri-

Should all of the files under /var/spool/lp/ have lp:sys.

and all of the files under /var/adm/lp and /var/spool/lp have lp:bin????

I will check the log file
Sean Furman_1
Advisor

Re: Printing Headaches

Here is the log file output.
Sean Furman_1
Advisor

Re: Printing Headaches

here is /var/spool/lp
Sean Furman_1
Advisor

Re: Printing Headaches

here is /etc/lp
Sean Furman_1
Advisor

Re: Printing Headaches

here is /var/adm/lp
Sridhar Bhaskarla
Honored Contributor

Re: Printing Headaches

Hi Sean,

I still feel you didn't copy the files and directories properly. You log indicates that the request directories are missing.

This is what I would do.

1. Backup the new lp directories on the current server

mv /etc/lp /etc/lp.new
mv /var/adm/lp /var/adm/lp.new
mv /var/spool/lp /var/spool/lp.new

2. On the old server, take a tar of all the lp directories

tar cvf /tmp/lp.tar /etc/lp /var/spool/lp /var/adm/lp

Copy /tmp/lp.tar onto the new system.

3. Untar lp.tar.

tar xvf /tmp/lp.tar. This will restore all the above directories with permissions.
Remove /var/spool/lp/SCHEDLOCK file.

4. Run lpsched and it should start.

As mentioned in the other thread, use 'transferqueue' command to tranfer the printers to jetdirect.

If anything fails, then move back the original files.

#rm /var/spool/lp /var/adm/lp /etc/lp
#mv /etc/lp.new /etc/lp
#mv /var/adm/lp /var/adm/lp
#mv /var/spool/lp.new /var/spool/lp


-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Sean Furman_1
Advisor

Re: Printing Headaches

Great reply!!! Only one problem on my old system I do not have the adm directory on var and the spool directory under var. Is this a big problem???? Maybe it was corupt???? I did have /etc/lp directory. Let me know what you think.
Sridhar Bhaskarla
Honored Contributor

Re: Printing Headaches

Hi,

I looked at the permissions. Some of them are wrong. Particularly /var/spool/lp/request.

This should be owned by lp:bin. Underneath it you will see subdirectories with each printer's name. They should be owned by lp:lp.

It will be very difficult to fix the permissions for each and every file.

If you follow my above tar procedure, it will restore the permissions back.

-Sri

PS: You do not need to assign points until your issue is completely solved. This may be my last post as it is too late here.
You may be disappointed if you fail, but you are doomed if you don't try
Sridhar Bhaskarla
Honored Contributor

Re: Printing Headaches

Hi,

It is a problem. You will need to have /var/spool/lp as most of the configuration is there.

If your old system was configured with LVM, then /var would be on a seperate filesystem. You would need to mount the corresponding logical volume. You can get it by looking at /etc/fstab file. Once you mount that filesystem, you should be able to retrieve these two directories.

-Sri

PS: PLEASE PLEASE PLEASE do not assign any points. I may not be able to help you completely as it is too late now and I have to get up early in the morning. Thanks.

You may be disappointed if you fail, but you are doomed if you don't try
Sean Furman_1
Advisor

Re: Printing Headaches

Hey Sri I got it working!!! all I need is the correct tar command to restore the lp.tar to the /etc/lp folder.... SO CLOSE
Gavin Clarke
Trusted Contributor

Re: Printing Headaches

Just curious, doesn't, tar xvf /tmp/lp.tar work?