1

There is no Azure Scheduler set up for this. This webjob is a jar file which I uploaded from the Azure Portal.

Tell me how to add a settings.job file along with the .jar and .bat zipped pack. I'm hoping this would override whatever is making my job to trigger twice.

Here are the logs:

2018-02-09 15:00:05 ~1CUSTDATA-APP POST /api/triggeredwebjobs/GoogleAn/run api-version=2016-08-01&X-ARR-LOG-ID=0ed7d17e-4514-4261-8c85-0479f5df1729 443 - 70.37.57.58 AzurePowershell/v1.4.0.0 - https://management.azure.com/subscriptions/5b-342f-4641-bfa6-41de4c/resourceGroups/custdata-rg/providers/Microsoft.Web/sites/custdata-app/TriggeredWebJobs/GoogleAn/run?api-version=2016-08-01 custdata-app.scm.azurewebsites.net 200 0 0 576 2534 203
2018-02-09 15:02:57 ~1CUSTDATA-APP POST /api/triggeredwebjobs/GoogleAn/run X-ARR-LOG-ID=21c8d186-0365-4230-b62a-321c7cb8d63f 443 - 94.56.200.242 - - - custdata-app.scm.azurewebsites.net 202 0 0 610 1040 223
2018-02-09 15:03:02 ~1CUSTDATA-APP POST /api/triggeredwebjobs/GoogleAn/run X-ARR-LOG-ID=c305c72a-c441-429f-9524-d637428ec9d4 443 - 94.56.200.242 - - - custdata-app.scm.azurewebsites.net 409 0 0 554 1022 5125
2018-02-09 15:04:49 ~1CUSTDATA-APP POST /api/triggeredwebjobs/GoogleAn/run X-ARR-LOG-ID=0ab4d325-46c0-4874-b5fb-5a853da182e2 443 - 94.56.200.242 - - - custdata-app.scm.azurewebsites.net 202 0 0 610 1040 184
2018-02-09 15:04:55 ~1CUSTDATA-APP POST /api/triggeredwebjobs/GoogleAn/run X-ARR-LOG-ID=2c188dff-0c6a-42ab-b2ba-a4920e777b98 443 - 94.56.200.242 - - - custdata-app.scm.azurewebsites.net 409 0 0 579 1022 5109

you can see from the logs its returning 409 error as here its triggering twice. Although I have just triggered it once. Any idea why this is behaving thus?

There are no staging slots also.

Also, when I checked the logs today, without triggering it, they look like this

