Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Aug 2006 11:43:11 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        freebsd-questions@freebsd.org
Subject:   Re: Port Not Available
Message-ID:  <44DB0DBF.7060607@infracaninophile.co.uk>
In-Reply-To: <20060809171622.A471.GERARD@seibercom.net>
References:  <20060809082757.B59F.GERARD@seibercom.net>	<44D9FF84.5060708@infracaninophile.co.uk> <20060809171622.A471.GERARD@seibercom.net>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigB46A30E1CBA63E253D196AD6
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: quoted-printable

Gerard Seibert wrote:
> Matthew Seaman wrote:
>=20
>> Ummm... given that there's no 'rm' capability in this printcap I guess=
 you
>> must be using Samba to communicate with the remote windows printer.  I=
f so,
>> then that printcap looks fine.  Well, setting lp=3D/dev/null seems to =
cause=20
>> some complaints, but that should just be cosmetic.
>>
>> I'd start looking for problems in the Samba setup.  Can you use smbcli=
ent to
>> connect to the printserver machine via Samba using the credentials you=
 gave
>> in the apsfilter setup?  Does it show that you have access to the shar=
ed
>> printer there?
>>
>> Double check the contents of /usr/local/etc/apsfilter/SETUP.cfg and th=
e
>> apsfilterrc files in that directory and it's sub-directories. =20
>>
>> Also, is there anything interesting in the log file /var/spool/lpd/lp/=
log ?
>=20
> Nothing other than this from the lpd-errs file produced when
>=20
>      'checkpc -fV'=20
>=20
> is run.
>=20
> lpd-errs:
>=20
> Aug  9 13:06:09 scorpio checkpc[6018]: lp: Checkwrite: fcntl F_SETFL of=

> '/dev/null' failed - Inappropriate ioctl for device
>=20
> Aug  9 17:18:57 scorpio checkpc[14219]: lp: Checkwrite: fcntl F_SETFL o=
f
> '/dev/null' failed - Inappropriate ioctl for device
>=20
> I can connect using smbclient without any problems. The problem is not
> there. The is just not connection with the print server, and that is
> what I cannot understand.
>=20
> I had the same problem with an install of 5.4. One day that message
> started being printed in the log and I could no longer print. I was
> forced to do a total reinstall of the OS. I really believe that the
> '/dev/null' thing is the key to this, but I do not have a clue how to g=
o
> about fixing it. I have a bad feeling that I am going to have to do a
> total reinstall of the OS. With KDE, OpenOffice etc., that will take
> awhile.
>=20
> Unless you have a better idea Matthew, I will probably go that route
> this weekend. I do not need another over sized paper weight.
>

Woah! Reinstalling the whole OS to fix a printer problem is way overkill.=


The /dev/null entry in /etc/printcap is just a place-holder.  Normally
that entry would contain the device used to communicate to a locally
attached printer.  However, because you're using samba, you've faked the
system into thinking you've got a local printer, while using a print
filter to divert the data via samba into the remote Windows printer.
It's a bit of a hack really.

However what it does mean is that no data should actually end up being
passed to /dev/null.  As the print system is complaining about not being
able to get an exclusive lock on that file, perhaps it would be worth
trying substituting some regular file that it could get a lock on.  Try
this.

    # touch /var/log/lpd.out
    # chmod 644 /var/log/lpd.out
    # chown root:daemon /var/log/lpd.out

Then edit /etc/printcap and substitute /var/log/lpd.out for /dev/null
and restart lpd.  lpd.out should just stay an empty file, but it might
end up with a copy of anything you send to the printer in it, in which
case siccing newsyslog(1) onto the file to keep it a manageable size
would be a good idea.

If this works, then reporting what happened to the port maintainer and
author of apsfilter would be indicated -- seems the behaviour of
/dev/null has changed in recent releases sufficient to put a spanner in
apsfilter's works.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.                       7 Priory Courtyard
                                                      Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey         Ramsgate
                                                      Kent, CT11 9PW


--------------enigB46A30E1CBA63E253D196AD6
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE2w3F8Mjk52CukIwRCLOmAJ9MuWxUjnBQAyQTejGmUUM8swOusQCeJTLo
Vb/UU4uhEnc+gesMWvuxPDI=
=Cli8
-----END PGP SIGNATURE-----

--------------enigB46A30E1CBA63E253D196AD6--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44DB0DBF.7060607>