Azure Batch JobPreparationTask失败,并显示“UserError”
问题描述:
我试图在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_commands
和end_commands
都很好,但也有一些是错误的用户权限...
我没有得到任何输出在stderr.txt
或stdout.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.oool
到AutoUserScope.task
,但没有改变。
任何人有任何想法?
答
我有这个令我沮丧的问题,因为我无法从我的应用程序获取任何日志。
我最终什么事做的是RDP'ing到我的工作跑了,去的节点%AZ_BATCH_TASK_WORKING_DIR%为Azure Batch Compute Environment Variables指定,然后检查我的工作stdout.txt
和stderr.txt
。
错误在于我制定了我的CloudTask
的命令行不正确,所以无法首先启动我的应用程序。
要RDP连接到你的机器,在Azure的门户网站:
- 批量帐户
- 池(选择池)
- 节点
- 选择跑到你的工作
- 选择“节点连接“链接。