#Software: Microsoft Internet Information Services 8.0
#Fields: date time s-sitename cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken
2018-02-12 04:00:07 ~1CUSTDATA-APP POST /api/triggeredwebjobs/GoogleAn/run api-version=2016-08-01&X-ARR-LOG-ID=b84a1519-4150-4e81-9b30-d899aa9278a7 443 - 70.37.57.58 AzurePowershell/v1.4.0.0 - https://management.azure.com/subscriptions/5b-342f-4641-bfa6-419c20edde4c/resourceGroups/custdata-rg/providers/Microsoft.Web/sites/CUSTDATA-APP/TriggeredWebJobs/GoogleAn/run?api-version=2016-08-01 CUSTDATA-APP.scm.azurewebsites.net 200 0 0 576 2534 171
2018-02-12 04:05:06 ~1CUSTDATA-APP POST /api/triggeredwebjobs/GoogleAn/run api-version=2016-08-01&X-ARR-LOG-ID=e66c81cc-6012-445e-9b72-62625696571d 443 - 70.37.57.58 AzurePowershell/v1.4.0.0 - https://management.azure.com/subscriptions/5b-342f-4641-bfa6-419c20edde4c/resourceGroups/custdata-rg/providers/Microsoft.Web/sites/CUSTDATA-APP/TriggeredWebJobs/GoogleAn/run?api-version=2016-08-01 CUSTDATA-APP.scm.azurewebsites.net 200 0 0 576 2534 171
2018-02-12 04:10:06 ~1CUSTDATA-APP POST /api/triggeredwebjobs/GoogleAn/run api-version=2016-08-01&X-ARR-LOG-ID=fbf98e91-63f2-4056-9708-5770fab9d1bf 443 - 70.37.57.58 AzurePowershell/v1.4.0.0 - https://management.azure.com/subscriptions/5b-342f-4641-bfa6-419c20edde4c/resourceGroups/custdata-rg/providers/Microsoft.Web/sites/CUSTDATA-APP/TriggeredWebJobs/GoogleAn/run?api-version=2016-08-01 CUSTDATA-APP.scm.azurewebsites.net 200 0 0 576 2534 187
2018-02-12 04:15:07 ~1CUSTDATA-APP POST /api/triggeredwebjobs/GoogleAn/run api-version=2016-08-01&X-ARR-LOG-ID=d0fdd922-5f58-497c-b3f2-d107d83f516a 443 - 70.37.57.58 AzurePowershell/v1.4.0.0 - https://management.azure.com/subscriptions/5b-342f-4641-bfa6-419c20edde4c/resourceGroups/custdata-rg/providers/Microsoft.Web/sites/CUSTDATA-APP/TriggeredWebJobs/GoogleAn/run?api-version=2016-08-01 CUSTDATA-APP.scm.azurewebsites.net 200 0 0 576 2534 187
2018-02-12 04:20:06 ~1CUSTDATA-APP POST /api/triggeredwebjobs/GoogleAn/run api-version=2016-08-01&X-ARR-LOG-ID=cff05bb4-07fa-4b44-9c4f-a9cac5f6d61b 443 - 70.37.57.58 AzurePowershell/v1.4.0.0 - https://management.azure.com/subscriptions/5b-342f-4641-bfa6-419c20edde4c/resourceGroups/custdata-rg/providers/Microsoft.Web/sites/CUSTDATA-APP/TriggeredWebJobs/GoogleAn/run?api-version=2016-08-01 CUSTDATA-APP.scm.azurewebsites.net 200 0 0 576 2534 125
2018-02-12 04:25:07 ~1CUSTDATA-APP POST /api/triggeredwebjobs/GoogleAn/run api-version=2016-08-01&X-ARR-LOG-ID=ccd1cbba-589c-4d75-b103-12736d393b02 443 - 70.37.57.58 AzurePowershell/v1.4.0.0 - https://management.azure.com/subscriptions/5b-342f-4641-bfa6-419c20edde4c/resourceGroups/custdata-rg/providers/Microsoft.Web/sites/CUSTDATA-APP/TriggeredWebJobs/GoogleAn/run?api-version=2016-08-01 CUSTDATA-APP.scm.azurewebsites.net 200 0 0 576 2534 193
2018-02-12 04:30:05 ~1CUSTDATA-APP POST /api/triggeredwebjobs/GoogleAn/run api-version=2016-08-01&X-ARR-LOG-ID=c705f17e-09c8-4921-b2b7-88fa4671cbcd 443 - 70.37.57.58 AzurePowershell/v1.4.0.0 - https://management.azure.com/subscriptions/5b-342f-4641-bfa6-419c20edde4c/resourceGroups/custdata-rg/providers/Microsoft.Web/sites/CUSTDATA-APP/TriggeredWebJobs/GoogleAn/run?api-version=2016-08-01 CUSTDATA-APP.scm.azurewebsites.net 200 0 0 576 2534 156
2018-02-12 04:35:09 ~1CUSTDATA-APP POST /api/triggeredwebjobs/GoogleAn/run api-version=2016-08-01&X-ARR-LOG-ID=9d353a60-e919-4252-8c41-21e907fa0ad6 443 - 70.37.57.58 AzurePowershell/v1.4.0.0 - https://management.azure.com/subscriptions/5b-342f-4641-bfa6-419c20edde4c/resourceGroups/custdata-rg/providers/Microsoft.Web/sites/CUSTDATA-APP/TriggeredWebJobs/GoogleAn/run?api-version=2016-08-01 CUSTDATA-APP.scm.azurewebsites.net 200 0 0 576 2534 125
2018-02-12 04:40:07 ~1CUSTDATA-APP POST /api/triggeredwebjobs/GoogleAn/run api-version=2016-08-01&X-ARR-LOG-ID=fb183ad4-b63d-4936-8864-1daf0935110d 443 - 70.37.57.58 AzurePowershell/v1.4.0.0 - https://management.azure.com/subscriptions/5b-342f-4641-bfa6-419c20edde4c/resourceGroups/custdata-rg/providers/Microsoft.Web/sites/CUSTDATA-APP/TriggeredWebJobs/GoogleAn/run?api-version=2016-08-01 CUSTDATA-APP.scm.azurewebsites.net 200 0 0 576 2534 203
2018-02-12 04:45:06 ~1CUSTDATA-APP POST /api/triggeredwebjobs/GoogleAn/run api-version=2016-08-01&X-ARR-LOG-ID=e9608806-7a88-43cb-8918-3bec695ff920 443 - 70.37.57.58 AzurePowershell/v1.4.0.0 - https://management.azure.com/subscriptions/5b-342f-4641-bfa6-419c20edde4c/resourceGroups/custdata-rg/providers/Microsoft.Web/sites/CUSTDATA-APP/TriggeredWebJobs/GoogleAn/run?api-version=2016-08-01 CUSTDATA-APP.scm.azurewebsites.net 200 0 0 576 2534 157
2018-02-12 04:50:06 ~1CUSTDATA-APP POST /api/triggeredwebjobs/GoogleAn/run api-version=2016-08-01&X-ARR-LOG-ID=7dbcab05-2076-4012-939b-523d7487bda0 443 - 70.37.57.58 AzurePowershell/v1.4.0.0 - https://management.azure.com/subscriptions/5b-342f-4641-bfa6-419c20edde4c/resourceGroups/custdata-rg/providers/Microsoft.Web/sites/CUSTDATA-APP/TriggeredWebJobs/GoogleAn/run?api-version=2016-08-01 CUSTDATA-APP.scm.azurewebsites.net 200 0 0 576 2534 188
2018-02-12 04:55:07 ~1CUSTDATA-APP POST /api/triggeredwebjobs/GoogleAn/run api-version=2016-08-01&X-ARR-LOG-ID=bc930307-f6d9-48f7-b545-398597de91cd 443 - 70.37.57.58 AzurePowershell/v1.4.0.0 - https://management.azure.com/subscriptions/5b-342f-4641-bfa6-419c20edde4c/resourceGroups/custdata-rg/providers/Microsoft.Web/sites/CUSTDATA-APP/TriggeredWebJobs/GoogleAn/run?api-version=2016-08-01 CUSTDATA-APP.scm.azurewebsites.net 200 0 0 576 2534 125

