WebJob"主机没有运行&QUOT ;.如何调试? [英] WebJob "host is not running". How to debug?

查看:250
本文介绍了WebJob"主机没有运行&QUOT ;.如何调试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是Azure的网站WebJob在线与除了这任何级别没有部署错误,并在WebJob SCM控制台的部署WebJobs可见没有错误:主机没有运行等一些模糊的信息(见下文)。我在2015年的VisualStudio本地启动WebJob,它运行完美,不过,我可以调试不重视部署WebJob。 父MVC 5网站运行良好作为Azure的网站,我可以将调试器附加到它的控制器。

在这种情况下,什么是主机未运行的含义及如何/我在哪里可以看到最好的是什么错?

我也得到了SCM控制台下面,但我不知道跑哪里去了csc命令。另外,我已经在我的网站的配置可提供更深入的开启应用程序日志详细表。

  [2015年8月27日十九时49分52秒> 62f8a0:SYS ERR]招聘失败,由于出口code 1
[2015年8月27日19点49分52秒> 62f8a0:SYS INFO]进程下去,等待60秒
[2015年8月27日19点49分52秒> 62f8a0:SYS INFO]状态改为PendingRestart
[2015年8月27日19点50分五十七秒> 62f8a0:SYS INFO]运行脚本CSC.EXE'与脚本宿主 - 'WindowsScriptHost
[2015年8月27日19点50分五十七秒> 62f8a0:SYS INFO]状态改为运行
[2015年8月27日19时50分五十八秒> 62f8a0:INFO]微软(R)的Visual C#编译器版本1.0.0.50618
[2015年8月27日19时50分五十八秒> 62f8a0:INFO]版权所有(C)微软公司。版权所有。
[2015年8月27日19时50分五十八秒> 62f8a0:INFO]
[2015年8月27日19时50分五十八秒> 62f8a0:INFO]警告CS2008:未指定源文件。
[2015年8月27日19时50分五十八秒> 62f8a0:INFO]错误CS1562:没有源输出必须指定/ out选项
[2015年8月27日19时50分五十八秒> 62f8a0:SYS ERR]招聘失败,由于出口code 1
[2015年8月27日19时50分五十八秒> 62f8a0:SYS INFO]进程下去,等待60秒
[2015年8月27日19时50分五十八秒> 62f8a0:SYS INFO]状态改为PendingRestart


解决方案

似乎已公布webjob中有 CSC.EXE 文件。您可以通过检查webjob文件夹验证D:\\家\\网站\\ wwwroot的\\ App_Data文件\\工作\\连续\\<作业名> 来自的 DebuConsole

在运行该webjob逻辑试图找到可执行文件运行时,它会通过他们按字母顺序排列。如果你需要 CSC.EXE 在webjob但webjob实际上是在不同的exe文件,然后包括一个名为 run.cmd 运行你的EXE。 运行。* 将始终以precedence过任何东西。

An Azure Websites WebJob is online with no deployment errors and no errors visible on the WebJob SCM consoles for the deployed WebJobs at any level except for this: "host not running" and some fuzzy info (see below). I can start the WebJob locally in VisualStudio 2015 and it runs perfectly, however I cannot attach the debugger to the deployed WebJob. The "parent" MVC 5 Website runs fine as a Azure Website and I can attach the debugger to it's controllers.

What does "host not running" in this case mean and how/where can I best see what is wrong?

What I also get in the SCM console is the following, but I'm not sure where to run the csc command. Also, I have turned on application logging verbose to table in my WebSite config which may provide more insight.

[08/27/2015 19:49:52 > 62f8a0: SYS ERR ] Job failed due to exit code 1
[08/27/2015 19:49:52 > 62f8a0: SYS INFO] Process went down, waiting for 60 seconds
[08/27/2015 19:49:52 > 62f8a0: SYS INFO] Status changed to PendingRestart
[08/27/2015 19:50:57 > 62f8a0: SYS INFO] Run script 'csc.exe' with script host - 'WindowsScriptHost'
[08/27/2015 19:50:57 > 62f8a0: SYS INFO] Status changed to Running
[08/27/2015 19:50:58 > 62f8a0: INFO] Microsoft (R) Visual C# Compiler version 1.0.0.50618
[08/27/2015 19:50:58 > 62f8a0: INFO] Copyright (C) Microsoft Corporation. All rights reserved.
[08/27/2015 19:50:58 > 62f8a0: INFO] 
[08/27/2015 19:50:58 > 62f8a0: INFO] warning CS2008: No source files specified.
[08/27/2015 19:50:58 > 62f8a0: INFO] error CS1562: Outputs without source must have the /out option specified
[08/27/2015 19:50:58 > 62f8a0: SYS ERR ] Job failed due to exit code 1
[08/27/2015 19:50:58 > 62f8a0: SYS INFO] Process went down, waiting for 60 seconds
[08/27/2015 19:50:58 > 62f8a0: SYS INFO] Status changed to PendingRestart

解决方案

It seems that the published webjob has csc.exe file in it. You can verify by checking the webjob folder D:\home\site\wwwroot\App_Data\jobs\continuous\<jobName> from DebuConsole.

When the logic that runs the webjob tries to find the executable to run, it will go through them in alphabetical order. If you need csc.exe in your webjob but the webjob is actually in a different exe, then include a file called run.cmd that runs your exe. run.* will always take precedence over anything.

这篇关于WebJob&QUOT;主机没有运行&QUOT ;.如何调试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