本文介绍了Webjob - 尝试打开chromedriver.exe时超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 显然找到了文件,但是在超时之前它一直在徘徊。 有人知道如何解决这个问题吗? b $ b我正在使用C#Selenium WebDriver。 日志: === [02/10/2019 12:27:51 > 7f9c27:SYS INFO]状态已更改为正在初始化 [02/10/2019 12:27:51> 7f9c27:SYS INFO]检测到作业目录更改:作业文件'Ololu_WebJob.exe'时间戳在源目录和工作目录之间不同。 [02/10/2019 12:27:53> 7f9c27:SYS INFO]使用脚本主机运行脚本'chromedriver.exe' - 'WindowsScriptHost' [02/10/2019 12:27:53> 7f9c27:SYS INFO]状态变为运行 [02/10/2019 12:27:53> 7f9c27:INFO]在端口9515上启动ChromeDriver 2.46.628402(536cd7adbad73a3783fdc2cab92ab2ba7ec361e1) [02/10/2019 12:27:53> 7f9c27:INFO]仅允许本地连接。 [02/10/2019 12:27:53> 7f9c27:INFO]请保护ChromeDriver和相关测试框架使用的端口,以防止恶意代码访问。 [02/10/2019 12:31:55> 7f9c27:ERR]命令'cmd / c"" chromedriv ...'由于121秒没有输出或CPU活动而中止。如果需要,您可以增加SCM_COMMAND_IDLE_TIMEOUT应用程序设置(如果这是WebJob,则增加WEBJOBS_IDLE_TIMEOUT)。 cmd / c"" chromedriver.exe"" [02 / 10/2019 12:31:55> 7f9c27:SYS INFO]状态已更改为失败 [02/10/2019 12:31:55> 7f9c27:SYS ERR] System.AggregateException:发生一个或多个错误。 ---> Kudu.Core.Infrastructure.CommandLineException:命令'cmd / c"" chromedriv ...'由于121秒没有输出或CPU活动而中止。 如果需要,您可以增加SCM_COMMAND_IDLE_TIMEOUT应用程序设置(如果这是WebJob,则增加WEBJOBS_IDLE_TIMEOUT)。 cmd / c"" chromedriver.exe"" 在C:\ Kudu中的Kudu.Core.Infrastructure.IdleManager.WaitForExit(IProcess进程)文件\ Private \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ /> &NBSP;在Kudu.Core.Infrastructure.ProcessExtensions<开始> d__12.MoveNext()在C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\ProcessExtensions.cs:第212行$ ---从抛出异常的先前位置开始的堆栈追踪结束--- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 在Kudu.Core.Infrastructure.Executable。< ExecuteAsync> d__31.MoveNext()在C:\Kudu Files \Private\src\master\Kudu.Core \Infrastructure \Executable.cs:第255行¥b $ b ---内部异常堆栈跟踪结束--- 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() &NBSP;在Kudu.Core.Infrastructure.Executable.ExecuteInternal(的ITracer示踪剂,Func`2 onWriteOutput,Func`2 onWriteError,编码方式进行编码,字符串参数,对象[]参数)在C:\Kudu Files\Private\src \ master\Kudu.Core \Intructrastructure \Executable.cs:line 216 &NBSP;在Kudu.Core.Infrastructure.Executable.ExecuteReturnExitCode(的ITracer示踪剂,Action`1 onWriteOutput,Action`1 onWriteError,字符串参数,对象[]参数)在C:\Kudu Files\Private\src\master \ Kudu.Core \Infrastructure \Executable.cs:第165行¥b $ b &NBSP;在Kudu.Core.Jobs.BaseJobRunner.RunJobInstance(JobBase作业,IJobLogger记录器,字符串的runid,字符串触发,的ITracer示踪剂的Int32端口)在C:\Kudu Files\Private\src\master\Kudu .Core\Jobs\BaseJobRunner.cs:第272行$ ---> (内部异常#0)ExitCode:-1,输出:命令'cmd / c"" chromedriv ...'由于121秒没有输出或CPU活动而中止。您可以增加SCM_COMMAND_IDLE_TIMEOUT应用程序设置(如果这是WebJob,则为WEBJOBS_IDLE_TIMEOUT)如果需要。错误:命令'cmd / c"" chromedriv ...'由于没有输出或CPU活动而中止121秒您可以增加SCM_COMMAND_IDLE_TIMEOUT应用程序设置(或WEBJOBS_IDLE_TIMEOUT如果这是一个WebJob)如果需要的话,Kudu.Core.Infrastructure.CommandLineException:命令 'CMD / C"" chromedriv ......' 是由于中止121秒无输出或CPU活动。如果需要,您可以增加SCM_COMMAND_IDLE_TIMEOUT应用程序设置(如果这是WebJob,则增加WEBJOBS_IDLE_TIMEOUT)。 cmd / c"" chromedriver.exe"" 在C:\ Kudu中的Kudu.Core.Infrastructure.IdleManager.WaitForExit(IProcess进程)文件\ Private \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ /> 在Kudu.Core.Infrastructure.ProcessExtensions。<开始> d__12.MoveNext()在C:\ Kudu Files \Private\src\master\Kudu.Core \Infrastructure \ProcessExtensions.cs:第212行$ ---从抛出异常的先前位置开始的堆栈追踪结束--- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 在Kudu.Core.Infrastructure.Executable。< ExecuteAsync> d__31.MoveNext()在C:\Kudu Files \Private\src\master\Kudu.Core \Infrastructure \Executable.cs:第255行< --- 解决方案 Apperently the file was found, but it stays wainting until timeout.Does anybody knows how to solve this?I'm useing C# Selenium WebDriver.Log:===[02/10/2019 12:27:51 > 7f9c27: SYS INFO] Status changed to Initializing[02/10/2019 12:27:51 > 7f9c27: SYS INFO] Job directory change detected: Job file 'Ololu_WebJob.exe' timestamp differs between source and working directories.[02/10/2019 12:27:53 > 7f9c27: SYS INFO] Run script 'chromedriver.exe' with script host - 'WindowsScriptHost'[02/10/2019 12:27:53 > 7f9c27: SYS INFO] Status changed to Running[02/10/2019 12:27:53 > 7f9c27: INFO] Starting ChromeDriver 2.46.628402 (536cd7adbad73a3783fdc2cab92ab2ba7ec361e1) on port 9515[02/10/2019 12:27:53 > 7f9c27: INFO] Only local connections are allowed.[02/10/2019 12:27:53 > 7f9c27: INFO] Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.[02/10/2019 12:31:55 > 7f9c27: ERR ] Command 'cmd /c ""chromedriv ...' was aborted due to no output nor CPU activity for 121 seconds. You can increase the SCM_COMMAND_IDLE_TIMEOUT app setting (or WEBJOBS_IDLE_TIMEOUT if this is a WebJob) if needed.cmd /c ""chromedriver.exe""[02/10/2019 12:31:55 > 7f9c27: SYS INFO] Status changed to Failed[02/10/2019 12:31:55 > 7f9c27: SYS ERR ] System.AggregateException: One or more errors occurred. ---> Kudu.Core.Infrastructure.CommandLineException: Command 'cmd /c ""chromedriv ...' was aborted due to no output nor CPU activity for 121 seconds. You can increase the SCM_COMMAND_IDLE_TIMEOUT app setting (or WEBJOBS_IDLE_TIMEOUT if this is a WebJob) if needed.cmd /c ""chromedriver.exe"" at Kudu.Core.Infrastructure.IdleManager.WaitForExit(IProcess process) in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\IdleManager.cs:line 45 at Kudu.Core.Infrastructure.ProcessExtensions.<Start>d__12.MoveNext() in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\ProcessExtensions.cs:line 212--- 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__31.MoveNext() in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\Executable.cs:line 255 --- 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) in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\Executable.cs:line 216 at Kudu.Core.Infrastructure.Executable.ExecuteReturnExitCode(ITracer tracer, Action`1 onWriteOutput, Action`1 onWriteError, String arguments, Object[] args) in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\Executable.cs:line 165 at Kudu.Core.Jobs.BaseJobRunner.RunJobInstance(JobBase job, IJobLogger logger, String runId, String trigger, ITracer tracer, Int32 port) in C:\Kudu Files\Private\src\master\Kudu.Core\Jobs\BaseJobRunner.cs:line 272---> (Inner Exception #0) ExitCode: -1, Output: Command 'cmd /c ""chromedriv ...' was aborted due to no output nor CPU activity for 121 seconds. You can increase the SCM_COMMAND_IDLE_TIMEOUT app setting (or WEBJOBS_IDLE_TIMEOUT if this is a WebJob) if needed., Error: Command 'cmd /c ""chromedriv ...' was aborted due to no output nor CPU activity for 121 seconds. You can increase the SCM_COMMAND_IDLE_TIMEOUT app setting (or WEBJOBS_IDLE_TIMEOUT if this is a WebJob) if needed., Kudu.Core.Infrastructure.CommandLineException: Command 'cmd /c ""chromedriv ...' was aborted due to no output nor CPU activity for 121 seconds. You can increase the SCM_COMMAND_IDLE_TIMEOUT app setting (or WEBJOBS_IDLE_TIMEOUT if this is a WebJob) if needed.cmd /c ""chromedriver.exe"" at Kudu.Core.Infrastructure.IdleManager.WaitForExit(IProcess process) in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\IdleManager.cs:line 45 at Kudu.Core.Infrastructure.ProcessExtensions.<Start>d__12.MoveNext() in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\ProcessExtensions.cs:line 212--- 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__31.MoveNext() in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\Executable.cs:line 255<--- 解决方案 这篇关于Webjob - 尝试打开chromedriver.exe时超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-13 17:53