2017-10-16 44 views
0

我試圖在JobPerparationTask期間安裝文件共享(不是blob存儲)。我的節點操作系統是Ubuntu 16.04。Azure Batch JobPreparationTask失敗,並顯示「UserError」

要做到這一點,我做了以下內容:

job_user = batchmodels.AutoUserSpecification(
    scope=batchmodels.AutoUserScope.pool, 
    elevation_level=batchmodels.ElevationLevel.admin) 

start_task = batch.models.JobPreparationTask(command_line=start_commands, user_identity=batchmodels.UserIdentity(auto_user=job_user)) 
end_task = batch.models.JobReleaseTask(command_line=end_commands,user_identity=batchmodels.UserIdentity(auto_user=job_user)) 

job = batch.models.JobAddParameter(
    job_id, 
    batch.models.PoolInformation(pool_id=pool_id),job_preparation_task=start_task, job_release_task=end_task) 

start_commandsend_commands都很好,但也有一些是錯誤的用戶權限...

我沒有得到任何輸出在stderr.txtstdout.txt文件中。 我什麼都沒有看到日誌(他們在哪裏?)。所有我能找到的信息都是這樣的:

Exit code 
    1 
Retry count 
    0 
Failure info 
Category 
    UserError 
Code 
    FailureExitCode 
Message 
    The task exited with an exit code representing a failure 
Details 
    Message: The task exited with an exit code representing a failure 

非常詳細的錯誤信息!

無論如何,我也嘗試更改AutoUserScope.ooolAutoUserScope.task,但沒有改變。

任何人有任何想法?

回答

0

我有這個令我沮喪的問題,因爲我無法從我的應用程序獲取任何日誌。

我最終什麼事做的是RDP'ing到我的工作跑了,去的節點%AZ_BATCH_TASK_WORKING_DIR%爲Azure Batch Compute Environment Variables指定,然後檢查我的工作stdout.txtstderr.txt

錯誤在於我制定了我的CloudTask的命令行不正確,所以無法首先啓動我的應用程序。

要RDP連接到你的機器,在Azure的門戶網站:

  1. 批量帳戶
  2. 池(選擇池)
  3. 節點
  4. 選擇跑到你的工作
  5. 選擇「節點連接「鏈接。
相關問題