[sane-devel] scanbd on Raspberry Pi Connection Failed system_bus_socket

2013-07-15 Thread deigerwutz
Dear all

Now some months later and still without an stable solution I want to
summarise my experiences with scanbd and a Fujitsu Scansnap FI-5110/EOX2
scanner.

I am running scanbd on a raspberry pi.
Everything works great except one thing.
If I close the cover and reopen it, scanbd will not restart the right way
because I get a lot of "Interation on dbus call" errors.
Both xinetd and scanbd will be stopped and started by a udev rule.
No problems with that.

Now the strange thing: 

1. Reboot the machine with open cover = scanbd works fine
2. Cover close and reopen = "Iteration on dbus call" - error
3. Restart scanbd with open cover (service scanbd restart) = scanbd works
fine.

I've tried a lot of different users and rights for scanbd and xinetd, but
couldn't find a solution . 

It seems that scanbd has to be started only when xinetd is running
completely. How long does it take to start xinetd on a raspberry pi I did
not measure.
Maybe somewhere there is the answer for my question, but a little help from
the developers here would be great.

So let me say thank you in advance.

Best regards

Olaf






--
View this message in context: 
http://sane.10972.n7.nabble.com/scanbd-on-Raspberry-Pi-Connection-Failed-system-bus-socket-tp17350p17772.html
Sent from the SANE - Dev mailing list archive at Nabble.com.



[sane-devel] scanbd on Raspberry Pi Connection Failed system_bus_socket

2013-04-13 Thread Louis Lagendijk
On Fri, 2013-04-12 at 07:01 -0700, deigerwutz wrote:
> Dear all
> 
> In the meanwhile I removed and installed scanbd once again.
> 
> But now I get an "Iteration on dbus call" error.
> 
> If scanbd runs from command line with option "f" it works perfect but not
> with auto start.
> If scanbd ist started via rc$.d the "Iteration on dbus call" occurs.
> 
> echo $SANE_CONFIG_DIR results in an empty line.
> 
> The error leaves an entry every second in the syslog file.
> 
> What can be the reason, please help.
> 
> Here ist the syslog from boot:
> 
> Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: debug on: level:
> 7
> Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: daemonize
> Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: dropping privs to
> uid saned
> Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: dropping privs to
> gid lp
> Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: drop privileges
> to gid: 7
> Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: Running as
> effective gid 7
> Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: drop privileges
> to uid: 107
> Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: Running as
> effective uid 107
> Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: dbus_init
> Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: dbus match
> type='signal',interface='org.freedesktop.Hal.Manager'
> Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: sane version 1.0
> Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: Scanning for
> local-only devices
> Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd:
> start_sane_threads
> Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: start dbus thread
> Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: timeout: 500 ms
> Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: Iteration on dbus
> call
> Apr 12 15:49:40 raspberrypi scanbd: /usr/local/bin/scanbd: Iteration on dbus
> call
> Apr 12 15:49:40 raspberrypi xinetd[1443]: Reading included configuration
> file: /etc/xinetd.d/chargen [file=/etc/xinetd.conf] [line=14]
> Apr 12 15:49:40 raspberrypi xinetd[1443]: Reading included configuration
> file: /etc/xinetd.d/daytime [file=/etc/xinetd.d/daytime] [line=28]
> Apr 12 15:49:40 raspberrypi xinetd[1443]: Reading included configuration
> file: /etc/xinetd.d/discard [file=/etc/xinetd.d/discard] [line=26]
> Apr 12 15:49:40 raspberrypi xinetd[1443]: Reading included configuration
> file: /etc/xinetd.d/echo [file=/etc/xinetd.d/echo] [line=25]
> Apr 12 15:49:40 raspberrypi xinetd[1443]: Reading included configuration
> file: /etc/xinetd.d/sane-port [file=/etc/xinetd.d/sane-port] [line=26]
> Apr 12 15:49:40 raspberrypi xinetd[1443]: Reading included configuration
> file: /etc/xinetd.d/time [file=/etc/xinetd.d/time] [line=12]
>  
> 
> 
> 
> --
> View this message in context: 
> http://sane.10972.n7.nabble.com/scanbd-on-Raspberry-Pi-Connection-Failed-system-bus-socket-tp17350p17471.html
> Sent from the SANE - Dev mailing list archive at Nabble.com.
> 

you scanner is not recognised. Did your startup script specify the
SANE_CONFIG_DIR?

Kind regards, Louis





[sane-devel] scanbd on Raspberry Pi Connection Failed system_bus_socket

2013-04-12 Thread deigerwutz
Dear all

In the meanwhile I removed and installed scanbd once again.

But now I get an "Iteration on dbus call" error.

If scanbd runs from command line with option "f" it works perfect but not
with auto start.
If scanbd ist started via rc$.d the "Iteration on dbus call" occurs.

echo $SANE_CONFIG_DIR results in an empty line.

The error leaves an entry every second in the syslog file.

What can be the reason, please help.

Here ist the syslog from boot:

Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: debug on: level:
7
Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: daemonize
Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: dropping privs to
uid saned
Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: dropping privs to
gid lp
Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: drop privileges
to gid: 7
Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: Running as
effective gid 7
Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: drop privileges
to uid: 107
Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: Running as
effective uid 107
Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: dbus_init
Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: dbus match
type='signal',interface='org.freedesktop.Hal.Manager'
Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: sane version 1.0
Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: Scanning for
local-only devices
Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd:
start_sane_threads
Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: start dbus thread
Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: timeout: 500 ms
Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: Iteration on dbus
call
Apr 12 15:49:40 raspberrypi scanbd: /usr/local/bin/scanbd: Iteration on dbus
call
Apr 12 15:49:40 raspberrypi xinetd[1443]: Reading included configuration
file: /etc/xinetd.d/chargen [file=/etc/xinetd.conf] [line=14]
Apr 12 15:49:40 raspberrypi xinetd[1443]: Reading included configuration
file: /etc/xinetd.d/daytime [file=/etc/xinetd.d/daytime] [line=28]
Apr 12 15:49:40 raspberrypi xinetd[1443]: Reading included configuration
file: /etc/xinetd.d/discard [file=/etc/xinetd.d/discard] [line=26]
Apr 12 15:49:40 raspberrypi xinetd[1443]: Reading included configuration
file: /etc/xinetd.d/echo [file=/etc/xinetd.d/echo] [line=25]
Apr 12 15:49:40 raspberrypi xinetd[1443]: Reading included configuration
file: /etc/xinetd.d/sane-port [file=/etc/xinetd.d/sane-port] [line=26]
Apr 12 15:49:40 raspberrypi xinetd[1443]: Reading included configuration
file: /etc/xinetd.d/time [file=/etc/xinetd.d/time] [line=12]
 



--
View this message in context: 
http://sane.10972.n7.nabble.com/scanbd-on-Raspberry-Pi-Connection-Failed-system-bus-socket-tp17350p17471.html
Sent from the SANE - Dev mailing list archive at Nabble.com.



[sane-devel] scanbd on Raspberry Pi Connection Failed system_bus_socket

2013-03-19 Thread Olaf Schirmer
Hello Wilhelm

First of all I want to thank you for the fast reply on my question!
Please see below where I've tried to answer your questions. 

I've changed the runlevel links from S01scanbd to S04scanbd, where dbus has 
S02dbus.
It looks like the dbus daemon is writing the system_bus_socket file 
nevertheless after scanbd gets started.



pi at raspberrypi:/var/run/dbus$ stat system_bus_socket 
  Datei: ?system_bus_socket?
  Gr??e: 0  Bl?cke: 0  EA Block: 4096   Socket
Ger?t: ch/12d   Inode: 2396Verkn?pfungen: 1
Zugriff: (0777/srwxrwxrwx)  Uid: (0/root)   Gid: (0/root)
Zugriff: 2013-03-19 16:12:41.034860256 +0100
Modifiziert: 2013-03-19 16:11:23.280001416 +0100
Ge?ndert   : 2013-03-19 16:11:23.280001416 +0100
 Geburt: -
pi at raspberrypi:/var/run/dbus$ 



