Avamar - FLR - 仮想マシンでHTTPプロキシが構成されている場合、Linux FLR wgetスクリプトが失敗します。
Summary: Avamar - FLR - ターゲットLinux VMが「wget」トラフィックに内部インターネット プロキシを使用しているため、ネットワーク経由でファイルをリストアできませんでした
Symptoms
avvmwfile Error <0000>: Failed to restore files via network, check proxy log for details avvmwfile Error <0000>: assist_restore error. ret: 157Avamarプロキシflrログ: /usr/local/avamaravamarclient/logs/VmwareFlr.log 自動生成されたFLRスクリプト「flrTBow8V」が仮想マシンのゲスト オペレーティング システム内で実行されています。 ただし、スクリプトは成功しませんでした(メモ:終了コード0のみが成功を示し、他の数字は失敗コードです)このログの失敗終了コードは8でした。
ExecuteProgram failed. script text:/bin/bash /root/flrTBow8V, Return: 0, script return code: 8 FLRBase:: ScriptUploadAndExecute failed
Avamar FLRスクリプト ログには、/usr/local/avamaravamarclient/logs/flrTBow8V.errが表示されます。
<DATE> https://Avamar-proxy-IP/download/<uuid> Resolving internetproxy.example.com (internetproxy.example.com)... 10.2.3.4 Connecting to internetproxy.example.com (internetproxy.example.com )|10.2.3.4|:3128... connected. WARNING: cannot verify 10.1.4.50's certificate, issued by ‘/C=US/ST=California/L=Irvine/O=Dell Technologies/OU=Dell EMC/CN=Administrator’: Self-signed certificate encountered. WARNING: certificate common name ‘Administrator’ doesn't match requested host name ‘10.1.4.50’.Proxy request sent, awaiting response... HTTP/1.1 500 Failed to exec CGI Connection: close X-Frame-Options: SAMEORIGIN X-Content-Type-Options: nosniff Strict-Transport-Security: max-age=31536000;includeSubDomains X-XSS-Protection: 1; mode=block Cache-Control: must-revalidate,no-cache,no-store Content-Type: text/html;charset=iso-8859-1 Content-Length: 368 Server: Jetty(9.4.19.v20190610) <DATE> ERROR 500: Failed to exec CGI. ecode: "8"
Cause
これは、非標準のLinux構成によって引き起こされる環境上の問題です。
FLRスクリプト出力ファイル(flrTBow8V.err)では、トラフィックがお客様のインターネットHTTPプロキシ internetproxy.example.com を介して流れていることを確認できます。
問題: セキュリティ上の理由から、ターゲット仮想マシンのみがこの特定のFLRジョブ/スクリプトのファイルをダウンロードできます。
HTTP PROXYにより、受信IPアドレスがターゲットVMのIPアドレスと一致しず、HTTP状態コード500がトリガーされます。
設定:
仮想マシンのゲスト オペレーティング システムでは、wget 構成ファイル (~/.wgetrc または /usr/local/etc/wgetrc) に HTTP プロキシが構成されています。
https_proxy = http://internetproxy.example.com:3128
Resolution
解決策:
この問題を解決するには、wgetスクリプト仕様テンプレートを変更して、FLRスクリプトがhttpプロキシを使用しないようにする必要があります。
手順:
1。Avamarプロキシ
2にSSHで接続します。次の場所にあるwgetテンプレート スクリプトを編集します。
/usr/local/avamarclient/bin/wget_linux_script.template3. wgetコマンド スイッチ「--no-proxy」を追加します
変更前の構成の例:
#!/bin/bash
logfile=$0.err
url=https://%s/download
token=%s
files=(%s)
exit_code=0
for file in "${files[@]}";do
IFS='","' read filepath dest <<< "$file"
wget "$url/$filepath" -N -nH -x -P "$dest" --no-check-certificate -S --restrict-file-names=nocontrol --no-parent --tries 5 --header="Authorization:$token" --cut-dirs=2 --content-disposition 2>>$logfile
let exit_code=$exit_code+$?
if Avamar_PlaceHolderFile=$filepath; then
rm -f "$dest/$filepath"
fi
done
# delete it self after finish execution
rm -f "$0"
echo "ecode: \"$exit_code\"" >> $logfile
exit $exit_code
変更後の構成の例:
#!/bin/bash
logfile=$0.err
url=https://%s/download
token=%s
files=(%s)
exit_code=0
for file in "${files[@]}";do
IFS='","' read filepath dest <<< "$file"
wget "$url/$filepath" -N --no-proxy -nH -x -P "$dest" --no-check-certificate -S --restrict-file-names=nocontrol --no-parent --tries 5 --header="Authorization:$token" --cut-dirs=2 --content-disposition 2>>$logfile
let exit_code=$exit_code+$?
if Avamar_PlaceHolderFile=$filepath; then
rm -f "$dest/$filepath"
fi
done
# delete it self after finish execution
rm -f "$0"
echo "ecode: \"$exit_code\"" >> $logfile
exit $exit_code 4.プロキシでvmwareflr webserviceを再起動します。 (またはプロキシを再起動します)
192proxy:~ # systemctl restart vmwareflr.service