[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Can't start rsync daemon in current debian-testing?



On Sat, 10 Jan 2015 10:13:06 +0100
hubert depesz lubaczewski <depesz@gmail.com> wrote:

> Hi,
> I'm using rsync daemon, and when I try to start it, using "service
> rsync start" it just hangs, without printing anything.
> 
> Getting process list shows that it spawns some kind of password-agent:
> 
> =# ps uwwf t pts/7
> USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME
> COMMAND root     30221  0.0  0.0  26852  6964 pts/7    Ss   08:57
> 0:00 -bash root     24114  0.0  0.0  24428  2468 pts/7    S+
> 10:11   0:00  \_ systemctl start rsync.service
> root     24147  0.0  0.0  13168  1552 pts/7    S+   10:11   0:00
> \_ /bin/systemd-tty-ask-password-agent --watch

I don't know the exact details of this, but the "--watch" option
suggests that this is waiting for some *other* process to supply the
password. That is, because of the asynchronous nature of systemd, one
can't simply ask for the password on stdin, because the service is
probably being started in parallel with other services.
So /bin/system-tty-ask-password-agent notifies the system (probably via
DBUS) that a password is needed, something starts in order to request
that password (at boot that can be plymouth, once booted it might be a
GNOME- or KDE-specific popup). That securely passes the password back
to the service which can continue on.

> 
> I tried to find solution on the web, but I found only question whether
> systemd is running as process 1, which it is:
> 
> =# ps uww -p 1
> USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME
> COMMAND root         1 10.0  0.0  31576  6872 ?        Ss   Jan09
> 82:19 /sbin/init
> 
> 10:12:15 root@andy ~
> =# ls -l /sbin/init
> lrwxrwxrwx 1 root root 20 Dec  5 10:13 /sbin/init
> -> /lib/systemd/systemd*
> 
> And also some queston about logs, but I have no knowledge about
> systemctl, so I have no idea where the logs are and how to make
> systemd log more.

Systemd uses journald for logging (which then forwards to your
syslogd). "systemctl status rsync" should give information about the
specific service. "journalctl -xb" should give you more general
logs from since the latest boot.

> 
> Any help with diagnosing and fixing the problem?

"man systemd-tty-ask-password-agent" might also be useful.

> 
> depesz


Reply to: