tuna / tunasync

Mirror job management tool.
GNU General Public License v3.0
1.61k stars 273 forks source link

自定义镜像脚本工作异常 #176

Closed AethoceSora closed 2 years ago

AethoceSora commented 2 years ago

修改使用 tunasync-scripts 中的anaconda脚本,在本地(而非借助docker)拉取anaconda镜像失败。log文件为空。 worker.conf:

[[mirrors]]
name = "bioconda"
provider = "command"
upstream = "https://repo.continuum.io/"
command = "/home/qlu_mirrors/anaconda.py"
size_pattern = "Total size is ([0-9\\.]+[KMGTP]?)"

worker --debug:

[22-11-10 02:00:23][WARNIN][job.go:213] failed syncing bioconda: fork/exec /home/qlu_mirrors/anaconda.py: permission denied
[22-11-10 02:00:23][DEBUG][job.go:215] post-fail hooks
[22-11-10 02:00:23][NOTICE][job.go:146] retry syncing: bioconda, retry: 1
[22-11-10 02:00:23][DEBUG][loglimit_hook.go:34] executing log limitter for bioconda
[22-11-10 02:00:23][DEBUG][runner.go:90] Executing command /home/qlu_mirrors/anaconda.py at /mnt/vos-6izqwyw8/mirrors/bioconda
[22-11-10 02:00:23][DEBUG][runner.go:127] Command start: [/home/qlu_mirrors/anaconda.py]
[22-11-10 02:00:23][ERROR][job.go:166] failed to start provider bioconda: fork/exec /home/qlu_mirrors/anaconda.py: permission denied
[22-11-10 02:00:23][DEBUG][job.go:180] syncing done
[22-11-10 02:00:23][WARNIN][job.go:213] failed syncing bioconda: fork/exec /home/qlu_mirrors/anaconda.py: permission denied
[22-11-10 02:00:23][DEBUG][job.go:215] post-fail hooks
[22-11-10 02:00:23][DEBUG][job.go:266] job done
ZenithalHourlyRate commented 2 years ago

fork/exec /home/qlu_mirrors/anaconda.py: permission denied

您的这个文件是否有执行权限? worker 进程所属的用户是否有读取该文件的权限?

AethoceSora commented 2 years ago

修复可执行文件权限后,worker间歇抛出异常: 22-11-10 02:16:04][WARNIN][job.go:213] failed syncing bioconda: killed by manager

shankerwangmiao commented 2 years ago

请给出完整的日志,您提及的这个错误的上下文是什么?

AethoceSora commented 2 years ago

[22-11-10 02:17:01][NOTICE][worker.go:191] Received command: restart (bioconda) [22-11-10 02:17:01][DEBUG][job.go:186] received kill [22-11-10 02:17:01][DEBUG][base_provider.go:175] terminating provider: bioconda [22-11-10 02:17:01][DEBUG][base_provider.go:165] set isRunning to false: bioconda [22-11-10 02:17:01][WARNIN][job.go:213] failed syncing bioconda: killed by manager [22-11-10 02:17:01][DEBUG][job.go:215] post-fail hooks [22-11-10 02:17:01][DEBUG][job.go:234] No retry, exit directly

shankerwangmiao commented 2 years ago

这是因为您发出了 restart 指令,所以强行终止了正在运行的同步任务。这是预期的行为。