[PLUG] lpr: Connection refused [UPDATE]

Daniel Hedlund daniel at digitree.org
Thu Jan 9 00:13:27 UTC 2014


On Wed, Jan 8, 2014 at 4:03 PM, Rich Shepard <rshepard at appl-ecosys.com>wrote:

> On Wed, 8 Jan 2014, Daniel Hedlund wrote:
>
> > strace lpr <filename> 2>&1 &> strace-output.log
>
>    Ah, so. I did not realize the display was treated as error output and
> needed to be redirected to stdout. Thanks for the lesson.
>
>    Since attachments are stripped by mailman I'll send the 35.5K file
> privately.
>

>From the strace:
> connect(4, {sa_family=AF_INET, sin_port=htons(631),
sin_addr=inet_addr("192.168.55.1")}, 16) = -1 ECONNREFUSED (Connection
refused)

Your lpr command is trying to connect to cups on 192.168.55.1:631.  If that
IP address is also your local computer, then it's likely that cups is only
running on localhost and not all network interfaces (possibly
intentionally).

What does 'netstat -tl' show cups listening on?

If you want to make the cups server listen on 192.168.55.1 (for testing
purposes), try adding the following to your cupsd.conf file and restart
cupsd:

Listen *:631

If that works then you should be able to print what you need.  Ideally,
you'll need to figure out why lpr is connecting on that IP instead of
localhost if you don't want to keep it open.



More information about the PLUG mailing list