2

I experimented with WebJobs over the weekend, and my console app worked fine - until today. It started failing with this error message on the log page:

[03/26/2014 19:21:30 > 8fa263: SYS INFO] Status changed to Initializing
[03/26/2014 19:21:31 > 8fa263: SYS INFO] Run script 'IncidentPoll.exe' with script host - 'WindowsScriptHost'
[03/26/2014 19:21:31 > 8fa263: SYS INFO] Status changed to Running
[03/26/2014 19:21:31 > 8fa263: ERR ] 'IncidentPoll.exe' is not recognized as an internal or external command,
[03/26/2014 19:21:31 > 8fa263: ERR ] operable program or batch file.
[03/26/2014 19:21:31 > 8fa263: SYS INFO] Status changed to Failed
[03/26/2014 19:21:31 > 8fa263: SYS ERR ] Job failed due to exit code 1

I didn't change anything this morning. So I'm wondering if there's a policy change that occurred since last weekend?

EDIT: This webjob, is under the Websites Free tier. It was scheduled to fire every 10 minutes. Could it be because they (Microsoft) found this as a loophole? They also have a (dedicated) Scheduler Service (preview), in which under the Free tier, the maximum frequency that you can run is once per hour.

alpinescrambler
  • 1,934
  • 16
  • 26
  • The error says the file (`IncidentPoll.exe`) doesn't exist but since it should, can you verify whether it's in the following directories: `d:\home\site\wwwroot\App_Data\jobs\triggered\{jobname}` and `%temp%\jobs\triggered\{jobname}\{somerandomname}`, you can use DebugConsole tool on your scm site (https://{sitename}.scm.azurewebsites.net) more information on that in http://blogs.msdn.com/b/windowsazure/archive/2014/03/04/windows-azure-websites-online-tools-you-should-know-about.aspx – Amit Apple Mar 27 '14 at 17:13

2 Answers2

2

I was met with a very similar issue when running the executable from run.cmd. So I fired up the Kudu debug console and manually invoked run.cmd. The result was the following:

'Foo.exe' is not recognized as an internal or external command, operable program or batch file.

It was pretty clear now that the culprit was that strange  prefix. A quick web search turned up UTF-8 without BOM which demystified the issue - Visual Studio was adding a UTF BOM header that was confusing the Kudu (Azure) shell.

Fortunately the thread also contained a simple fix. In Visual Studio: File -> Advanced Save Options -> Encoding -> Unicode (UTF-8 without signature).

Community
  • 1
  • 1
Ohad Schneider
  • 36,600
  • 15
  • 168
  • 198
1

This is an issue that will soon be fixed, for now as a workaround move IncidentPoll.exe to be in the root of your WebJobs directory (if you're using a zip to upload your WebJob, make sure the zip has this binary at the root).

Amit Apple
  • 9,034
  • 41
  • 50
  • Yes, this is what I did. But I didn't know if this was the fix. Thanks . Previously, I zipped the whole "Release" folder. You confirmed it. – alpinescrambler Mar 29 '14 at 10:37
  • @Amit - I just got the same error when publishing a console app from VS 2013 (by right-clicking on the project and selecting "Publish as Azure Webjob"). Is there a fix I can find? Per this screenshot I took my exe is in the webjob's root. http://imgur.com/DoG6PN6 – Matthew Sep 12 '14 at 14:29
  • @Amit - UPDATE: The problem was the spaces in the assembly name. Apparently Azure doesn't like that. – Matthew Sep 12 '14 at 14:38
  • @Matt interesting, can you open an issue on http://github.com/projectkudu/kudu/issues ? – Amit Apple Sep 12 '14 at 16:33