Azure WebJob返回"系统找不到指定的文件"

时间:2015-05-01 13:35:40

标签: php azure azure-webjobs

我试图在Azure WebJobs上运行PHP脚本。直到最近我重新部署应用程序时,这种方法运行得非常好。现在我尝试上传的任何PHP脚本都拒绝加载,在日志文件中给出了以下错误错误:

[05/01/2015 13:21:25 > 611c38: SYS INFO] Status changed to Initializing
[05/01/2015 13:21:25 > 611c38: SYS INFO] Run script 'test.php' with script host - 'PhpScriptHost'
[05/01/2015 13:21:25 > 611c38: SYS INFO] Status changed to Running
[05/01/2015 13:21:25 > 611c38: ERR ] The system cannot find the file specified
[05/01/2015 13:21:25 > 611c38: SYS INFO] Status changed to Failed
[05/01/2015 13:21:25 > 611c38: SYS ERR ] System.AggregateException: One or more errors occurred. ---> System.ComponentModel.Win32Exception: The system cannot find the file specified
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at Kudu.Core.Infrastructure.ProcessWrapper.Start()
   at Kudu.Core.Infrastructure.ProcessExtensions.<Start>d__a.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Kudu.Core.Infrastructure.Executable.<ExecuteAsync>d__1d.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at System.Threading.Tasks.Task`1.get_Result()
   at Kudu.Core.Infrastructure.Executable.ExecuteInternal(ITracer tracer, Func`2 onWriteOutput, Func`2 onWriteError, Encoding encoding, String arguments, Object[] args)
   at Kudu.Core.Infrastructure.Executable.ExecuteReturnExitCode(ITracer tracer, Action`1 onWriteOutput, Action`1 onWriteError, String arguments, Object[] args)
   at Kudu.Core.Jobs.BaseJobRunner.RunJobInstance(JobBase job, IJobLogger logger, String runId)
---> (Inner Exception #0) System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at Kudu.Core.Infrastructure.ProcessWrapper.Start()
   at Kudu.Core.Infrastructure.ProcessExtensions.<Start>d__a.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Kudu.Core.Infrastructure.Executable.<ExecuteAsync>d__1d.MoveNext()<---

我在Azure上部署的任何Web应用程序都存在问题。

2 个答案:

答案 0 :(得分:3)

检查php运行时是否已安装;)

答案 1 :(得分:2)

问题是在仪表板上禁用了php支持。 Azure能够找到我的PHP脚本,它有权阅读它。当它试图执行脚本时,它无法通过仪表板找到运行时。如果可以说php被禁用而不是说它找不到一些文件,本来可以救我几个小时的工作。

始终确保在门户网站上启用了正在执行的脚本的脚本运行时。