× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

Re: AFP share drops unexpectedly, but CIFS share is fine

jasperaukes
Aspirant

Re: AFP share drops unexpectedly, but CIFS share is fine

I traced down the problem to a script in /etc/cron.daily (running at 6:25 AM every day). The script is called "logtruncate".

I also found out that the following command is killing the netatalk daemon:

start-stop-daemon -K -n apache-ssl -R 5

You can reproduce it by running this script on the ReadyNAS:

#!/bin/bash
start-stop-daemon -K -n apache-ssl -R 5
echo Killed
/usr/sbin/apache-ssl -f /etc/frontview/apache/httpd.conf
echo Started

I'm still trying to find out how start-stop-daemon kills afpd. But if I don't find it quick enough, I'll just adjust logtruncate to restart Apache in another way.

It seems like a bug anyway.
Problems at my place (Pro PE) started after upgrading to 4.2.17 (from 4.2.15)
Message 51 of 56
sphardy1
Apprentice

Re: AFP share drops unexpectedly, but CIFS share is fine

jasperaukes wrote:
I traced down the problem to a script in /etc/cron.daily (running at 6:25 AM every day). The script is called "logtruncate".

This is a known issue that was supposed to be resolved in 4.2.17 - the method employed by logtruncate to truncate the netatalk log would cause netatalk to crash for some users and was changed in 4.2.17
Message 52 of 56
jasperaukes
Aspirant

Re: AFP share drops unexpectedly, but CIFS share is fine

sphardy wrote:
jasperaukes wrote:
I traced down the problem to a script in /etc/cron.daily (running at 6:25 AM every day). The script is called "logtruncate".

This is a known issue that was supposed to be resolved in 4.2.17 - the method employed by logtruncate to truncate the netatalk log would cause netatalk to crash for some users and was changed in 4.2.17


Well, the funny thing is, start-stop-daemon kills afpd along with apache-ssl. The shell-script I wrote kills afpd. At least on my box running 4.2.17.
Message 53 of 56
jasperaukes
Aspirant

Re: AFP share drops unexpectedly, but CIFS share is fine

start-stop-daemon on 4.2.17 seems to be broken. It kills all kinds of daemons when it only should kill Apache. I modified /etc/cron.daily/logtruncate with these lines:

if( $restart_apache ) {#
# start-stop-daemon kills afpd
#
# system("start-stop-daemon -K -n apache-ssl -R 5");
# system("/usr/sbin/apache-ssl -f /etc/frontview/apache/httpd.conf");
#
system("/usr/sbin/apache2ctl restart");
}

I had no problems with unexpectedly dying afpd since then.
Message 54 of 56
Daryn
Aspirant

Re: AFP share drops unexpectedly, but CIFS share is fine

I just started experiencing this problem for the first time in many months. The problem appears to be triggered by restarting netatalk via frontview. The netatalk processes remain in apache's process group. Then when start-stop-daemon kills apache's group process group, it implicitly kills the netatalk processes too...

The reason why the person who reinstalled thought the problem is gone is that netatalk is not started by frontview when the nas boots up.


PPID PID PGID SID TTY TPGID STAT UID TIME COMMAND
1 12682 12682 12682 ? -1 Ss 0 0:00 /usr/sbin/apache-ssl -f /etc/frontview/apache/httpd.conf
12682 12683 12682 12682 ? -1 S 98 0:03 \_ /usr/sbin/apache-ssl -f /etc/frontview/apache/httpd.conf
12682 12696 12682 12682 ? -1 S 98 0:02 \_ /usr/sbin/apache-ssl -f /etc/frontview/apache/httpd.conf
1 13059 12682 12682 ? -1 S 0 0:00 /usr/sbin/cnid_metad
13059 13125 12682 12682 ? -1 S 0 0:00 \_ /usr/sbin/cnid_dbd /c/Users/.AppleDB 7 5 default log_note
1 13064 12682 12682 ? -1 S 0 0:00 /usr/sbin/afpd -U uams_dhx.so,uams_dhx2.so,uams_guest.so -c 50 -n ReadyNAS-Ultra2
13064 13124 12682 12682 ? -1 S 65534 0:00 \_ /usr/sbin/afpd -U uams_dhx.so,uams_dhx2.so,uams_guest.so -c 50 -n ReadyNAS-Ultra2
13064 13242 12682 12682 ? -1 S 65534 0:00 \_ /usr/sbin/afpd -U uams_dhx.so,uams_dhx2.so,uams_guest.so -c 50 -n ReadyNAS-Ultra2
13064 13245 12682 12682 ? -1 S 65534 0:00 \_ /usr/sbin/afpd -U uams_dhx.so,uams_dhx2.so,uams_guest.so -c 50 -n ReadyNAS-Ultra2
Message 55 of 56
Daryn
Aspirant

Re: AFP share drops unexpectedly, but CIFS share is fine

Any word on if this problem is going to be fixed? It's a real PITA.
Message 56 of 56
Top Contributors
Discussion stats
Announcements