mirror leaves ppp up on failure of mirror
My nightly cron job mirrors a debian site.
Here is my cron job, which runs mirror if not already running,
then turns off ppp with poff.
if [ -z `/sbin/pidof -x mirror` ]; then (pon; sleep 120; /bin/mount
/dev/sdb2 /mnt 2>/dev/null; cd /mnt/mirrors; ./run-mirror; poff) ;fi
Sometimes my program "./run-mirror" runs properly, sometimes not. OFTEN, WHEN
run-mirror FAILS, IT HANGS, SO MY CRON SCRIPT NEVER GETS TO "poff".
Here is a "ps -auxw" (wrapped),
USER PID %CPU %MEM VSZ RSS TT STAT START TIME COMMAND
root 997 0.0 0.2 3280 164 ? S Sep 5 0:00 mirror
docs:sunsite.unc.edu:/pub/Linux/docs package=docs
sunsite.unc.edu:/pub/Linux/docs -> /mnt/mi
Here is my file "run-mirror" (not wrapped in reality):
nice --adjustment=-20 /usr/bin/mirror -p debian
./mirror.defaults 1>./run-mirror_debian_`/bin/date
'+%b_%d_%Y_%I:%M%p' ` 2>&1
#
/usr/bin/mirror -p docs ./mirror.defaults 1>
./run-mirror_docs_`/bin/date '+%b_%d_%Y_%I:%M%p' ` 2>&1
My mirror.defaults has entries for "debian" and for "docs", though I don't
believe their contents matter here.
Here is an example output from run-mirror:
bind: Cannot assign requested address at /usr/bin/../lib/mirror/ftp.pl line
1273.
package=debian uiarchive.cso.uiuc.edu:/pub/systems/linux/distributions/deb
ian -> /mnt/mirrors/debian
Got timestamp.txt 29
Got ls-lR 1193924
Got ls-lR.gz 163208
Got doc/libc5-to-libc6-Mini-HOWTO.txt 4929
Got doc/libc5-to-libc6-Mini-HOWTO.html 0
Got doc/package-developer/virtual-package-names-list.text 4659
Got doc/package-developer/libc6-migration.text 10982
Got doc/package-developer/policy.ps.gz 80888
Got doc/package-developer/policy.text.gz 27797
Got bo-updates/shellutils_1.16-2b.diff.gz 7204
timed out reading data!
Failed to get bo-updates/shellutils_1.16-2b_i386.deb: 150 Opening BINARY
mode data connection for bo-updates/shellutils_1.16-2b_i386.deb (316650
bytes).
Failed to get file 150 Opening BINARY mode data connection for
bo-updates/shellutils_1.16-2b_i386.deb (316650 bytes).
Here, I believe the first "bind" line often does not occur, but the last three
lines do, with "timed out ...", "Failed to get ...", "Failed to get ...".
My modem connection can fail, including its automatic redial, so I
occasionally get "timed out reading data", but my real problem resides with
"mirror" not terminating.
In the above instance, mirror evidently finished after the debian site, then
hung with 0 bytes of output for the "docs" site (sunsite.unc.edu).
This left ppp running, since my script was hung in "mirror" for 2 days. Since
I use automatic redial, ppp had corrected itself probably in 15 minutes, but
mirror never corrected itself and never terminated.
HOW CAN I GET A "timed out reading data" MIRROR PROGRAM TO ALWAYS TERMINATE
RATHER THAN HANG? Or, do some people write a different cron job to avoid this
problem?
I run mirror 2.8-9 on debian 1.3.
Thanks for any help.
--
Jim Burt, NJ9L, Fairfax, Virginia, USA
jameson@mnsinc.com http://www.mnsinc.com/jameson
"If merely 'feeling good' could decide, drunkenness would be the supremely
valid human experience." --William James, Varieties of Religious
Experience
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: