I've created a webjob but whenever i run is I get an error saying no such file or directory found. How do I resolve this?

Shoaib Akhtar 0 Reputation points
2024-07-28T13:46:45.8266667+00:00

User's image

User's image

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,770 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 26,136 Reputation points Microsoft Employee
    2024-08-16T10:16:35.4+00:00

    Shoaib Akhtar, Apologies for the delayed response.

    To better assist you on this, are you leveraging Azure App Service Node Blessed Images or custom Docker Images? Does it work locally?

    --Are you deploying separately from the ZIP package of your app? -if yes, since the usual deployment path \site\wwwroot\app_data\jobs\... is read-only, you can't deploy WebJob files there. Instead, deploy WebJob files to \site\jobs\..., which is not read only. WebJobs deployed to \site\wwwroot\app_data\jobs\... and \site\jobs\... both run.

    • Running directly from a package makes wwwroot read-only. Your app will receive an error if it tries to write files to this directory.
    • TAR and GZIP formats are not supported.

    --Nodejs on App Service Linux and why to avoid installing packages in startup scripts. If possible, move the logic contained in this, to more appropriate parts of development. Such as into the build itself, or into a post or pre deployment script.

    --If you haven't done, you may leverage App Service diagnostics from Azure Portal> Navigate to your App Service app in the Azure Portal. (screenshot below)
    User's image

    Kindly let us know, I'll follow-up with you further.

     

    --------
    If the answer helped (pointed, you in the right direction) > please click Accept Answer

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.