The situation is the same as before :-(

  SYSLOG 
Mar 19 16:11:22 raspberrypi scanbd: /usr/local/bin/scanbd: Scanning for 
local-only devices
Mar 19 16:11:22 raspberrypi scanbd: /usr/local/bin/scanbd: Can't get the scbtn 
device list
Mar 19 16:11:22 raspberrypi scanbd: /usr/local/bin/scanbd: device list null
Mar 19 16:11:22 raspberrypi scanbd: /usr/local/bin/scanbd: start_scbtn_threads
Mar 19 16:11:22 raspberrypi scanbd: /usr/local/bin/scanbd: start the threads (0)
Mar 19 16:11:22 raspberrypi scanbd: /usr/local/bin/scanbd: start dbus thread
Mar 19 16:11:22 raspberrypi scanbd: /usr/local/bin/scanbd: dbus_init
Mar 19 16:11:22 raspberrypi scanbd: /usr/local/bin/scanbd: DBus connection 
error: Failed to connect to socket /var/run/dbus/system_bus_socket: No such 
file or directory
#



Am 18.03.2013 um 16:09 schrieb Wilhelm:
> 
> please show the file-mode bits

-rwxr-xr-x 1 root staff 136630 M?r  8 10:49 /usr/local/bin/scanbd
-rwxr-xr-x 1 root staff 7740 M?r 14 14:25 /usr/local/etc/scanbd/scanbd.conf


scanbd is running as root
(root  1726 1  0 15:25 ?00:00:00 /usr/local/bin/scanbd -c 
/usr/local/etc/scanbd/scanbd.conf)


>> 
>> Also it seams that the environment variable $SANE_CONFIG_DIR ist not set at
>> boot because an echo-command prints an empty row.
> 
> can you track this down to where it happens?

I am sorry, no. I've set the variable now in /etc/environment file
Now I can start scanbd in foreground with scanbd -f only

This is the first part of my scanbd.conf

##
# global settings
global {
# turn on debugging

# log to console
debug   = true 

# debug logging
# 1=error, 2=warn, 3=info, 4-7=debug
debug-level = 7

# drop priviliges to this user
#=
# Linux: 
# user= saned # root
# *BSD
# user= root
user= root

# Group to be used
#=
# Linux (most distributions use the lp group to access scanners)
# group   = lp
# ArchLinux (ArchLinux uses the scanner group)
# group = scanner
#
# *BSD (no group lp here, use daemon instead)
# group   = daemon # root
#
group   = root

# the saned executable for manager-mode
saned   = "/usr/sbin/saned"
saned_opt  = {} # string-list
saned_env  = { "SANE_CONFIG_DIR=/usr/local/etc/scanbd" } # list of 
environment vars for saned


> 
>> 
>> If I set the variable manually by using export export
>> SANE_CONFIG_DIR=/usr/local/etc/scanbd I can run in background with scanbd -c
>> /usr/local/etc/scanbd/scanbd.conf and everything runs as expected.
>> 
>> Do I have something to change in boot process or with read permissions?
> 
> to place the init-script and add the run-level links should be enough ...

This are the runlevel links

pi at raspberrypi:/etc$ sudo find . -name "*scanbd*" -exec ls -la {} \;
-rw-r--r-- 1 root root 586 M?r 14 14:32 ./dbus-1/system.d/scanbd_dbus.conf
lrwxrwxrwx 1 root root 16 M?r 12 17:07 ./rc1.d/K01scanbd -> ../init.d/scanbd
lrwxrwxrwx 1 root root 16 M?r 19 15:19 ./rc2.d/S04scanbd -> ../init.d/scanbd
lrwxrwxrwx 1 root root 16 M?r 12 17:07 ./rc0.d/K01scanbd -> ../init.d/scanbd
lrwxrwxrwx 1 root root 16 M?r 12 17:07 ./rc4.d/S04scanbd -> ../init.d/scanbd
lrwxrwxrwx 1 root root 16 M?r 12 17:07 ./rc5.d/S04scanbd -> ../init.d/scanbd
lrwxrwxrwx 1 root root 16 M?r 12 17:07 ./rc3.d/S04scanbd -> ../init.d/scanbd
-rwxr-xr-x 1 root root 3908 M?r 15 17:20 ./init.d/scanbd
lrwxrwxrwx 1 root root 16 M?r 12 17:07 ./rc6.d/K01scanbd -> ../init.d/scanbd
pi at raspberrypi:/etc$ 


Thank you in advance for your help.

Olaf



-- next part --
An HTML attachment was scrubbed...
URL: 

-- next part --
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4145 bytes
Desc: not available
URL

[sane-devel] scanbd on Raspberry Pi Connection Failed system_bus_socket

2013-03-18 Thread Wilhelm
Am 18.03.2013 12:26, schrieb deigerwutz:
> Hello all
>
> I try to use a Rasperry Pi with Raspian Wheezy as a network scanner device.
> After I have installed /scanbd/ as described in the package-readme and some
> copying of files, I can use it in foreground with scanbd -f.
> The scanner is recognised an I can use scanner buttons as I want it.

Sounds good ;-)

>
> The problem is to load the daemon in background at system boot.
> The /var/log/syslog shows an error at starting up scanbd:
> Mar 18 10:27:18 raspberrypi scanbd: /usr/local/bin/scanbd: DBus connection
> error: Failed to connect to to socket /var/run/dbus/system_bus_socket: No
> such file or directory
> The scanbd gets started but does nothing.
> The missed file "system_bus_socket" exists in the meantioned directory. Its
> timestamp is equal to the log-entry (10:27:18)
>
>
> $ ps -ef |grep scan
>
> root 1729 1  0  10:27 ?00:00:00 /usr/local/bin/scanbd -c
> /usr/local/etc/scanbd/scanbd.conf
>

please show the file-mode bits

>
>
> Also it seams that the environment variable $SANE_CONFIG_DIR ist not set at
> boot because an echo-command prints an empty row.

can you track this down to where it happens?

>
> If I set the variable manually by using export export
> SANE_CONFIG_DIR=/usr/local/etc/scanbd I can run in background with scanbd -c
> /usr/local/etc/scanbd/scanbd.conf and everything runs as expected.
>
> Do I have something to change in boot process or with read permissions?

to place the init-script and add the run-level links should be enough ...

>
> Thanks in advance, guys.
>
>
>
>
>
> --
> View this message in context: 
> http://sane.10972.n7.nabble.com/scanbd-on-Raspberry-Pi-Connection-Failed-system-bus-socket-tp17350.html
> Sent from the SANE - Dev mailing list archive at Nabble.com.
>


-- 
Wilhelm




[sane-devel] scanbd on Raspberry Pi Connection Failed system_bus_socket

2013-03-18 Thread deigerwutz
Hello all

I try to use a Rasperry Pi with Raspian Wheezy as a network scanner device.
After I have installed /scanbd/ as described in the package-readme and some
copying of files, I can use it in foreground with scanbd -f.
The scanner is recognised an I can use scanner buttons as I want it.

The problem is to load the daemon in background at system boot.
The /var/log/syslog shows an error at starting up scanbd: 
Mar 18 10:27:18 raspberrypi scanbd: /usr/local/bin/scanbd: DBus connection
error: Failed to connect to to socket /var/run/dbus/system_bus_socket: No
such file or directory
The scanbd gets started but does nothing. 
The missed file "system_bus_socket" exists in the meantioned directory. Its
timestamp is equal to the log-entry (10:27:18)


$ ps -ef |grep scan

root 1729 1  0  10:27 ?00:00:00 /usr/local/bin/scanbd -c
/usr/local/etc/scanbd/scanbd.conf



Also it seams that the environment variable $SANE_CONFIG_DIR ist not set at
boot because an echo-command prints an empty row.

If I set the variable manually by using export export
SANE_CONFIG_DIR=/usr/local/etc/scanbd I can run in background with scanbd -c
/usr/local/etc/scanbd/scanbd.conf and everything runs as expected.

Do I have something to change in boot process or with read permissions?

Thanks in advance, guys.

 



--
View this message in context: 
http://sane.10972.n7.nabble.com/scanbd-on-Raspberry-Pi-Connection-Failed-system-bus-socket-tp17350.html
Sent from the SANE - Dev mailing list archive at Nabble.com.