Solved

lpd does not work

Posted on 1997-05-03
21
421 Views
Last Modified: 2013-12-15
I recently installed Linux Slackware 3.2 and aps filter 4.1.9 magic filter for my Hp Deskjet 660Cse printer. At startup, I get several error messages as follows:

When lpd daemon starts, it prints the date followed by
"Get_local_hostname: hostname 'Micron' bad".

And whenever I run lpd, lpr, lpq, lpc, or lprm, I get the same messge.

When I type hostname, it returns 'Micron', which is the contents of /etc/HOSTNAME. I inserted "localhost" and "Micron" into /etc/hosts.equiv and installed LPRng version 3.2.3, but I still have the same problem.

I really appreciate if you let me know how I can use my printer and remove those error messages.

Thanks,
Mehrdad
0
Comment
Question by:mehrdad042597
  • 10
  • 9
  • 2
21 Comments
 
LVL 1

Expert Comment

by:t2pp
Comment Utility
I had the same problem when trying to get my HP 690C going. I gave up and used dj-printcap.tar.gz instead. It does text and postscript printing perfectly. Hope that helps.
0
 

Author Comment

by:mehrdad042597
Comment Utility
I tried dj-printcap.tar.gz, but it did not solve the problem.

Mehrdad
0
 
LVL 1

Accepted Solution

by:
ggeens earned 50 total points
Comment Utility
I suspect you don't have networking support compiled into the kernel. LPRng needs that.
You should recompile your kernel with networking support enabled (don't select any devices, not even loopback).
Then, you should install the TCP/IP package.
You only need two programs actually: route and ifconfig.
Make sure the following two lines are in /etc/rc.d/rc.inet1:
ifconfig lo 127.0.0.1
route add -net 127.0.0.0

0
 

Author Comment

by:mehrdad042597
Comment Utility
Hi ggeens,

I had networking support compiled into the kernel, and I could dialup and access internet and run telnet, netscape and other TCP/IP applications. This problem seems to get way too complicated.

Mehrdad
0
 

Author Comment

by:mehrdad042597
Comment Utility
Hi ggeens,

There are several error messages at startup as follows:

Updating module dependecies for Linux 2.0.29:
lp: unable to get major 6
/lib/modules/2.0.29/misc/lp.o: init_module: Device or resource busy

My printer used to work with Linux 1.2.13, but now I have all these problems with the new version!?
                       
Thanks,
Mehrdad
0
 
LVL 1

Expert Comment

by:ggeens
Comment Utility
Are the devices (/dev/lp?) correct?
Do you have support for parallel ZIP drives installed?
0
 

Author Comment

by:mehrdad042597
Comment Utility
Hi,

I don't have support for parallel ZIP drives, and all /dev/lp? seem to be OK.

Mehrdad
0
 
LVL 1

Expert Comment

by:ggeens
Comment Utility
Can you send a file directly to the printer?
Is lp support built into the kernel?

What is the contents of your /etc/hosts file?

0
 

Author Comment

by:mehrdad042597
Comment Utility
Hi,

Yes, I can send a file directly to the printer, and lp support is built into the kernel.

The contents of /etc/hosts is:
127.0.0.1    localhost

Mehrdad
0
 
LVL 1

Expert Comment

by:ggeens
Comment Utility
You should comment out the line in rc.modules that loads the lp module.
There should be a line in /etc/hosts with your hostname in it:
If you have a network, it should contain your IP address, otherwise, you can just use 127.0.0.1

0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

Author Comment

by:mehrdad042597
Comment Utility
I commented out the line in rc.modules and added my hostname to /etc/hosts. Now, the error messages at startup are gone, but it takes several minutes to let me login. I think it tries to find Micron (my hostname) at 127.0.0.1, and even after that when I type lpq, I get the error message that cannot find lpq@Micron. A friend of mine has installed Slackware 3.2 on his machine too and he has exactly the same problem.

Mehrdad


0
 
LVL 1

Expert Comment

by:ggeens
Comment Utility
Does the boot process `hang' somewhere, and if so, what is the last thing printed?
Is the lpd process running?
What is the contents of your /etc/host.resolv file?

0
 

Author Comment

by:mehrdad042597
Comment Utility
I do not have /etc/hosts.resolv.


0
 
LVL 1

Expert Comment

by:t2pp
Comment Utility
Mehrdad - I would be a good idea to answer *ALL* the questions asked, so that people may help you.
0
 
LVL 1

Expert Comment

by:ggeens
Comment Utility
That's ok. I don't have one either :)
I was wrong about the name. It should have been /etc/resolv.conf
And I need the answers to the other questions too.
0
 

Author Comment

by:mehrdad042597
Comment Utility
The answer to the above questions are:

1. Does the boot process `hang' somewhere, and if so, what is the last thing printed?
When I add "127.0.0.1 Micron" to /etc/hosts it will wait for a couple of minutes right after starting 'sendmail' before giving the prompt. So I commented  out its entry in /etc/rc.d/rc.M. Now, when I type lpq, it return cannot connect to ASCII@localhost.

2. Is the lpd process running?
Yes, lpd is running.

3. What is the contents of your /etc/host.resolv file?
The file contains:
domain umd.edu
nameserver 128.8.5.2
nameserver 128.8.74.2
nameserver 128.8.76.2

Mehrdad
0
 
LVL 1

Expert Comment

by:ggeens
Comment Utility
Is there a line
127.0.0.1 localhost
in /etc/hosts ? If not, add one.
Are there any error messages from sendmail in the logfiles?
0
 

Author Comment

by:mehrdad042597
Comment Utility
Yes, there is a line 127.0.0.1 localhost in /etc/hosts.
No, there are not any error messages from sendmail in the logfiles.


0
 
LVL 1

Expert Comment

by:ggeens
Comment Utility
You should add a line with your real IP address (not 127.0.0.1) and your hostname to /etc/hosts . Otherwise sendmail will try to contact the nameserver.
What is the version number of lpd (lpr -V)? There have been a lot of Linux-specific patches.
The latest version is 3.2.5. You can get it from ftp://dickory.sdsu.edu/pub/PLP/LPRng/
0
 

Author Comment

by:mehrdad042597
Comment Utility
I finally got a patch 'bsdlpr.tgz' from Walnut Creek that fixed the problem with lpq and lpc. Obviously, there were a lot of bugs in Slackware 3.2 release and service pack 2 to fix these bugs.

Now, I have a different problem. When I use lpr, I get the following message:
lpr: unable to get official name for local printer

PS:I do not have an IP address, and I have already been told to use 127.0.0.1 with my machine's name.
0
 
LVL 1

Expert Comment

by:ggeens
Comment Utility
The bsdlpr package contains the `old' BSD lpr software. It is
not as flexible as LPRng, but easier to install.
Did you change your printcap file for LPRng? If you did, you
should make shure all lines of a printer definition end with a backslash (\).

P.S.: I think you should ask a new question, otherwise I'll be
the only one who'll read it and give you an answer.
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now