iisnode
iisnode copied to clipboard
IISnode gives 500.1000 error while running a node app.
I have added a virtual directory under my site and converted that into app. I have provided IIS_User full control. I have url rewrite module 2.
It works when I host my app under site created by setsample.bat but not when deployed anywhere else.
I have used ETW trace and result was ,
<Events> <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Provider Guid="{9e814aad-3204-11d2-9a82-006008a86939}" /> <EventID>0</EventID> <Version>2</Version> <Level>0</Level> <Task>0</Task> <Opcode>0</Opcode> <Keywords>0x0</Keywords> <TimeCreated SystemTime="2017-11-21T10:57:38.138976000Z" /> <Correlation ActivityID="{00000000-0000-0000-0000-000000000000}" /> <Execution ProcessID="15320" ThreadID="13276" ProcessorID="0" KernelTime="15" UserTime="0" /> <Channel /> <Computer /> </System> <EventData> <Data Name="BufferSize"> 8192</Data> <Data Name="Version">83951878</Data> <Data Name="ProviderVersion"> 7601</Data> <Data Name="NumberOfProcessors"> 4</Data> <Data Name="EndTime">131557156685606923</Data> <Data Name="TimerResolution"> 156250</Data> <Data Name="MaxFileSize"> 0</Data> <Data Name="LogFileMode">0x0</Data> <Data Name="BuffersWritten"> 2</Data> <Data Name="StartBuffers"> 1</Data> <Data Name="PointerSize"> 8</Data> <Data Name="EventsLost"> 0</Data> <Data Name="CPUSpeed"> 2700</Data> <Data Name="LoggerName">0x2</Data> <Data Name="LogFileName">0x7</Data> <Data Name="BootTime">131553751190468750</Data> <Data Name="PerfFreq">10000000</Data> <Data Name="StartTime">131557156581389760</Data> <Data Name="ReservedFlags">0x1</Data> <Data Name="BuffersLost"> 0</Data> <Data Name="SessionNameString">iisnode</Data> <Data Name="LogFileNameString">C:\Users\DELIVE~1\AppData\Local\Temp\3\iisnode.etl</Data> </EventData> <RenderingInfo Culture="en-US"> <Opcode>Header</Opcode> <Provider>MSNT_SystemTrace</Provider> <EventName xmlns="http://schemas.microsoft.com/win/2004/08/events/trace">EventTrace</EventName> </RenderingInfo> <ExtendedTracingInfo xmlns="http://schemas.microsoft.com/win/2004/08/events/trace"> <EventGuid>{68fdd900-4a3e-11d1-84f4-0000f80464e3}</EventGuid> </ExtendedTracingInfo> </Event> <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Provider Guid="{1040dfc4-61db-484a-9530-584b2735f7f7}" /> <EventID>0</EventID> <Version>0</Version> <Level>4</Level> <Task>0</Task> <Opcode>0</Opcode> <Keywords>0x0</Keywords> <TimeCreated SystemTime="2017-11-21T10:57:43.066976100Z" /> <Correlation ActivityID="{00000000-0000-0000-0000-000000000000}" /> <Execution ProcessID="30800" ThreadID="13384" ProcessorID="2" KernelTime="0" UserTime="0" /> <Channel /> <Computer /> </System> <Data>iisnode received a new http request</Data> </Event> <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Provider Guid="{1040dfc4-61db-484a-9530-584b2735f7f7}" /> <EventID>0</EventID> <Version>0</Version> <Level>2</Level> <Task>0</Task> <Opcode>0</Opcode> <Keywords>0x0</Keywords> <TimeCreated SystemTime="2017-11-21T10:57:43.067249500Z" /> <Correlation ActivityID="{00000000-0000-0000-0000-000000000000}" /> <Execution ProcessID="30800" ThreadID="13384" ProcessorID="2" KernelTime="0" UserTime="0" /> <Channel /> <Computer /> </System> <Data>iisnode failed to initialize a new node.exe process</Data> </Event> <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Provider Guid="{1040dfc4-61db-484a-9530-584b2735f7f7}" /> <EventID>0</EventID> <Version>0</Version> <Level>2</Level> <Task>0</Task> <Opcode>0</Opcode> <Keywords>0x0</Keywords> <TimeCreated SystemTime="2017-11-21T10:57:43.067258200Z" /> <Correlation ActivityID="{00000000-0000-0000-0000-000000000000}" /> <Execution ProcessID="30800" ThreadID="13384" ProcessorID="2" KernelTime="0" UserTime="0" /> <Channel /> <Computer /> </System> <Data>iisnode failed to initialize a new node.js application</Data> </Event> <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Provider Guid="{1040dfc4-61db-484a-9530-584b2735f7f7}" /> <EventID>0</EventID> <Version>0</Version> <Level>2</Level> <Task>0</Task> <Opcode>0</Opcode> <Keywords>0x0</Keywords> <TimeCreated SystemTime="2017-11-21T10:57:43.067262700Z" /> <Correlation ActivityID="{00000000-0000-0000-0000-000000000000}" /> <Execution ProcessID="30800" ThreadID="13384" ProcessorID="2" KernelTime="0" UserTime="0" /> <Channel /> <Computer /> </System> <Data>iisnode failed to create a new node.js application</Data> </Event> <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Provider Guid="{1040dfc4-61db-484a-9530-584b2735f7f7}" /> <EventID>0</EventID> <Version>0</Version> <Level>4</Level> <Task>0</Task> <Opcode>0</Opcode> <Keywords>0x0</Keywords> <TimeCreated SystemTime="2017-11-21T10:57:43.067276100Z" /> <Correlation ActivityID="{00000000-0000-0000-0000-000000000000}" /> <Execution ProcessID="30800" ThreadID="13384" ProcessorID="2" KernelTime="0" UserTime="0" /> <Channel /> <Computer /> </System> <Data>iisnode failed to process a new http request</Data> </Event> </Events>
My Web.config
`
<handlers>
<add name="iisnode" path="app.js" verb="*" modules="iisnode" />
</handlers>
<iisnode
node_env="%node_env%"
debuggerExtensionDll="iisnode-inspector-0.7.3.dll"
nodeProcessCountPerApplication="1"
maxConcurrentRequestsPerProcess="1024"
maxNamedPipeConnectionRetry="100"
namedPipeConnectionRetryDelay="250"
maxNamedPipeConnectionPoolSize="512"
maxNamedPipePooledConnectionAge="30000"
asyncCompletionThreadCount="0"
initialRequestBufferSize="4096"
maxRequestBufferSize="65536"
watchedFiles="web.config;*.js"
uncFileChangesPollingInterval="5000"
gracefulShutdownTimeout="60000"
loggingEnabled="true"
logDirectory="iisnode"
debuggingEnabled="true"
debugHeaderEnabled="false"
debuggerPortRange="5058-6058"
debuggerPathSegment="debug"
maxLogFileSizeInKB="128"
maxTotalLogFileSizeInKB="1024"
maxLogFiles="20"
devErrorsEnabled="true"
flushResponse="false"
enableXFF="false"
promoteServerVars=""
nodeProcessCommandLine=""%programfiles%\nodejs\node.exe""
interceptor=""%programfiles%\iisnode\interceptor.js""
/>
<rewrite>
<rules>
<rule name="myapp">
<match url="/*" />
<action type="Rewrite" url="app.js" />
</rule>
</rules>
</rewrite>
</system.webServer>
`
Please help me ASPA. It is a big blocker and I don't understand how to fix it.
I had the same problem (receiving 500.1000 errors). I had Node installed using NVM. Uninstalled NVM and installed the specific Node version needed and got it working.
Are you able to resolve the issue? I am still facing same issue but in my case when am creating new site in IIS and hosting there then its working fine but when I host the application as application folder under SharePoint application then it is not working.
I did not un-install nvm as was suggested. I did the following instead. Changed permissions the other side of the sym-link to nodejs to include IUSR, IIS_IUSRS & NETWORK SERVICE. These were completely missing.
it works fine for me: Application pools -> Advanced Settings -> Identity -> change the Identity to Administrator