So you can see its getting triggered every 5 mins. Any idea why this is happening automatically? Is there any scheduler which Iam not aware of?

I managed to put in the settings.job. Here is how it looks:enter image description here

Carol
  • 347
  • 5
  • 17
  • A little hard to read the logs due to formatting. Can you clean up using proper markdown (see [doc](https://stackoverflow.com/editing-help))? Also, you say it's manually triggered, but you give no details on how you are actually triggering it. What does your code look like? – David Ebbo Feb 11 '18 at 05:52
  • Also, give the full content of any `settings.job` that you are including in your WebJob. – David Ebbo Feb 11 '18 at 05:53
  • David, I have fomatted the logs now. I dont presently have a settings.job.But would you now how to add in one? I think adding in a settings.job file would solve the issue. – Carol Feb 12 '18 at 04:46
  • Triggering it through a pipeline using http copy activity. Iam taking the url of this webjob which gets generated on the portal and add it in the linked service of the associated Pipeline. Refer to this: https://stackoverflow.com/questions/46588080/how-to-integrate-a-webjob-within-an-azure-data-factory-pipeline which is exactly the same way Iam triggering my webjob. – Carol Feb 12 '18 at 04:50
  • Does this app still have this GoogleAn WebJobs? I see 3 WebJobs in there, but none by that name. – David Ebbo Feb 12 '18 at 19:25

1 Answers1

0

As we know , WebJobs in Azure App Service has two types: Continuous and Triggered.

Continuous WebJobs keeps the job from ending, the program or script typically does its work inside an endless loop. On the other side, Triggered WebJobs is triggerred manually or automatically as schedule. Based on your situation, obviously you're running Triggered WebJobs.

You can access the Kudu address in the browser:

https://<your app name>.scm.azurewebsites.net/DebugConsole.

Then go into the webjobs folder and find the settings.job file:

D:\home\site\wwwroot\App_Data\jobs\triggered\sample>

enter image description here

It means my webjobs will be trigerred automaticlly every 5 seconds.

Hope it helps you.


Update Answer:

You could check the settings.job reference which mentioned by @David Ebbo in the comment.

Compare the settings.job you provided, is_singleton and other properties are usage only on Continuous WebJobs.

I created a manually webjob and run it.Don't found any settings.job is generated. I suggest you removing the settings.job and test it again.

Jay Gong
  • 23,163
  • 2
  • 27
  • 32
  • 1> GA.jar 2> jarWebJob.zip 3> javaWebJob.exe 4>javaWebJob.exe.config 5> run.bat 6> settings.job these are the files that I see. – Carol Feb 12 '18 at 09:29
  • @Carol You could just post the screenshot of your settings.job in your edit question. – Jay Gong Feb 12 '18 at 09:32
  • { "is_singleton": true, "startTime": null, "endTime": null, "jobRecurrenceFrequency": null, "interval": null, "runMode": "OnDemand" } ----this is the settings.job – Carol Feb 12 '18 at 09:33
  • @Carol that is not a valid settings.job. Seems some properties were copied from a different file. Please see https://github.com/projectkudu/kudu/wiki/WebJobs#settingsjob-reference for what's valid in settings.job. – David Ebbo Feb 12 '18 at 19:20
  • @Jay, See initially there was no settings.job. I added it in manually. In both situations the job is getting triggered multiple times. – Carol Feb 14 '18 at 05:38
  • @Carol How did you create the webjob? When you create it on the portal, you can choose the type of webjob. Can you create it once again and make sure it's manually type? – Jay Gong Feb 14 '18 at 05:40
  • @Jay, I tried calling my jar through a PS script. Integrated it in a Function App NOT a Webjob. Then triggered this through my ADF pipeline and the jar got called just once. Everything worked just fine as expected. But when it comes to a Webjob it sadly gets stuck in this loop throwing the 409 error. – Carol Feb 14 '18 at 05:41
  • @Jay, I know that. I had earlier tried it that way i.e. through the portal. As it did not work I tried the manual dployment. Result was the same. But I'll do it once more. – Carol Feb 14 '18 at 05:44
  • I even tried another thing... I called my webjob through a Funtion App. The URL of the Function App went into the linked service instead of the Webjob URL. It worked perfectly well again. Don't understand why the Webjob when triggered through the ADF pipeline gets called again and again! – Carol Feb 14 '18 at 05:47
  • @Carol Let's talk in the chat room: https://chat.stackoverflow.com/rooms/165116/jaycarol – Jay Gong Feb 14 '18 at 08:22