I'm trying to deploy a very simple express.js app on Azure webapp.
The deployment log shows the that the deployment passes correctly but the app doesn't start. Checking the kudu process explorer shows that indeed the node.js process is not running
On the other hand I don't see any application logs nor any indication that the app even started.
Is there a way to see what happened when the nodeiis tried to start the app?
Open App Service diagnostics To access App Service diagnostics, navigate to your App Service web app or App Service Environment in the Azure portal. In the left navigation, click on Diagnose and solve problems.
The usual way to run a Node. js program is to run the globally available node command (once you install Node. js) and pass the name of the file you want to execute. While running the command, make sure you are in the same directory which contains the app.
Azure WebApp for node.js is running via iisnode as a native IIS module that allows hosting in IIS on Windows. Please see the document https://blogs.msdn.microsoft.com/silverlining/2012/06/14/windows-azure-websites-node-js/ to know its features.
For debugging the webapp for node.js, I suggest you can refer to the document to know how to do it.
If you are using Visual Studio as the IDE for node.js, I recommend installing NTVS in VS for debugging and deploying the node.js. Please see the documents below to know how to get started.
And there is an other tool called node-inspector
for inspecting the node.js app on Azure. As reference, you can refer to the doc http://www.ranjithr.com/?p=98.
Meanwhile, please check the web.config
file in your node webapp via Kudo Console, you can compare your codes with the sample generated by the template for Express from Gallery on Azure portal.
Hope it help. Any concern, please feel free to let me know.
The process explorer shows the processes of my webapp for node.js.
You need to enable logging before you can get logs that would (hopefully) give you more details about the error. You can read more about it here.
post my investigation step in here.
1. edit D:\home\site\wwwroot\iisnode.yml, from https://xxx.scm.azurewebsites.net/DebugConsole add below line
devErrorsEnabled: true
HRESULT: 0x2
HTTP status: 500
HTTP subStatus: 1002
HTTP reason: Internal Server Error
for more debugging skill, you can see: https://prmadi.com/debug-nodejs-app-in-azure-app-services-windows-2/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With