Hey Brad,
Thanks for all the suggestions!!! Here are my results below, and it seems
like my problem is that my box cannot create /dev/lp0: error 16??? Is that
right? Any suggestions? Thank you very much!

Craig

-----Original Message-----
From: Brad Fritz [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 23, 2003 8:56 AM
To: Craig Caughlin
Cc: LEAF
Subject: Re: [leaf-user] Bering print server set-up

Craig,

On Thu, 23 Jan 2003 07:10:18 PST Craig Caughlin wrote:

> Hi folks,
> I've carefully followed the instructions at
> http://www.mysunrise.ch/users/cmu/dachlpd.htm to set up my Bering box as a
> print server, but it doesn't work (I can't print). I was getting some
insmod
> error messages, and determined I was using the wrong parport.o,
> parport_pc.o, and lp.o drivers (from an older Bering version). It seems
like
> I've seen posted here on the group a comment that the drivers you use MUST
> match your kernel version.

True.

> So, I downloaded both the
> Bering_1.0-stable_modules_2.4.18.tar.gz
> Bering_1.0-stable_modules_2.4.20.tar.gz module packages (drivers?) from
> http://sourceforge.net/project/showfiles.php?group_id=13751 , and I've
used
> the parport.o, parport_pc.o, and lp.o drivers from the 2.4.18 package,

Good start.  Was there any output when you insmod'ed them?


> but I
> still can't print. How do I know if I'm using drivers from the right
> package?

If you're using Bering 1.0-stable,
Bering_1.0-stable_modules_2.4.18.tar.gz contains the correct
modules.  As a general rule, if insmod does not complain about
unresolved symbols, barf nasty error messages on the console,
or lock up the machine you're _usually_ okay.

If you're not feeling brave with your up-all-year firewall :-),
you should verify they were built from the same source tree and
config as your kernel.  For the case of Bering, that's probably
documented in the Bering install or user's guide somewhere, but
there is a chance it might not be as the 2.4.20 kernel was added
after most of the current docs were written.


> Hmmmm, I can't seem to figure out what I'm doing wrong. Does
> Shorewall have anything to do with this? Thank you!

If you are running tests from another host it could be.  Here's
how I would debug it:

  1) Verify the modules are properly loaded:

       lsmod | grep -e parport -e lp

     The three modules you loaded should show up.

Here's what I see:

# lsmod | grep -e parport -e lp
lp                      5580   1
parport_pc             15476   1
parport                12096   1 [lp parport_pc]
parport                12096   1 [lp parport_pc]


  2) Check to see if you have parport entries in the /proc
     filesystem:

       find /proc/ -name 'parport*'

     Many drivers, including parport.o IIRC, add entries to the
     /proc filesystem when they are loaded.

Here's what I see:

# find /proc/ -name 'parport*'
/proc/sys/dev/parport
/proc/sys/dev/parport/parport0

  3) Verify you have a /dev/lp0 device:

       ls -l /dev/lp0

     Should look something like:

       brad@boxer:~$ ls -al /dev/lp0
       crw-rw----    1 root     lp         6,   0 Jun 13  2001 /dev/lp0

Here's what I have:

# ls -l /dev/lp0
crw-rw-rw-    1 root     root       6,   0 Jan 23 22:57 /dev/lp0


  4) Test printing from the firewall:

       (echo foo; echo bar; echo) > /dev/lp0

     The page may not eject, but if the printer does anything
     that's a good sign.

Here's what happened:

(echo foo; echo bar; echo) > /dev/lp0
cannot create /dev/lp0: error 16

  5) Verify that the daemon is started:

       svi p910nd stop; svi p910nd start
       ps -ef | grep p910

Here's what I have:

clonebox: -root-
# svi p910nd stop; svi p910nd start
Starting print server LPT1 ready LPT2 ready LPT3 ready
clonebox: -root-
# ps -ef | grep p910
 6492 root       1636 S    /usr/sbin/p9100d 0
26431 root       1116 S    /usr/sbin/p9100d 0


  6) Verify the daemon is bound to port 9100 (0x238C in hex):

       cat /proc/net/tcp | grep -i 238C

Here's what I have:

clonebox: -root-
# cat /proc/net/tcp | grep -i 238c
   0: 00000000:238C 00000000:0000 0A 00000000:00000000 00:00000000 00000000
0        0 5425 1 c1265b20 300 0 0 2 -1


  7) Verify you can connect to that port from the print server:

       nc 192.168.1.254 9100

Here's what I get - No response

  8) Run "tail -f /var/log/syslog" on the print server and then
     verify you can connect to port 9100 from the printing client:

       telnet 192.168.1.254 9100

     or

       nc 192.168.1.254 9100

    (Watch for shorewall messages in the tail -f output as you
    attempt the connection.)

Here's what I have:

clonebox: -root-
# tail -f /var/log/syslog
Jan 24 01:48:32 clonebox kernel: Shorewall:net2all:DROP:IN=eth0 OUT=
MAC=00:02:e3:1d:e2:a5:00:09:b6:6a:14:54:08:00 SRC=134.184.125.206
DST=12.246.108.54 LEN=74 TOS=0x00 PREC=0x00 TTL=109 ID=10376 PROTO=UDP
SPT=1848 DPT=3481 LEN=54
Jan 24 02:00:01 clonebox /USR/SBIN/CRON[23162]: (root) CMD
(/etc/multicron-p)
Jan 24 02:15:01 clonebox /USR/SBIN/CRON[17317]: (root) CMD
(/etc/multicron-p)
Jan 24 02:30:01 clonebox /USR/SBIN/CRON[24930]: (root) CMD
(/etc/multicron-p)
Jan 24 02:35:36 clonebox p9102d: /dev/lp2: Device not configured
Jan 24 02:35:36 clonebox p9101d: /dev/lp1: Device not configured
Jan 24 02:41:09 clonebox p9100d: Connection from 192.168.1.254 port 2203
Jan 24 02:45:01 clonebox /USR/SBIN/CRON[30169]: (root) CMD
(/etc/multicron-p)
Jan 24 02:48:19 clonebox kernel: Shorewall:net2all:DROP:IN=eth0 OUT=
MAC=00:02:e3:1d:e2:a5:00:09:b6:6a:14:54:08:00 SRC=12.213.229.228
DST=12.246.108.54 LEN=48 TOS=0x00 PREC=0x00 TTL=115 ID=46034 DF PROTO=TCP
SPT=1635 DPT=80 WINDOW=16384 RES=0x00 SYN URGP=0
Jan 24 02:48:22 clonebox kernel: Shorewall:net2all:DROP:IN=eth0 OUT=
MAC=00:02:e3:1d:e2:a5:00:09:b6:6a:14:54:08:00 SRC=12.213.229.228
DST=12.246.108.54 LEN=48 TOS=0x00 PREC=0x00 TTL=116 ID=46284 DF PROTO=TCP
SPT=1635 DPT=80 WINDOW=16384 RES=0x00 SYN URGP=0

  9) Test printing as you normally would.


By breaking it down in steps and "working your way up the stack",
if you will, it should be easy to pinpoint where the problem is
and fix it.  (Many of these steps apply to debugging most services
under linux.  (For sshd, weblet and other libwrap-enabled services,
I would add a tail -f /var/log/auth.log to #8.))

Hope that helps.  If you get it working, you might consider
writing a "Bering Print Server" chapter for the User's Guide. ;-)

--Brad





-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
------------------------------------------------------------------------
leaf-user mailing list: [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-user
SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html

Reply via email to