File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Linux / UNIX and the fly likes sane daemon refuses connection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "sane daemon refuses connection" Watch "sane daemon refuses connection" New topic

sane daemon refuses connection

Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

Hi, I'm trying to run a piece of sample code provided with JSANE,

The code listed below is intended to list available scanners.

it fails on

with "Connection Refused"
following instructions found at
I have tested sane from the command line and ensured that it works.
I have checked /etc/services to make sure saned is there:

I have changed the sg0 (scanner SCSI device driver) with chmod 777
I have made sure saned is running.
(added sane info to xinetd.conf)
I have created user and group saned and verified that user saned can access sane commands.

When I run the code, I get connection refused and I'm looking for help from this forum in debugging just where the problem is.
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

Did you check etc/sane.d/saned.conf?
Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

Thanks for your reply there is one entry in /etc/sane.d/saned.conf which I added:
I agree. Here's the link:
subject: sane daemon refuses connection
It's not a secret anymore!