我的脚本正在尝试使用下面给定的名为“install_helm.sh”的 shell 脚本来安装 helm 图表管理器。
echo "Installing servecm (Chart Manager) and common templates to helm3"
helm plugin install https://github.com/jdolitsky/helm-servecm
eval $(helm env |grep HELM_REPOSITORY_CACHE)
echo ${HELM_REPOSITORY_CACHE}
nohup helm servecm --port=8879 --context-path=/charts --storage local --storage-local-rootdir $HELM_REPOSITORY_CACHE/local/ <<EOF &
yes
EOF
CURL_CMD="curl --silent --output /dev/null http://127.0.0.1:8879/charts"
`${CURL_CMD}`
READY=$?
while [ ${READY} != 0 ]; do
echo "servecm not yet running. sleeping for 2 seconds"
sleep 2
`${CURL_CMD}`
READY=$?
done
但是它没有安装并在 nohup 日志文件中给出以下错误。我不明白为什么它没有安装。它显示了卷曲问题。但不确定这是否是根本原因。 谁能告诉我如何调试这个?它曾经在不同的网络机器上工作过一段时间。
ChartMuseum not installed. Install latest stable release? (type "yes"): Attempting to install ChartMuseum server (<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>AJSFRBH3EY2MFNDJ</RequestId><HostId>xjT8lkHaQIVUlmXOQJTTCGT+3vRA/YfvYwYzdTJM9ppLWUKcbf9qu9c07Ow0dbYDxDTUUSI2yTA=</HostId></Error>)...
Detected your os as "linux"
+ curl -LO 'https://s3.amazonaws.com/chartmuseum/release/<?xml' 'version="1.0"' 'encoding="UTF-8"?>' '<Error><Code>AccessDenied</Code><Message>Access' 'Denied</Message><RequestId>AJSFRBH3EY2MFNDJ</RequestId><HostId>xjT8lkHaQIVUlmXOQJTTCGT+3vRA/YfvYwYzdTJM9ppLWUKcbf9qu9c07Ow0dbYDxDTUUSI2yTA=</HostId></Error>/bin/linux/amd64/chartmuseum'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 243 0 243 0 0 250 0 --:--:-- --:--:-- --:--:-- 250
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: version="1.0"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: encoding="UTF-8"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: <Error><Code>AccessDenied<
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: Denied<
+ rm -rf /tmp/tmp.OzCIXcXSxl
Error: plugin "servecm" exited with error
环境变量 HELM_REPOSITORY_CACHE 的值
root@Ubuntu-20:/home/ravi/ric-dep/bin# helm env |grep HELM_REPOSITORY_CACHE
HELM_REPOSITORY_CACHE="/root/.cache/helm/repository"
root@Ubuntu-20:/home/ravi/ric-dep/bin#
运行 shell 脚本“install_helm.sh”时出现以下错误
servecm not yet running. sleeping for 2 seconds
servecm not yet running. sleeping for 2 seconds
servecm not yet running. sleeping for 2 seconds
谢谢
似乎 helmservecm 插件安装程序收到访问被拒绝错误,类似于此 GitHub 问题:https://github.com/helm/chartmuseum/issues/328
您可以在您贴出的nohup日志文件内容第二行查看错误:
<Error><Code>AccessDenied</Code><Message>Access Denied</Message>
所以脚本实际上很早就失败了,这导致脚本的其余部分出现后续错误。
解决此类问题的一种方法可能是直接在终端中运行每个命令,而不是在后台脚本作业中😊