Skip to content

Intermittent unknown error, lstat 'D:\home' #693

@ejizba

Description

@ejizba

We've received various incident reports of apps failing to start because of an error like this:

Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcException : Result: Failure
Exception: Worker was unable to load function HttpTrigger: 'Error: UNKNOWN: unknown error, lstat 'D:\home''
Stack: Error: UNKNOWN: unknown error, lstat 'D:\home'
at Object.realpathSync (fs.js:1801:7)
at toRealPath (internal/modules/cjs/loader.js:362:13)
at Function.Module._findPath (internal/modules/cjs/loader.js:505:24)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:888:27)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:101:18)
at FunctionLoader. (D:\Program Files (x86)\SiteExtensions\Functions\3.19.2\workers\node\dist\src\worker-bundle.js:17270:26)
at Generator.next ()
at D:\Program Files (x86)\SiteExtensions\Functions\3.19.2\workers\node\dist\src\worker-bundle.js:17231:71

Per the Antares team, they believe there is a glitch with Azure Files where the root of the file system is unavailable, but it should be transient and the app's content should always be available. They were considering virtualizing 'D:\home' to prevent this issue, but proposed we do a retry instead. This happens because Node.js is looking in the app root and every parent folder until it finds a package.json file, which is how it eventually checks 'D:\home' and fails.

Workaround

Update: This may not be helping, but it also can't hurt. If we uncover a better workaround we will post it here.

Users can workaround this error by adding a package.json file to the root of their app and redeploying. You can run npm init to create this file. The content is not super important - it just has to exist to prevent Node.js from searching all the way up to 'D:\home'.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions