使用内网源更新,遇到过各种报错,如何判断windows内网update源的可用性?
代码语言:txt复制0x80244007
0x80244015
0x80244010
0x80240039
0x8024401c
0x8000FFFF(没有语言包时的报错)
以上是走内网windows update源时可能遇到的报错
0x80072EE2(无公网却走公网更新时报错)
浏览器访问,也是时而通200 OK、时而不通403 Forbidden
代码语言:txt复制http://windowsupdate.tencentyun.com/
http://windowsupdate.tencentyun.com/ReportingWebService/
http://windowsupdate.tencentyun.com/Content/anonymousCheckFile.txt
200 OK截图:
403 Forbidden截图:
powershell测试的情况:也是时而通时而403 Forbidden
以上这种,肯定是windows内网update源的服务端有问题,不是客户端问题。
跟友商的内网update源对比,有一些简单的测试用例可以用来判断
【阿里云】
代码语言:txt复制http://update.cloud.aliyuncs.com/
http://update.cloud.aliyuncs.com/ReportingWebService/
http://update.cloud.aliyuncs.com/Content/anonymousCheckFile.txt
代码语言:txt复制
curl http://update.cloud.aliyuncs.com/ApiRemoting30/ 访问401符合预期
curl http://update.cloud.aliyuncs.com/Content/ 访问403符合预期
curl http://update.cloud.aliyuncs.com/ReportingWebService/
curl http://update.cloud.aliyuncs.com/aspnet_client/
curl http://update.cloud.aliyuncs.com/ClientWebService/
curl http://update.cloud.aliyuncs.com/DssAuthWebService/
curl http://update.cloud.aliyuncs.com/Inventory/
curl http://update.cloud.aliyuncs.com/Selfupdate/
curl http://update.cloud.aliyuncs.com/ServerSyncWebService/
curl http://update.cloud.aliyuncs.com/SimpleAuthWebService/
代码语言:txt复制$testurl=""
$testurl=(curl http://update.cloud.aliyuncs.com/ApiRemoting30/ -UseBasicParsing);($testurl.StatusCode).ToString() " " $testurl.StatusDescription;
$testurl=(curl http://update.cloud.aliyuncs.com/Content/ -UseBasicParsing);($testurl.StatusCode).ToString() " " $testurl.StatusDescription;
$testurl=(curl http://update.cloud.aliyuncs.com/ReportingWebService/ -UseBasicParsing);($testurl.StatusCode).ToString() " " $testurl.StatusDescription;
$testurl=(curl http://update.cloud.aliyuncs.com/aspnet_client/ -UseBasicParsing);($testurl.StatusCode).ToString() " " $testurl.StatusDescription;
$testurl=(curl http://update.cloud.aliyuncs.com/ClientWebService/ -UseBasicParsing);($testurl.StatusCode).ToString() " " $testurl.StatusDescription;
$testurl=(curl http://update.cloud.aliyuncs.com/DssAuthWebService/ -UseBasicParsing);($testurl.StatusCode).ToString() " " $testurl.StatusDescription;
$testurl=(curl http://update.cloud.aliyuncs.com/Inventory/ -UseBasicParsing);($testurl.StatusCode).ToString() " " $testurl.StatusDescription;
$testurl=(curl http://update.cloud.aliyuncs.com/Selfupdate/ -UseBasicParsing);($testurl.StatusCode).ToString() " " $testurl.StatusDescription;
$testurl=(curl http://update.cloud.aliyuncs.com/ServerSyncWebService/ -UseBasicParsing);($testurl.StatusCode).ToString() " " $testurl.StatusDescription;
$testurl=(curl http://update.cloud.aliyuncs.com/SimpleAuthWebService/ -UseBasicParsing);($testurl.StatusCode).ToString() " " $testurl.StatusDescription;
代码语言:txt复制wget http://update.cloud.aliyuncs.com/Content/anonymousCheckFile.txt -Outfile C:anonymousCheckFile.txt
echo $?
#certutil -hashfile C:anonymousCheckFile.txt MD5
(Get-FileHash -Path C:anonymousCheckFile.txt -Algorithm MD5).Hash
#最终MD5值为D41D8CD98F00B204E9800998ECF8427E
除过前2个比较特殊(401、403符合预期),其他的都是200 OK才算服务端OK,例如
【腾讯云】
代码语言:txt复制curl http://windowsupdate.tencentyun.com/ApiRemoting30/ 访问401符合预期
curl http://windowsupdate.tencentyun.com/Content/ 访问403符合预期
curl http://windowsupdate.tencentyun.com/ReportingWebService/
curl http://windowsupdate.tencentyun.com/aspnet_client/
curl http://windowsupdate.tencentyun.com/ClientWebService/
curl http://windowsupdate.tencentyun.com/DssAuthWebService/
curl http://windowsupdate.tencentyun.com/Inventory/
curl http://windowsupdate.tencentyun.com/Selfupdate/
curl http://windowsupdate.tencentyun.com/ServerSyncWebService/
curl http://windowsupdate.tencentyun.com/SimpleAuthWebService/
代码语言:txt复制$testurl=""
$testurl=(curl http://windowsupdate.tencentyun.com/ApiRemoting30/ -UseBasicParsing);($testurl.StatusCode).ToString() " " $testurl.StatusDescription;
$testurl=(curl http://windowsupdate.tencentyun.com/Content/ -UseBasicParsing);($testurl.StatusCode).ToString() " " $testurl.StatusDescription;
$testurl=(curl http://windowsupdate.tencentyun.com/ReportingWebService/ -UseBasicParsing);($testurl.StatusCode).ToString() " " $testurl.StatusDescription;
$testurl=(curl http://windowsupdate.tencentyun.com/aspnet_client/ -UseBasicParsing);($testurl.StatusCode).ToString() " " $testurl.StatusDescription;
$testurl=(curl http://windowsupdate.tencentyun.com/ClientWebService/ -UseBasicParsing);($testurl.StatusCode).ToString() " " $testurl.StatusDescription;
$testurl=(curl http://windowsupdate.tencentyun.com/DssAuthWebService/ -UseBasicParsing);($testurl.StatusCode).ToString() " " $testurl.StatusDescription;
$testurl=(curl http://windowsupdate.tencentyun.com/Inventory/ -UseBasicParsing);($testurl.StatusCode).ToString() " " $testurl.StatusDescription;
$testurl=(curl http://windowsupdate.tencentyun.com/Selfupdate/ -UseBasicParsing);($testurl.StatusCode).ToString() " " $testurl.StatusDescription;
$testurl=(curl http://windowsupdate.tencentyun.com/ServerSyncWebService/ -UseBasicParsing);($testurl.StatusCode).ToString() " " $testurl.StatusDescription;
$testurl=(curl http://windowsupdate.tencentyun.com/SimpleAuthWebService/ -UseBasicParsing);($testurl.StatusCode).ToString() " " $testurl.StatusDescription;
代码语言:txt复制wget http://windowsupdate.tencentyun.com/Content/anonymousCheckFile.txt -Outfile C:anonymousCheckFile.txt
echo $?
#certutil -hashfile C:anonymousCheckFile.txt MD5
(Get-FileHash -Path C:anonymousCheckFile.txt -Algorithm MD5).Hash
#最终MD5值为D41D8CD98F00B204E9800998ECF8427E
除过前2个比较特殊(401、403符合预期),其他的都是200 OK才算服务端OK,例如