And what I forgot to mention is that those other Pis are running a copy of the rsync script (same target machine, different file locations) without problem, and my source machine does a daily "pull" rsync from the target which is much bigger, and that always works.
Adrian
To Reply :
replace "bulleid" with "adrian" - all mail to bulleid is rejected
Sorry for the rigmarole, If I want spam, I'll go to the shops
Every time someone says "I don't believe in trolls", another one dies.
Didn't find your answer? Ask the community — no account required.
This is what I ended up using. I have to back up /boot every time as it gets...
T
The Natural Philosopher
+1 duff hardware
"The most difficult subjects can be explained to the most slow witted
man if he has not formed any idea of them already; but the simplest
thing cannot be made clear to the most intelligent man if he is firmly
persuaded that he knows already, without a shadow of doubt, what is laid
before him."
- Leo Tolstoy
T
The Natural Philosopher
So its machine specific. I still think it's hardware.
I've seen effects like this where the combination of the right I/O and using in the next instruction a piece of slow ram can do this.
I'd be inclined to ditch that Pi
"When one man dies it's a tragedy. When thousands die it's statistics."
Josef Stalin
R
Richard Kettlewell
[....]
You need to trace the ssh processes, on both hosts, not (just) rsync. Locally you could use ?strace -tt -f? to follow trace subprocesses as well. Remotely the easiest way is probably to attach the trace after things have started, with ?strace -f -tt -p PID?.
Attaching after things start means we don?t quite get the complete picture but since we?re looking for hints as to why things stop (or not) that may not matter.
(-tt asks for timestamps, which makes it easier to match up events across the two hosts, assuming they both have correctly set clocks.)
https://www.greenend.org.uk/rjk/
A
Adrian
In message , Richard Kettlewell writes
Thanks, I'll have a got at that next time.
Adrian
To Reply :
replace "bulleid" with "adrian" - all mail to bulleid is rejected
Sorry for the rigmarole, If I want spam, I'll go to the shops
Every time someone says "I don't believe in trolls", another one dies.
D
druck
Are they all running at the same time, with the same destination machine/drive?
---druck
A
Adrian
I deliberately staggered the run times. In the normal way of things each "push" takes under 2 minutes, so fitting them all in overnight isn't a problem. They all push to the same machine and drive (which has one file system), although to different directories on that drive.
Adrian
To Reply :
replace "bulleid" with "adrian" - all mail to bulleid is rejected
Sorry for the rigmarole, If I want spam, I'll go to the shops
Every time someone says "I don't believe in trolls", another one dies.
K
Kees Nuyt
I agree, but strace might not be the easiest solution. I use something like: rsync --rsh="ssh -o IdentitiesOnly=yes -o IdentityAgent=none -i $KEYFILE" to customize the way rsync uses ssh.
It's worth a try to use --rsh="ssh -vvv" to get insight in what happens to ssh.
Regards,
Kees Nuyt
D
druck
es
ays
gs
,
OK, I just had a thought that it might be a resource constraint issue.
I initially set up each of my dozen Pi's to have 6 different SMB mounts to a shared drive connected to the router, but found some of the Pi's couldn't access the mounts at certain times, for example if previous backups were still running. It seems the router had a maximum number of SMB shares it would service simultaneously.
I changed things so most of the Pi's only had one permanent mount, and mounted the rest on demand to work around the issue, until I upgrade the
router, or get one of the Pi4's to share the disc. The 4GB Pi 4B on gigabit Ethernet has twice the large file performance sharing a USB3 spinning rust drive, and about 8x faster for random access due to more memory for caching
To Reply :
replace "bulleid" with "adrian" - all mail to bulleid is rejected
Sorry for the rigmarole, If I want spam, I'll go to the shops
Every time someone says "I don't believe in trolls", another one dies.
It would be interesting to know what happened between 10:52:56 and
12:36:52 - assuming that the clocks on the two systems are synchronised.
I wonder if a wireshark journal would show anything useful. If the link normally falls over as soon after it seems to have this time AND you filter the stream to show just packets sent and received by the source system, there shouldn't be too many unrelated packets to bypass.
Wireshark would be my tool of choice after I'd looked at the logs on both ends of the link. These days it has a decent graphical interface. Anybody who knows enough about networks to set up a hardwired LAN and configure their hosts to talk to each other should find Wireshark fairly easy to use.
Martin | martin at
Gregorie | gregorie dot org
A
A. Dumas
What if you make it a persistent ssh connection?
ControlMaster auto ControlPersist yes ControlPath /home/pi/.ssh/socket-%r@%h:%p (or wherever, maybe somewhere appropriate for root)
R
Richard Kettlewell
Putting it into order, with [S] and [T] for source and target:
[T] 10:36:56.750037 select(12, [3 5 9 11], [], NULL, NULL) = 1 (in [3]) Target is waiting for something to happen.
[S] 10:37:20.669664 _newselect(7, [3 4], [], NULL, NULL) = 1 (in [3]) Source is waiting for something to happen.
[S] 10:52:56.730243 read(3, 0x7ee59f44, 8192) = -1 ETIMEDOUT (Connection timed out)
15 minutes 36 seconds later, source gets a socket-level read error. This probably means the kernel has been trying to send to the target but not getting any response.
[S] 10:52:56.731099 write(3, "\0i\201\205\372Zs\335\20\200\344\252'E8(\346\321\241\2155\341\274\235\371S\230je\25\222U"..., 56) = -1 EPIPE (Broken pipe) Source tries to write something (presumalby a shutdown message) but the socket is bust, so it fails.
[S] 10:52:56.731464 write(2, "packet_write_wait: Connection to"..., 69) = 69 [S] 10:52:56.731706 exit_group(255) = ?
2 hours after the starting point the target?s kernel has given up on the source (which is already long dead). 2 hours (probably) reflects the default TCP keepalive time.
Whatever went wrong had already happened by 10:37:20. I agree with Martin that applying wireshark or tcpdump is the next move. In particular look out for packets that one end sends but the other does not receive.
Do both hosts have the same link mtu? ?ip link show? should display this.
https://www.greenend.org.uk/rjk/
A
Adrian
In message , Martin Gregorie writes
So far as I can tell, the clocks are synced (they are certainly within a second).
Top and ps on the source machine suggests the ssh and rsync processes have terminated, and on the target, the ssh and rsync processes exist, but don't appear to be doing anything.
When it works, it takes 70-80 seconds start to finish, when it doesn't it is 16-17 minutes before the target processes terminate. The first few seconds see the normal rsync stuff in the log, then nothing.
There shouldn't be any packets from source to target for about 90 minutes after this job, but there will be other traffic on the network, some of it to the target (but from other sources) and in general.
Time permitting, I might have a play with that tomorrow, and see if I can make sense of it.
Adrian
To Reply :
replace "bulleid" with "adrian" - all mail to bulleid is rejected
Sorry for the rigmarole, If I want spam, I'll go to the shops
Every time someone says "I don't believe in trolls", another one dies.
A
Adrian
In message , Richard Kettlewell writes
Source : mtu 1500 Target : mtu 1500
Thanks
Adrian
-- To Reply : replace "bulleid" with "adrian" - all mail to bulleid is rejected Sorry for the rigmarole, If I want spam, I'll go to the shops Every time someone says "I don't believe in trolls", another one dies.
M
mark lewis
Re: Re: rsync oddity By: Adrian to snipped-for-privacy@invalid.invalid on Sun Jun 07 2020 13:15:23
Adrain> Sometime after packet 18752 it stops talking to the target. Adrain> The last packet shown is when my script calls up Gmail to send Adrain> the rsync log to me, which it does after the rsync process on Adrain> the source machine has ended.
could this be a heat problem like some inexpensive home routers/switches see from time to time? a heat problem in which they lose packets or otherwise stop processing traffic properly?
you say this happens with only one unit... perhaps apply some more cooling to it and see if it helps...
or maybe swap this unit with one of the others that works and see if the problem follows the unit...
)\/(ark
A
Adrian
In message , Richard Kettlewell writes
tcpdump was run on the source machine, and the output copied over to my PC where I can run wireshark. Source machine is 192.168.1.18 and the target is 192.168.1.118 (the router was not helpful on the address allocation).
The trace was started just before I kicked off the rsync session, and (after filtering out traffic to the router), I get this :
Sometime after packet 18752 it stops talking to the target. The last packet shown is when my script calls up Gmail to send the rsync log to me, which it does after the rsync process on the source machine has ended.
I've also run tcpdump on a short session between the two machines where I opened a ssh connection, then closed it again. This clearly showed the end of the connection.
Adrian
To Reply :
replace "bulleid" with "adrian" - all mail to bulleid is rejected
Sorry for the rigmarole, If I want spam, I'll go to the shops
Every time someone says "I don't believe in trolls", another one dies.
A
Adrian
In message , mark lewis writes
Thanks for the suggestions.
I've got a cron job on each Pi that takes various environment readings every minute, so I've got a pretty good idea on what is happening temperature wise.
At the time that it failed on the overnight cron job, the CPU temperature was 35-37 degrees and the GPU in the same range. The source Pi is in a cupboard, and the air temperature in there was 13.3-13.5 degrees at the time. It uses a switch (Netgear) which is housed in the same cupboard.
The target Pi had CPU / GPU temperatures of 33-35 and air 14.7-14.8 degrees. It uses a switch (Netgear) which is co-located with it.
I've seen my various Pis cope with much higher temperatures without any issue.
The router (Draytek) is in an area where the temperature is in the 19-23 degree region.
Adrian
To Reply :
replace "bulleid" with "adrian" - all mail to bulleid is rejected
Sorry for the rigmarole, If I want spam, I'll go to the shops
Every time someone says "I don't believe in trolls", another one dies.
R
Richard Kettlewell
So what does it look like from the other endpoint?
https://www.greenend.org.uk/rjk/
A
Adrian
It doesn't :-(
The target box won't install tcpdump. I've tried a couple of times, but it doesn't install, it suggests running apt update, which doesn't work (or not fully anyway).
Reading package lists... Building dependency tree... Reading state information... The following packages were automatically installed and are no longer required: libencode-locale-perl libexplain30 libfile-listing-perl libfont-afm-perl libgail-3-0 libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libio-socket-ip-perl libio-socket-ssl-perl liblircclient0 liblwp-mediatypes-perl liblwp-protocol-https-perl liblzo2-2 libmailtools-perl libmpeg2-4 libnet-http-perl libnet-ssleay-perl libsocket-perl liburi-perl libwww-perl libwww-robotrules-perl libxvmc1 xawtv-plugins Use 'apt-get autoremove' to remove them. The following NEW packages will be installed: tcpdump
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 482 kB of archives. After this operation, 1,029 kB of additional disk space will be used. WARNING: The following packages cannot be authenticated! tcpdump Install these packages without verification [y/N]? Err
formatting link
wheezy/main tcpdump armhf 4.9.0-1~deb7u1 404 Not Found Failed to fetch
formatting link
.9.0-1~deb7u1_armhf.deb 404 Not Found E: Unable to fetch some archives, maybe run apt-get update or try with
--fix-missing?
This is a machine running wheezy.
So, is this a fixable problem, or am I going to have to upgrade (which may take a while as I'm out of SD cards).
Adrian
To Reply :
replace "bulleid" with "adrian" - all mail to bulleid is rejected
Sorry for the rigmarole, If I want spam, I'll go to the shops
Every time someone says "I don't believe in trolls", another one dies.
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required
Report Content
You are reporting this content to the moderators. They will look at it
ASAP.