Currently, my Linux App Service fails to create Webjob, but it worked fine 2 days ago.
Also, I cannot find the detail error log of such error. All the error detail is the screenshot I shown above.
Also, I try to add the same zip file into a Windows App Service, the Webjob create successfully. I am thinking is it the issue on Linux App Service only?
For your reference, here is my zip file structure:
root
|-->packages.json
|-->run_p.sh
|-->yarn.lock
|-->dist
|-->p.js
|-->etc..
In my run_p.sh
I got these few lines of code:
#!/bin/bash
yarn install --production
node dist/p.js
(And inside p.js
, it is a cronjob producer. I don't think it will affect the Webjob creation.)
My App deploy with these setup:
Runtime Stack = Node-20-lts
, Publish model=Code
, Operating System=Linux
, SKU and size=Free(F1)
Currently, my Linux App Service fails to create Webjob, but it worked fine 2 days ago.
Also, I cannot find the detail error log of such error. All the error detail is the screenshot I shown above.
Also, I try to add the same zip file into a Windows App Service, the Webjob create successfully. I am thinking is it the issue on Linux App Service only?
For your reference, here is my zip file structure:
root
|-->packages.json
|-->run_p.sh
|-->yarn.lock
|-->dist
|-->p.js
|-->etc..
In my run_p.sh
I got these few lines of code:
#!/bin/bash
yarn install --production
node dist/p.js
(And inside p.js
, it is a cronjob producer. I don't think it will affect the Webjob creation.)
My App deploy with these setup:
Runtime Stack = Node-20-lts
, Publish model=Code
, Operating System=Linux
, SKU and size=Free(F1)
while i can't directly give you the solution but you can try to find the exception or error messages from linux app service using one of the below methods:
azure app service
extension. sign in your azure account, browse to your linux web app, finally try to access raw system log as shown in the screenshot. I found I have more success rate finding raw exception this way.I tried uploading the WebJob , but I encountered the same error. This might be because WebJobs are still in preview on Linux, and preview features often have limited functionality or stability.
I tried creating the App Service with the Premium pricing tier, and I was able to upload the WebJobs successfully. If possible, consider changing your plan to Premium.
If you have the option to use Windows WebJobs
, It's better to use that, as it provides full and stable support.
If you need to use Linux WebJobs
, there’s an alternative approach:
Open Kudu console, go to site -> wwwroot
directory, manually create the following folder structure:
/app_data/Jobs/Continuous
Once the folders are created. You can upload your WebJob using the drag-and-drop option in the Kudu file manager.
It will be directly added to WebJobs.
You can also upload it from the WebJobs option in the App Service.
This way you can successfully upload and run WebJobs on Linux App Services.
Output:
Please try to add the following two app settings to your Linux app: WEBSITE_SKIP_RUNNING_KUDUAGENT = false WEBSITES_ENABLE_APP_SERVICE_STORAGE = true
site -> wwwroot
directory, and then create the following folders:\app_data\Jobs\Continuous
. After creating these folders, you can upload your WebJob successfully. please check – Sirra Sneha Commented Jan 15 at 6:16