4
votes

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
1

1 Answers

2
votes

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.