DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2013-02-05 00:26:54

batal1
Member
Registered: 2013-02-05
Posts: 6

rsyncd not starting : Missing or wrong pid file in /ffp/etc/rsyncd.con

Hello,

I'm new to DNS-323 hacking. I'm trying to set up a DNS-323 as a rsync server to backup my linux PC.
After following this tuto: http://bernaerts.dyndns.org/linux/178-dns323-funplug, I'm always getting the following error when I try to start rsyncd:
Error: Missing or wrong pid file in /ffp/etc/rsyncd.conf (expected: /var/run/rsyncd.pid)

Does anyone have an idea of what I could have made wrong ?

Thanks

Offline

 

#2 2013-02-05 01:52:42

philippe44
Member
Registered: 2013-01-28
Posts: 10

Re: rsyncd not starting : Missing or wrong pid file in /ffp/etc/rsyncd.con

batal1 wrote:

Hello,

I'm new to DNS-323 hacking. I'm trying to set up a DNS-323 as a rsync server to backup my linux PC.
After following this tuto: http://bernaerts.dyndns.org/linux/178-dns323-funplug, I'm always getting the following error when I try to start rsyncd:
Error: Missing or wrong pid file in /ffp/etc/rsyncd.conf (expected: /var/run/rsyncd.pid)

Does anyone have an idea of what I could have made wrong ?

Thanks

This might be the small bug in the /ffp/start/rsync.sh script that does not remove the space around the filename. So you can either correct that with a sed sentence piped to the test of the pid filename in rsyncd.sh (the better way), or you can do the lazy way by removing any space between the "=" sign and the <filename> in your /ffp/etc/rsyncd.conf on the line "pid file=<your filename>"

Offline

 

#3 2013-02-05 03:16:46

FunFiler
Member
Registered: 2010-05-23
Posts: 577

Re: rsyncd not starting : Missing or wrong pid file in /ffp/etc/rsyncd.con

If that isn't the problem, then check the permissions on the directory, path and file in question.


3 * (DNS-323 with 2 * 2TB) = 12TB Running FW v1.08 & FFP v0.5
Useful Links: Transmission, Transmission Remote, Automatic

Offline

 

#4 2013-02-05 22:40:17

batal1
Member
Registered: 2013-02-05
Posts: 6

Re: rsyncd not starting : Missing or wrong pid file in /ffp/etc/rsyncd.con

Hi all,

Thanks for your answers.
I checked the rsyncd.sh script: it does not contain spaces around the rsyncd.pid filename.
To be sure, I added a sed test to remove spaces.
I also (for test purpose) modified the /var/run permissions to 777, made an empty /var/run/rsyncd.pid file with 666 permissions, I always have the same error message.

Any other idea ?

Offline

 

#5 2013-02-06 03:40:48

FunFiler
Member
Registered: 2010-05-23
Posts: 577

Re: rsyncd not starting : Missing or wrong pid file in /ffp/etc/rsyncd.con

Try another location such as /tmp


3 * (DNS-323 with 2 * 2TB) = 12TB Running FW v1.08 & FFP v0.5
Useful Links: Transmission, Transmission Remote, Automatic

Offline

 

#6 2013-02-06 04:30:32

philippe44
Member
Registered: 2013-01-28
Posts: 10

Re: rsyncd not starting : Missing or wrong pid file in /ffp/etc/rsyncd.con

When you manually remove the pid file and start rsyncd (as root) does this work ?

Last edited by philippe44 (2013-02-06 04:31:06)

Offline

 

#7 2013-02-07 23:04:50

batal1
Member
Registered: 2013-02-05
Posts: 6

Re: rsyncd not starting : Missing or wrong pid file in /ffp/etc/rsyncd.con

FunFiler wrote:

Try another location such as /tmp

Same result sad

philippe44 wrote:

When you manually remove the pid file and start rsyncd (as root) does this work ?

