2017-02-17 15 views
0

私はVSTS Release Managementを使用しています。最初のステップは、 "Windows Machine File Copy"を実行することです。設定は次のとおりです。これは、 "アクセスが拒否されました"というエラーメッセージでrobocopyを実行すると失敗します。以下の設定に表示されるファイルパスは、\\ machine \ e $ \ xxxx \ TargetFolderに変換されます。アクセスが拒否されるのはなぜですか?ターゲットフォルダに共有フォルダを作成し、そのフォルダを\\ machine \ TargetFolderに変更すると、このメッセージが表示されません。管理者ユーザーは、マシン上のローカル管理者です。Windowsマシンファイルコピーは共有フォルダなしでは機能しません

私の質問は、これを機能させるために共有フォルダをセットアップする必要がある理由です。なぜそれが管理共有(すなわち\\マシン\電子$ \ XXXX \ TargetFolder)ここで

enter image description here

がログでは使用できません。送信元と送信先のサーバーは両方ともWin 2012R2サーバーです。移行先サーバーでUACがオフになっています。私は/ Bと/ ZBを引数として試してみましたが、うまくいきませんでした。

2017-02-20T12:21:10.4545267Z Downloading artifact 
2017-02-20T12:21:11.4375965Z Cleaning artifacts directory: C:\VSTS_agent\ReleaseManagementVSTS\r1\a 
2017-02-20T12:21:11.6306012Z Cleaned artifacts directory: C:\VSTS_agent\ReleaseManagementVSTS\r1\a 
2017-02-20T12:21:11.6396014Z Starting artifacts download... 
2017-02-20T12:21:11.6426015Z Downloading linked artifact Release Build of type Build... 
2017-02-20T12:21:11.6486018Z Ensuring artifact folder C:\VSTS_agent\ReleaseManagementVSTS\r1\a\Release Build exists and is clean. 
2017-02-20T12:21:11.6856039Z Preparing to get the list of available artifacts from build 
2017-02-20T12:21:12.0926382Z Preparing to download artifact: release 
2017-02-20T12:21:12.1066374Z Artifact Type: ServerDrop 
2017-02-20T12:21:12.5536635Z Caching items under 'release' in the file container... 
2017-02-20T12:21:12.7186787Z Caching complete. (165 ms) 
2017-02-20T12:21:17.8480056Z Download complete. 
2017-02-20T12:21:17.8500047Z 51 placed file(s): 51 downloaded, 0 empty 
2017-02-20T12:21:17.8500047Z 11 MB downloaded at 2188 KB/sec. Download time: 00:00:05.0976254. Parallel download limit: 4. 
2017-02-20T12:21:17.8510054Z Downloaded linked artifact Release Build 
2017-02-20T12:21:17.8510054Z Finished artifacts download 
2017-02-20T12:21:17.8610039Z ##[section]Finishing: Download Artifacts 
2017-02-20T12:21:17.8690051Z ##[section]Starting: Copy files from $(System.DefaultWorkingDirectory)/Release Build/release 
2017-02-20T12:21:17.9680113Z ============================================================================== 
2017-02-20T12:21:17.9680113Z Task   : Windows Machine File Copy 
2017-02-20T12:21:17.9680113Z Description : Copy files to remote machine(s) 
2017-02-20T12:21:17.9690126Z Version  : 1.0.39 
2017-02-20T12:21:17.9690126Z Author  : Microsoft Corporation 
2017-02-20T12:21:17.9690126Z Help   : [More Information](https://go.microsoft.com/fwlink/?linkid=627415) 
2017-02-20T12:21:17.9690126Z ============================================================================== 
2017-02-20T12:21:18.0380182Z Preparing task execution handler. 
2017-02-20T12:21:19.8101219Z Executing the powershell script: C:\VSTS_agent\ReleaseManagementVSTS\_tasks\WindowsMachineFileCopy_xxxx\1.0.39\WindowsMachineFileCopy.ps1 
2017-02-20T12:21:24.0233892Z Copy started for - 'machine' 
2017-02-20T12:21:28.8116953Z 
2017-02-20T12:21:28.8116953Z ------------------------------------------------------------------------------- 
2017-02-20T12:21:28.8116953Z ROBOCOPY  ::  Robust File Copy for Windows        
2017-02-20T12:21:28.8116953Z ------------------------------------------------------------------------------- 
2017-02-20T12:21:28.8116953Z 
2017-02-20T12:21:28.8146952Z Started : Monday, February 20, 2017 7:21:28 AM 
2017-02-20T12:21:28.8156949Z 2017/02/20 07:21:28 ERROR 5 (0x00000005) Getting File System Type of Destination \\machine\E$\xxx\TargetFolder\ 
2017-02-20T12:21:28.8156949Z Access is denied. 
2017-02-20T12:21:28.8156949Z 
2017-02-20T12:21:28.8156949Z 
2017-02-20T12:21:28.8156949Z Source : C:\VSTS_agent\ReleaseManagementVSTS\r1\a\Release Build\release\ 
2017-02-20T12:21:28.8167052Z  Dest - \\machine\E$\xxx\TargetFolder\ 
2017-02-20T12:21:28.8167052Z 
2017-02-20T12:21:28.8167052Z  Files : *.* 
2017-02-20T12:21:28.8167052Z   
2017-02-20T12:21:28.8167052Z Options : *.* /S /E /DCOPY:DA /COPY:DAT /R:1000000 /W:30 
2017-02-20T12:21:28.8167052Z 
2017-02-20T12:21:28.8167052Z ------------------------------------------------------------------------------ 
2017-02-20T12:21:28.8186939Z 
2017-02-20T12:21:28.8196951Z 2017/02/20 07:21:28 ERROR 5 (0x00000005) Creating Destination Directory \\machine\E$\xxx\TargetFolder\ 
2017-02-20T12:21:28.8196951Z Access is denied. 
2017-02-20T12:21:28.8196951Z 
2017-02-20T12:21:28.8977003Z \\machine was deleted successfully. 
2017-02-20T12:21:28.8977003Z 
2017-02-20T12:21:28.9177039Z ##[error]System.Management.Automation.RuntimeException: Copying failed for resource : machine 
2017-02-20T12:21:28.9177039Z Copying failed. Consult the robocopy logs for more details. ---> System.Management.Automation.RuntimeException: Copying failed for resource : machine 
2017-02-20T12:21:28.9177039Z Copying failed. Consult the robocopy logs for more details. 
2017-02-20T12:21:28.9177039Z --- End of inner exception stack trace --- 
2017-02-20T12:21:28.9177039Z at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input) 
2017-02-20T12:21:28.9177039Z at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke) 
2017-02-20T12:21:28.9177039Z at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync) 
2017-02-20T12:21:28.9177039Z at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings) 
2017-02-20T12:21:28.9177039Z at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings) 
2017-02-20T12:21:28.9187021Z at Microsoft.TeamFoundation.DistributedTask.Handlers.LegacyVSTSPowerShellHost.VSTSPowerShellHost.Main(String[] args) 
2017-02-20T12:21:28.9407042Z ##[error]LegacyVSTSPowerShellHost.exe completed with return code: -1. 
2017-02-20T12:21:28.9427038Z ##[section]Finishing: Copy files from $(System.DefaultWorkingDirectory)/Release Build/release 
2017-02-20T12:21:28.9507042Z ##[section]Finishing: Release 
+0

Windowsマシンファイルのコピータスク/ステップを使用する場合は、共有フォルダを設定する必要はありません。詳細構築ログとは何ですか?あなたはここでそれを共有できますか? –

+0

ログが投稿に追加されました。 –

+0

そのユーザーとそのマシンでログオンし、Eで新しいフォルダを作成してから代わりに使用してください。一方、別の管理者アカウントを指定して結果を確認してください。 –

答えて

0

この問題は、Active Directoryアカウントを使用して解決しました。これは、管理共有でRobocopyにできないという問題を修正しました。これは、ADユーザーがアクセスしたマシンと、ADがアクセスできないが、ローカル管理者アカウントのアカウントがADアカウントと同じ名前でセットアップされたマシンで機能しました。

関連する問題