Nodejs application returns error: iisnode encountered an error when processing the request HRESULT: 0x2 HTTP status: 500 HTTP subStatus: 1002

Created:

2016-12-12 03:42:27 UTC

Modified:

2017-08-08 13:26:10 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Nodejs application returns error: iisnode encountered an error when processing the request HRESULT: 0x2 HTTP status: 500 HTTP subStatus: 1002

Applicable to:

  • Plesk Onyx for Windows

Symptoms

Nodejs application returns the following error while accessing:

iisnode encountered an error when processing the request.

HRESULT: 0x2
HTTP status: 500
HTTP subStatus: 1002
HTTP reason: Internal Server Error

You are receiving this HTTP 200 response because system.webServer/iisnode/@devErrorsEnabled configuration setting is 'true'.

In addition to the log of stdout and stderr of the node.exe process, consider using debugging and ETW traces to further diagnose the problem.

The node.exe process has not written any information to stderr or iisnode was unable to capture this information. Frequent reason is that the iisnode module is unable to create a log file to capture stdout and stderr output from node.exe. Please check that the identity of the IIS application pool running the node.js application has read and write access permissions to the directory on the server where the node.js application is located. Alternatively you can disable logging by setting system.webServer/iisnode/@loggingEnabled element of web.config to 'false'.

Cause

node.js application must use the listen address provided by the iisnode module through the process.env.PORT environment variable.

Resolution

Add line app.listen(process.env.PORT); to the C:\\inetpub\\vhosts\\domain.tld\\httpdocs\\public\\app.js file.

Have more questions? Submit a request
Please sign in to leave a comment.