Yes. I initially thought it did not work (as I don't see any rsync line with psaux), but if I try to make a rsync test, it works.
It works when I launch rsync without giving it a pid file nor a log file name.
So, this is a first step ahead, what do you suggest now ?
I rebooted my DNS-323, re started a rsync copy, and it seems it also works.
But when I launch the /ffp/start/rsyncd.sh status command, I get: rsyncd not running !
I don't understand ...
And I don't see any rsyncd.pid file where it is expected to be (/var/run/rsyncd.pid)

Last edited by batal1 (2013-02-08 00:05:29)

Offline

 

#8 2013-02-08 01:00:00

FunFiler
Member
Registered: 2010-05-23
Posts: 577

Re: rsyncd not starting : Missing or wrong pid file in /ffp/etc/rsyncd.con

What does your rsyncd.sh file look like?

Code:

#!/ffp/bin/sh

# PROVIDE: rsyncd
# REQUIRE: LOGIN

. /ffp/etc/ffp.subr

name="rsyncd"
command="/ffp/bin/rsync"
rsync_flags="--ipv4 --daemon --config=/ffp/etc/rsyncd.conf"
required_files="/ffp/etc/rsyncd.conf"

run_rc_command "$1"

rsyncd.conf

Code:

hosts allow = 192.168.1.0/24
log file = /mnt/usb/logs/rsyncd.log
uid = root
gid = root
read only = no
[archive]
path = /mnt/HD_a2/Archive
[root]
path = /

rsync --version

Code:

rsync  version 3.0.9  protocol version 30

Last edited by FunFiler (2013-02-08 01:03:32)


3 * (DNS-323 with 2 * 2TB) = 12TB Running FW v1.08 & FFP v0.5
Useful Links: Transmission, Transmission Remote, Automatic

Offline

 

#9 2013-02-09 17:53:31

batal1
Member
Registered: 2013-02-05
Posts: 6

Re: rsyncd not starting : Missing or wrong pid file in /ffp/etc/rsyncd.con

Hi,

Here is my rsyncd.sh :

Code:

#!/ffp/bin/sh

# PROVIDE: rsyncd
# REQUIRE: LOGIN

# This script assumes that the rsync configuration includes
# pid file = /var/run/rsyncd.pid

conf_file=/ffp/etc/rsyncd.conf
# Ligne suivante modifiee le 04/02/2013
pid_file=/var/run/rsyncd.pid
#pid_file=/tmp/rsynd.pid

rsync_flags="--daemon --ipv4 --config=$conf_file"

rsyncd_start()
{
        if [ ! -r "$conf_file" ]; then
                echo "Error: Missing config file $conf_file"
                exit 1
        fi

        x=$(grep '^pid file' $conf_file | cut -d= -f2 | sed -e 's/^[[:space:]]//g')
        if [ "$x" != "$pid_file" ]; then
                echo "Error: Missing or wrong pid file in $conf_file (expected: $pid_file)"
                exit 1
        fi

        echo "Starting /ffp/bin/rsync $rsync_flags"
        /ffp/bin/rsync $rsync_flags
}

rsyncd_stop()
{
        if [ -r "$pid_file" ]; then
                kill $(cat $pid_file) 2>/dev/null
        fi
}

rsyncd_status()
{
        if [ -r $pid_file ]; then
                rsync_pid=$(cat $pid_file)
                if pidof rsync | grep -wq $rsync_pid; then
                        echo "rsyncd running: $rsync_pid"
                else
                        echo "rsync not running ($pid_file stale)"
                fi
        else
                echo "rsyncd not running"
        fi
}

case "$1" in
        start)
                rsyncd_start
                ;;
        stop)
                rsyncd_stop
                ;;
        restart)
                rsyncd_stop
                sleep 1
                rsyncd_start
                ;;
        status)
                rsyncd_status
                ;;
        *)
                echo "Usage: $(basename $0) start|stop|restart|status"
                exit 1
                ;;
esac

My rsyncd.conf file:

Code:

uid = 0
gid = 0

max connections = 4
log file = /var/log/rsyncd.log

[sync_test]
        path = /Volume_1/sync_test
        read only = no
        list = yes
        auth users = alain
        secrets file = /ffp/etc/rsyncd.secrets
        strict mode = yes

And my rsync version:

Code:

rsync --version
rsync  version 3.0.9  protocol version 30
Copyright (C) 1996-2011 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
    64-bit files, 64-bit inums, 32-bit timestamps, 64-bit long ints,
    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
    append, no ACLs, xattrs, iconv, no symtimes

rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.

Offline

 

#10 2013-02-16 05:17:24

philippe44
Member
Registered: 2013-01-28
Posts: 10

Re: rsyncd not starting : Missing or wrong pid file in /ffp/etc/rsyncd.con

Back to my previous question : when I asked for "manual" launch, I mean starting not rsyncd from command line but rsyncd.sh script from command line, what happen ? does the process run ? Otherwise, if you try to do daemonize rsyncd, in the script, what happens ?

Offline

 

#11 2013-02-19 22:18:04

batal1
Member
Registered: 2013-02-05
Posts: 6

Re: rsyncd not starting : Missing or wrong pid file in /ffp/etc/rsyncd.con

That's precisely what I did first: I always got the following error:

Code:

Error: Missing or wrong pid file in /ffp/etc/rsyncd.conf (expected: /var/run/rsyncd.pid)

Offline

 

#12 2013-02-25 17:14:41

memiks
Member
Registered: 2011-09-02
Posts: 72

Re: rsyncd not starting : Missing or wrong pid file in /ffp/etc/rsyncd.con

batal1 wrote:

That's precisely what I did first: I always got the following error:

Code:

Error: Missing or wrong pid file in /ffp/etc/rsyncd.conf (expected: /var/run/rsyncd.pid)

maybe you can try to modified /ffp/etc/rsyncd.conf in order to link pid to an other folder (/var/run is read only).
for example : /ffp/var/run/rsyncd.pid.

Fred.

Offline

 

#13 2013-02-26 01:09:17

batal1
Member
Registered: 2013-02-05
Posts: 6

Re: rsyncd not starting : Missing or wrong pid file in /ffp/etc/rsyncd.con

Thanks for your idea, but I got he same result !
:-(

Code:

Error: Missing or wrong pid file in /ffp/etc/rsyncd.conf (expected: /ffp/tmp/rsyncd.pid)

It seems I miss something ...

Offline

 

#14 2013-02-26 01:35:48

FunFiler
Member
Registered: 2010-05-23
Posts: 577

Re: rsyncd not starting : Missing or wrong pid file in /ffp/etc/rsyncd.con

Did you try using my rsyncd.sh file listed above? It ignores all the pid file stuff. (I don't have a pid file - but rsync shows in the list of running processes 'ps -ef')

Last edited by FunFiler (2013-02-26 01:43:14)


3 * (DNS-323 with 2 * 2TB) = 12TB Running FW v1.08 & FFP v0.5
Useful Links: Transmission, Transmission Remote, Automatic

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB