この記事は、BranchCache 機能が有効になっているときにクラウド管理ゲートウェイ (CMG) またはクラウド配布ポイントへのコンテンツ配布が失敗する問題を解決するのに役立ちます。
元の製品バージョン: Configuration Manager
元の KB 番号: 4509484
現象
Configuration Manager サイト サーバーに BranchCache 機能をインストールすると、CMG またはクラウド配布ポイントへのコンテンツ配布が失敗します。 次のエラー メッセージは、サイト サーバーのPkgXferMgr.logに記録されます。
パッケージ ソース ディレクトリ E:\SMSPKGSIG\C0101B18~~ からファイルをアップロードする場合
警告: 例外 System.Runtime.InteropServices.COMException をキャッチしました - ディスクに十分な領域がありません。(HRESULT からの例外: 0x80070070) ~~
呼び出し履歴:
at Microsoft.ConfigurationManager.AzureRoles.ContentManager.BranchCacheContentInfoStreamClass.Complete()~~
at Microsoft.ConfigurationManager.AzureRoles.ContentManager.ContentInfoStream.Close()~~
at Microsoft.ConfigurationManager.AzureRoles.ContentManager.CryptoUtilities.EncryptAndUploadFileAndSaveContentInfo(String fileName, String contentInfoFullPath, CloudBlockBlob BLOB, EncryptionParams encryptionParams, IsCanceledCallback isCanceledDelegate)~~
at Microsoft.ConfigurationManager.AzureRoles.ContentManager.ContentManager.RecursiveUpload(String packageId, ContentRouter contentRouter, CloudBlobContainer container, String sourceDir, String contentInfoDir, String relativeTargetPath, EncryptionParams encryptionParams, Int32& fileCounter)~~
at Microsoft.ConfigurationManager.AzureRoles.ContentManager.ContentManager.UploadContent(String packageId, String contentId, String contentSource, String contentInfoPath, Boolean uploadFiles, EncryptionParams encryptionParams, ContentRouter contentRouter, String& contentInfoFile)~~
at Microsoft.ConfigurationManager.AzureRoles.ContentManager.UploadPackageToCloudWithContentInfo(String packageId, String contentSource, String contentInfoPath, String cloudDP, String encryptionKey, String algName, Int32 keySize, Int32 blockSize, String& contentInfoFile)~~
原因
BranchCache 機能がサイト サーバーにインストールされている場合、BranchCache パブリケーション キャッシュには、既定のキャッシュの場所 (%windir%\ServiceProfiles\NetworkService\AppData\Local\PeerDistPub
) と最大キャッシュ サイズ (ハード ディスク領域全体の 1%) が使用されます。
この問題は、BranchCache パブリケーションのキャッシュ サイズが既定の最大キャッシュ サイズを超えた場合に発生します。
パブリケーション キャッシュ サイズを表示するには、次のコマンドを実行します。
netsh branchcache show publicationcache
解決方法
この問題を解決するには、サイト サーバーで次のコマンドを実行して、BranchCache パブリケーション キャッシュの内容をフラッシュします。
netsh branchcache flush
さらに、サイト サーバーで次のコマンドを実行することで、既定のキャッシュの場所と最大キャッシュ サイズの両方を変更できます。
netsh branchcache set publicationcache directory=<New Location>
netsh branchcache set publicationcachesize size=<New Value> percent=TRUE
たとえば、次のコマンドでは、BranchCache パブリケーション キャッシュの場所を E:\BranchCache\PublicationCache に設定し、最大キャッシュ サイズをハード ディスク領域全体の 10% に設定します。
netsh branchcache set publicationcache directory=E:\BranchCache\PublicationCache
netsh branchcache set publicationcachesize size=10 percent=TRUE
Note
BranchCache パブリケーション キャッシュには、クライアントが配布ポイントからコンテンツをダウンロードするときに BranchCache を利用するために必要なメタデータが含まれています。 このメタデータは、コンテンツ 項目が BranchCache 対応配布ポイントから最初にダウンロードされたときに生成され、後続のクライアントが BranchCache を使用してコンテンツ 項目をダウンロードする必要があります。 パブリケーション キャッシュがフラッシュされると、配布ポイントがコンテンツ アイテムのダウンロード要求を受け取ると、メタデータが再生成されます。 そのため、パブリケーション キャッシュをフラッシュした後、一意のコンテンツ項目をダウンロードする最初のクライアントは BranchCache を使用してコンテンツをダウンロードできなくなります。