Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

lpd does not work

Posted on 1997-05-03
21
Medium Priority
?
448 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
ID: 1627362
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
ID: 1627363
I tried dj-printcap.tar.gz, but it did not solve the problem.

Mehrdad
0
 
LVL 1

Accepted Solution

by:
ggeens earned 150 total points
ID: 1627364
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:mehrdad042597
ID: 1627365
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
ID: 1627366
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
ID: 1627367
Are the devices (/dev/lp?) correct?
Do you have support for parallel ZIP drives installed?
0
 

Author Comment

by:mehrdad042597
ID: 1627368
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
ID: 1627369
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
ID: 1627370
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
ID: 1627371
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
 

Author Comment

by:mehrdad042597
ID: 1627372
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
ID: 1627373
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
ID: 1627374
I do not have /etc/hosts.resolv.


0
 
LVL 1

Expert Comment

by:t2pp
ID: 1627375
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
ID: 1627376
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
ID: 1627377
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
ID: 1627378
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
ID: 1627379
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
ID: 1627380
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
ID: 1627381
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
ID: 1627382
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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month10 days, 3 hours left to enroll

927 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