Iisnode encountered an error when processing the request

I'm trying to check angularjs app with a server side written in node js and this is an error i get when i run in by webmatrix iisnode encountered an error when processing the request. HRESULT: ...

I’m trying to check angularjs app with a server side written in node js and this is an error i get when i run in by webmatrix

iisnode encountered an error when processing the request.

HRESULT: 0x2 
HTTP status: 500 
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’.

Does somebody know how to fix it?

Michael Haren's user avatar

Michael Haren

104k40 gold badges165 silver badges205 bronze badges

asked Jun 4, 2014 at 3:32

Tuvia Khusid's user avatar

Your application pool doesn’t seem to have enough permissions to write to the current folder.

  1. You can either edit the permissions to give the IIS_IUSRS group write permissions to that folder

  2. Go into the advanced settings menu and under Process Model -> Identity change the user account to a user that already has write permissions.

answered Jul 9, 2014 at 12:58

jdelibas's user avatar

3

It looks like your iisnode cannot write its log file, perhaps because it does not have write permissions. If you have access to to the server then you can check inside the app’s folder for an iisnode folder, that is where iisnode tries to write its logs by default.

Until you get this log info you are stuck because the 500 error you are seeing only tells you that the error has occurred on the server somewhere. You need the logs to give you the info you need to proceed.

The only other alternative is to run the whole thing locally and use something like node-inspector (I use grunt-node-inspector) to debug into the nodeJS code to see what is happening.

answered Jun 4, 2014 at 13:09

biofractal's user avatar

biofractalbiofractal

18.9k11 gold badges69 silver badges116 bronze badges

When I try to run the server I had three problems.I solved this:

  1. Instead of writing port by hand such as 3000, I added process.env.PORT. It determined its port by itself.

  2. Giving permissions to write log folder. I solved this by making logginEnabled=»false» on my web.config file.

  3. Removing console.log() commands. It regards outputs as an error.

index.js

const express = require("express");
const app = express();
var path = require("path");
const port = process.env.PORT;

app.get("/", (req, res) => {
  res.send({ appName: "animal-cdn" });
});

app.use(express.static(path.join(__dirname, "public")));
app.listen(port, () => {
  // console.log(`Example app listening at http://localhost:${port}`);
});

web.config file:

<configuration>
    <system.webServer>
    
        <validation validateIntegratedModeConfiguration="false" />
        <!-- indicates that the server.js file is a node.js application 
        to be handled by the iisnode module -->
         <iisnode 
                 loggingEnabled="false"
                 debuggingEnabled="true"
              />

        <handlers>
            <add name="iisnode" path="index.js" verb="*" modules="iisnode"/>
        </handlers>
        
        <rewrite>
            <rules>
                <rule name="myapp">
                    <match url="/*" />
                    <action type="Rewrite" url="index.js" />
                </rule>
                <rule name="HTTPS Redirect" stopProcessing="true">
                    <match url="(.*)" />
                    <conditions>
                        <add input="{HTTPS}" pattern="^OFF$" />
                    </conditions>
                    <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" appendQueryString="false" />
                </rule>
            </rules>
        </rewrite>

    </system.webServer>
</configuration>

answered Dec 3, 2021 at 11:53

Hasan Gökçe's user avatar

Hasan GökçeHasan Gökçe

4015 silver badges6 bronze badges

Allow, ‘Full Control’, for user ‘IIS_IUSRS’, from ‘Advanced Security’ upon right clicking you’r application root directory.

Reference

answered Apr 2, 2019 at 10:15

Jody Jacobus Geers's user avatar

I fixed this issue by running the setupsamples.bat file. This adds the permissions and other necessary configuration. The path is C:Program Filesiisnodesetupsamples.bat for me

answered Jul 6, 2016 at 17:08

Stuart Rucker's user avatar

1

For me there were no permissions problem because when I did console.log() in the server I got the log in the iisnode forlder.

I put all the Express in a try code block and in the try I used logged the exception, I have found out that for some reason iisnode lookup in dist/dist/index.html instead of dist/index.html

Once I have fixed that the error, everything have been solved.

Eric Aya's user avatar

Eric Aya

69.1k35 gold badges179 silver badges250 bronze badges

answered Dec 30, 2018 at 10:20

Remy's user avatar

RemyRemy

1,0031 gold badge19 silver badges23 bronze badges

I fix this to give full control to IIS_IURS
in iss >select app>edit permission>add>find IIS_IURS>give full control this works for me

answered Sep 1, 2022 at 15:41

seyhmus gumus's user avatar

1

I’m trying to check angularjs app with a server side written in node js and this is an error i get when i run in by webmatrix

iisnode encountered an error when processing the request.

HRESULT: 0x2 
HTTP status: 500 
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’.

Does somebody know how to fix it?

Michael Haren's user avatar

Michael Haren

104k40 gold badges165 silver badges205 bronze badges

asked Jun 4, 2014 at 3:32

Tuvia Khusid's user avatar

Your application pool doesn’t seem to have enough permissions to write to the current folder.

  1. You can either edit the permissions to give the IIS_IUSRS group write permissions to that folder

  2. Go into the advanced settings menu and under Process Model -> Identity change the user account to a user that already has write permissions.

answered Jul 9, 2014 at 12:58

jdelibas's user avatar

3

It looks like your iisnode cannot write its log file, perhaps because it does not have write permissions. If you have access to to the server then you can check inside the app’s folder for an iisnode folder, that is where iisnode tries to write its logs by default.

Until you get this log info you are stuck because the 500 error you are seeing only tells you that the error has occurred on the server somewhere. You need the logs to give you the info you need to proceed.

The only other alternative is to run the whole thing locally and use something like node-inspector (I use grunt-node-inspector) to debug into the nodeJS code to see what is happening.

answered Jun 4, 2014 at 13:09

biofractal's user avatar

biofractalbiofractal

18.9k11 gold badges69 silver badges116 bronze badges

When I try to run the server I had three problems.I solved this:

  1. Instead of writing port by hand such as 3000, I added process.env.PORT. It determined its port by itself.

  2. Giving permissions to write log folder. I solved this by making logginEnabled=»false» on my web.config file.

  3. Removing console.log() commands. It regards outputs as an error.

index.js

const express = require("express");
const app = express();
var path = require("path");
const port = process.env.PORT;

app.get("/", (req, res) => {
  res.send({ appName: "animal-cdn" });
});

app.use(express.static(path.join(__dirname, "public")));
app.listen(port, () => {
  // console.log(`Example app listening at http://localhost:${port}`);
});

web.config file:

<configuration>
    <system.webServer>
    
        <validation validateIntegratedModeConfiguration="false" />
        <!-- indicates that the server.js file is a node.js application 
        to be handled by the iisnode module -->
         <iisnode 
                 loggingEnabled="false"
                 debuggingEnabled="true"
              />

        <handlers>
            <add name="iisnode" path="index.js" verb="*" modules="iisnode"/>
        </handlers>
        
        <rewrite>
            <rules>
                <rule name="myapp">
                    <match url="/*" />
                    <action type="Rewrite" url="index.js" />
                </rule>
                <rule name="HTTPS Redirect" stopProcessing="true">
                    <match url="(.*)" />
                    <conditions>
                        <add input="{HTTPS}" pattern="^OFF$" />
                    </conditions>
                    <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" appendQueryString="false" />
                </rule>
            </rules>
        </rewrite>

    </system.webServer>
</configuration>

answered Dec 3, 2021 at 11:53

Hasan Gökçe's user avatar

Hasan GökçeHasan Gökçe

4015 silver badges6 bronze badges

Allow, ‘Full Control’, for user ‘IIS_IUSRS’, from ‘Advanced Security’ upon right clicking you’r application root directory.

Reference

answered Apr 2, 2019 at 10:15

Jody Jacobus Geers's user avatar

I fixed this issue by running the setupsamples.bat file. This adds the permissions and other necessary configuration. The path is C:Program Filesiisnodesetupsamples.bat for me

answered Jul 6, 2016 at 17:08

Stuart Rucker's user avatar

1

For me there were no permissions problem because when I did console.log() in the server I got the log in the iisnode forlder.

I put all the Express in a try code block and in the try I used logged the exception, I have found out that for some reason iisnode lookup in dist/dist/index.html instead of dist/index.html

Once I have fixed that the error, everything have been solved.

Eric Aya's user avatar

Eric Aya

69.1k35 gold badges179 silver badges250 bronze badges

answered Dec 30, 2018 at 10:20

Remy's user avatar

RemyRemy

1,0031 gold badge19 silver badges23 bronze badges

I fix this to give full control to IIS_IURS
in iss >select app>edit permission>add>find IIS_IURS>give full control this works for me

answered Sep 1, 2022 at 15:41

seyhmus gumus's user avatar

1

@petereysermans

I can’t seem to get iisnode working on my system, my specs:

  • Windows Web Server 2008 R2 x64
  • Node 0.10.10 installed in C:Program Files (x86)nodejs
  • iisnode-full-iis7-v0.2.3-x64.msi installed in «C:Program Files (x86)iisnode» IISNode is installed via «msiexec /i iisnode-full-iis7-v0.2.3-x64.msi WOW=1»
  • Plesk

The «Enable 32-bit applications» boolean is set to true on the application pool, which runs in Integrated mode (I’ve tried Classic, does not change anything) and on .Net framework version 4.

My application is the ‘Hello world’ application that is mentioned in the howtos of iisnode. The code:

var http = require('http');

http.createServer(function (req, res) {
    res.writeHead(200, {'Content-Type': 'text/plain'});
    res.end('Hello, world! [helloworld sample]');
}).listen(process.env.PORT);  

If I change ‘process.env.PORT’ to ‘8000’ and run the file via the command ‘node hello.js’, then the page works fine. I can browse it via localhost:8000. I’ve looked at the etw traces but can’t make anything of it. I’ve also tried to log any exceptions in my node file by catching the exception and writing it to a file but no file is created.

the etw traces look like this:

  • iisnode initialized the application manager
  • iisnode received a new http request
  • iisnode initialized a new node.exe process
  • iisnode initialized a new node.js application
  • iisnode increases pending async operation count
  • iisnode scheduled a retry of a named pipe connection to the node.exe process
  • iisnode dispatched new http request
  • iisnode decreases pending async operation count
  • iisnode leaves CNodeHttpModule::OnExecuteRequestHandler with RQ_NOTIFICATION_PENDING
  • iisnode detected termination of node.exe process
  • iisnode was unable to establish named pipe connection to the node.exe process before the process terminated
  • iisnode request processing failed for reasons unrecognized by iisnode
  • iisnode decreases pending async operation count
  • iisnode posts completion from SendEmtpyResponse
  • iisnode increases pending async operation count
  • iisnode enters CNodeHttpModule::OnAsyncCompletion callback
  • iisnode decreases pending async operation count
  • iisnode leaves CNodeHttpModule::OnAsyncCompletion with RQ_NOTIFICATION_FINISH_REQUEST

As I didn’t find any ‘next steps’ to take, any help is greatly appreciated.

@tjanczuk

The ETW traces suggest the node.exe process that iisnode creates to serve your application is immediately terminating (iisnode detected termination of node.exe process). I don’t see any reason for this in the JavaScript code.

I suggest a few experiments:

  1. Can you try with node.js version 0.8.x?
  2. Add an uncaughtException handler to your server.js and log the exceptions to a file somewhere — let’s see if any JS exceptions are thrown.
  3. Is there anythin interesting to be learned from the EventLog?
  4. Can you try installing the just released iisnode v0.2.7? The x64 installer will install both x86 and x64 version of iisnode, and the proper one will be picked up at runtime based on the bitness of the IIS worker process (details in Allow running iisnode 32 and 64 bit side by side on 64 bit servers #281).

@tjanczuk

Also, do any of the node.js samples included with iisnode work?

@petereysermans

Thanks for the very quick response!

So I’ve uninstalled node v0.10.10 and installed v0.8.25, uninstalled iisnode v0.2.6 and installed v0.2.7. I’ve changed my testfile to this code:

var http = require('http');
var fs = require('fs');

process.on('uncaughtException', function (err) {
    fs.writeFile("test.txt",  err, "utf8");    
})

http.createServer(function (req, res) {
    res.writeHead(200, {'Content-Type': 'text/plain'});
    res.end('Hello, world! [helloworld sample]');
}).listen(process.env.PORT || 8888);  

I think that’s the right way of logging an uncaughtException? I’m still at a starting level with node. But nothing is being written to file. I’ve tested the file writing using the node command directly and the file was written like it should.

There are no events in the event log, and from the samples I’ve tried 3 (helloworld, defaultdocument and express) all returned the same error.

@tjanczuk

Can you put a simple *.txt file next to your server.js file and try navigating to it from the browser? Let’s just make sure the IIS app is set up correctly.

Please change your writeFile to writeFileSync and see if it then writes anything to the file.

Can you add a console.log as the last line in your code (after call to listen) to see if the execution gets that far?

What is the configuration of the IIS application pool that runs your application? Are you doing anything non-default, e.g. custom identity, any other non-default values?

@petereysermans

I can browse the text file fine, it shows the content in the browser when I navigate to it. I’ve changed writeFile to writeFileSync but still nothing is written to file. The console.log is also added to the code, when I run the file with node I can see the message fine. However I don’t know where the console.log output is put when running via iisnode. The code now looks like this:

var http = require('http');
var fs = require('fs');

process.on('uncaughtException', function (err) {
    fs.writeFileSync("test.txt",  err, "utf8");    
})

http.createServer(function (req, res) {
    res.writeHead(200, {'Content-Type': 'text/plain'});
    res.end('Hello, world! [helloworld sample]');
}).listen(process.env.PORT || 8888);  

console.log('finished');

These are the settings of the application pool, it was created by Plesk when the domain name was created in Plesk:
Basic settings

  • .NET Framework version: .NET Framework v4.0.30319
  • Managed pipeline mode: Integrated

Advanced Settings (I’m only including the ones that are bold)

  • .Net Framework Version: v4.0
  • Enable 32-Bit Applications: True
  • Identity: -custom Plesk identity created for the application pool-
  • Idle Time-out (minutes): 5
  • Load User Profile: False

So to answer your question, the custom identity is indeed non-default. Could that be it?

@petereysermans

I’ve been trying some things with the application pool and its identity, as I had a feeling the problem could be related. I’ve currently set the application pool to the DefaultAppPool and set the identity to NETWORK SERVICE. After giving NETWORK SERVICE the correct modify rights. I now have an error message:

Application has thrown an uncaught exception and is terminated:
Error: EPERM, operation not permitted 'C:inetpubvhosts'
    at Object.fs.lstatSync (fs.js:520:18)
    at Object.realpathSync (fs.js:1047:21)
    at tryFile (module.js:142:15)
    at Function.Module._findPath (module.js:181:18)
    at Function.Module._resolveFilename (module.js:336:25)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object.<anonymous> (C:Program Files (x86)iisnodeinterceptor.js:210:1)
    at Module._compile (module.js:449:26)

I’m guessing it is recommended that you run your web application under the DefaultAppPool with the ApplicationPoolIdentity as Identity? However if I tried to set the correct right by adding modify rights to IIS APPPOOLDefaultAppPool that user wasn’t found and when I navigated to the test.js file I just got a 500 — Internal Server Error. So I’m assuming that is a rights problem and the correct rights are not set to the ApplicationPoolIdentity on the iisnode & nodejs folders.

I’ve found this Server Fault thread but after running the icacls c:inetpubwwwroot /grant "IIS APPPOOLDefaultAppPool":(OI)(CI)(RX) command I keep getting the same 500 — Internal Server Error. Also the following warning is created in the Error Log:

There was an error during processing of the managed application 
service auto-start for application pool: 'DefaultAppPool'.  Some application services may not
have been processed correctly. Please check the configuration for application service 
auto-start for the application(s) assigned to this application pool.  
The data field contains the error code.

@petereysermans

I’ve got it to work with the DefaultAppPool and setting the identity to NETWORK SERVICE. The error above I solved by using the solution you proposed in issue #247.

The only question that remains now is, is it bad to run my application under the NETWORK SERVICE identity? I’m guessing the problem is that the DefaultAppPool is configured in a certain way and the app pools that Plesk creates do not have the same configuration as the DefaultAppPool?

@futurechan

@vinogeetha

simple, give access-control-allow-origin in node server

Users often receive the error message “iisnode encountered an error when processing the request” while accessing Node.js sites.

As a part of our Server Management Services, our Engineers help to fix similar IIS-related errors regularly.

Today, let us discuss the possible reasons and fixes for this error.

What is “iisnode encountered an error when processing the request” error

The IIS node error generally triggers while accessing a Node.js site. A typical error message includes an internal server error with the following format.

iisnode encountered an error when processing the request

This typically happens when the application pool doesn’t have enough permissions to write to the current folder.

How to fix “iisnode encountered an error when processing the request” error

One of the possible steps that our Support Engineers follow to fix this error is to give the IIS_IUSRS full permission.

This can be performed with the series of steps below:

  1. Go to your windows folder application ad right click on properties.
  2. From the Security section, click on Edit and then click on Add.
    iisnode encountered an error when processing the request
  3. Now, from the Advanced, use the Find Now and then select the IIS_IUSRS option.
  4. Then, Allow the following option: Full control
  5. Finally, Restart the application on IIS

Sometimes, users don’t prefer to give the entire IIS_IUSRS group full control. A possible solution in such cases is to get into the advanced settings menu and under Process Model. Then, from identity change the user account to a user that already has write permissions.

Another possible reason for this error could be the use of an older version of windows. Our Support Engineers have noticed a similar error on a system with windows server 2008 R2. An upgrade to a recent windows version fixed the issue here.

Conclusion

In short, this iisnode error triggers when the application pool doesn’t have enough permissions to write to the current folder. Today, we saw how our Support Engineers fix this error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

SEE SERVER ADMIN PLANS

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

  • Remove From My Forums
  • Question

  • User1030695805 posted

    I know there are a lot of tutorials around this but almost all of them are from different years so each one is a bit different from the rest. 

    What I did:

    • Installed NPM , Node JS and Express
    • Created a web app which is working as expected from cmd line.
    • Installed iisnode, URLRewrite Module as stated in the iisnode GitHub repo.
    • Included a web.config file into the root directory of the application and updated the hello.js to app.js which is my startup file.
    • Created a new website in IIS and pointed it to the root directory which has the web.config file.
    • Tried to browse it on port 80 and I got the directory view which listed the contents in the root directory. When I clicked on app.js it opened in another tab with the URL 
      http://localhost/app.js

      And the error message was

      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'.

    Any idea what I should do to fix this ? How do I get started accessing this site from IIS? Are there any other steps that I am missing out? I am currently running IIS 10 on a Windows 10 machine.

  • Remove From My Forums
  • Вопрос

  • I am getting the following error when I visit mydomain.com,
    however the site loads correctly when I visit mydomain.com/ how
    can I fix the issue?

    iisnode encountered an error when processing the request.

    HRESULT: 0x6d
    HTTP status: 500
    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’.

    app.js

    /**
     * Module dependencies.
     */
    
    var express = require('express');
    var routes = require('./routes');
    var user = require('./routes/user');
    var http = require('http');
    var path = require('path');
    var mongoose = require('mongoose');
    var emailer = require('./models/emailer.js');
    
    var app = express();
    mongoose.connect('mongodb://heroku:awesome@troup.mongohq.com:10038/app22548277');
    var db = mongoose.connection;
    
    // all environments
    app.set('port', process.env.PORT || 3000);
    app.set('views', path.join(__dirname, 'views'));
    app.set('view engine', 'jade');
    app.use(express.favicon());
    app.use(express.logger('dev'));
    app.use(express.json());
    app.use(express.urlencoded());
    app.use(express.methodOverride());
    app.use(app.router);
    app.use(express.static(path.join(__dirname, 'public')));
    
    // development only
    if ('development' == app.get('env')) {
      app.use(express.errorHandler());
    }
    
    app.get('/', routes.index);
    app.get('/locations', routes.locations);
    app.get('/locationdetail/:id', routes.locationdetail);
    app.get('/charity', routes.charity);
    app.get('/washpackages', routes.washpackages);
    app.get('/lubecenters', routes.lubecenters);
    app.get('/contact', routes.contact);

    /routes/index.js (the relevant portion, anyway)

    exports.index = function(req, res){
      Testimonial.find(function(err, results) {
        res.render('index', { title: 'Home', testimonials: results });
      });
    };

    Any ideas?

Ответы

  • hi,

    >>I am getting the following error when I visit mydomain.com,
    however the site loads correctly when I visit mydomain.com/ how
    can I fix the issue?

    From your description, you could need check your domain name setting from your domain registrar . I guess you may input additional slash in your domain name setting.

    >>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.

    If you host your website on azure website, I suggest you could enable the Site Diagnostics on azure website configure panel. You could see your log file from FTP Diagnostic Logs. 

    Also, you could see this link:

    http://azure.microsoft.com/en-us/documentation/articles/web-sites-enable-diagnostic-log/

    Regards,

    Will


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Click
    HERE to participate the survey.

    • Помечено в качестве ответа

      21 апреля 2014 г. 1:12

Recently I needed to publish a simplish node.js application on Azure. It were already running smoothly on heroku so I figured that it shouldn’t be any issue to just deploy and be done with it.

TL:DR;

Deploying on Azure is simple enough. You can use Kudo https://mysite.scm.azurewebsites.net to browse logs instead of using ftp or the azure powershell.

The if(require.main===module) pattern does not work on azure due to some IIS interceptor script. A workaround needs to be used.

Deployment

By clicking custom create we can set up the source control link right of the bat. So that is what we will do.

azure-create

Next we will need to set up the source control link. In this example I will allow azure access to my bitbucket repos.

After logging in on bitbucket/github or some other of the integrated services we get to choose the repository and branch that we want to deploy.

azure-deploy

There we go! Now whenever somebody pushes a commit to the release branch it will automatically redeploy. In bitbucket I can see that a hook is added to the repository that posts the code to my website.

Going to the page we can now see

azure-initial

No release branch yet. Woops. Easy enough to fix, just create and push and magic things should occur.

git checkout -b release
git push --set-upstream origin release

azure-deploying

There we go, a few seconds later the site is deployed. Going to the page now we will see the good stuff right?

azure-500

Wait, what? Something obviously is not working, we just need to find some form of error log to see what it could be.

Debugging the deployed code

The project were using console.log to print out some info so first things first. We need to make stdout go into some logfile. To do this we need a file called iisnode.yml in the root of the project.

As I did not feel like adding this file to the repository I went the roundabout way and enabled editing of source code. You can do this under configure on the site in the azure portal.

azure-edit

All changes will be overridden on a real deploy? Perfect! I’m not really intending to do anything other than enabling debug either way.

azure-quickglance

Edit button now exists in the dashboards quick glance list.

Opening VS-Online gives us a simple enough user interface to deal with.

azure-vs-online

Here we add the iisnode.yml file

iisnode.yml

loggingEnabled: true
devErrorsEnabled: true

The first line will save the stdout and the second line will return something useful (hopefully) when accessing the page.

Then after hitting the restart button in the portal we try checking the page again.

iisnode encountered an error when processing the request.

HRESULT: 0x2

HTTP status: 500

HTTP subStatus: 1001

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.

Ok… not that helpful. Let’s see if we can’t find the stdout file somewhere. There is a webtool called Kudo that can be used for these kinds of things. Going to https://uniquesitename.scm.azurewebsites.net allows us to access it(where uniquesitename is the name of your website). Under DebugConsole we find a simple enough interface to let us explore the logs.

kudo

Under LogFiles/Application we find a file named something unique looking with stdout smack in the middle.
In the log file there is only one line that reads ‘Using “development” environment config’
That needs to be fixed, but it should still work. More than that, I expected more stuff to be in the log. But at least I now know that some of the code is running.

Looking over the server.js file I see this little snippet at the end:

if (require.main === module) {
  start();
}

Doing a quick and ugly console.dir on require.main shows us the issue

{id: '.',
  exports: {},
  parent: null,
  filename: 'D:\Program Files (x86)\iisnode\interceptor.js',
  loaded: false,
  children: 
   [ { id: 'D:\home\site\wwwroot\server.js',
       exports: [Object],
       parent: [Circular],
       filename: 'D:\home\site\wwwroot\server.js',
       loaded: false,
       children: [Object],
       paths: [Object] } ],
  paths: 
   [ 'D:\Program Files (x86)\iisnode\node_modules',
     'D:\Program Files (x86)\node_modules',
     'D:\node_modules' ] }

The module is not at all the require.main that we expect it to be. Rather it is a child of some interceptor.js thingy. To deal with this I modified the code to look like the following

if (require.main === module || (
    require.main.filename.indexOf('interceptor.js')!==-1 && 
    (require.main.children || []).indexOf(module)!==-1)
) {
 start();
}

Yuck! But hey, it gets the job done! If you have a better solution to this problem I’m all ears.

All that is left to do is commit the change and push it to the release branch and we are back in business.

Содержание

  1. HTTP Error 500.1013 #405
  2. Comments
  3. Ошибка 500 Internal Server Error: что это и как её исправить
  4. Ошибка 500 Internal Server Error — диагностика
  5. Ошибка 500 Internal Server Error — устранение на популярных платформах
  6. Ошибка 500 Internal Server Error — устранение на стороне серверных скриптов
  7. Попросите помощи у системного администратора
  8. Ошибку 500 Internal Server Error довольно легко устранить
  9. Internal server error 1013
  10. Internal server error 1013
  11. Вопрос
  12. Ответы
  13. Internal server error 1013
  14. Answered by:
  15. Question
  16. Answers

HTTP Error 500.1013 #405

I’m running into the following error after deploying my node app to a local instance of IIS 7.5.7600.16385 on 64-bit Windows 7. The Node.js sample apps run without any problems in the same app pool. I have 32-bit applications disallowed. The application runs as expected in debug mode. The helloworld sample app says I’m running IISNode 0.2.16 x64 and Node.js version 0.10.33 x64.

HTTP Error
Web.config
app.js
Stdout

�[0mGET /app.js �[32m- �[0m- ms — -�[0m

ETW Trace log

0 2 0 0 0 0x0 8192 83951878 7601 4 130627962108539623 156001 0 0x0 4 1 8 0 1696 0x5 0x6 130626758531255993 1656484 130627960845919380 0x1 0 iisnode C:UsersJohnAppDataLocalTempiisnode.etl Header

0 0 4 0 0 0x0 iisnode initialized the application manager

0 0 4 0 0 0x0 iisnode received a new http request

0 0 4 0 0 0x0 iisnode initialized a new node.exe process

0 0 4 0 0 0x0 iisnode initialized a new node.js application

0 0 5 0 0 0x0 <4bc12acb-77fa-4382-84c7-743800cbc57e>: iisnode increases pending async operation count

0 0 4 0 0 0x0 <4bc12acb-77fa-4382-84c7-743800cbc57e>: iisnode scheduled a retry of a named pipe connection to the node.exe process

0 0 4 0 0 0x0 <4bc12acb-77fa-4382-84c7-743800cbc57e>: iisnode dispatched new http request

0 0 5 0 0 0x0 <4bc12acb-77fa-4382-84c7-743800cbc57e>: iisnode decreases pending async operation count

0 0 5 0 0 0x0 <4bc12acb-77fa-4382-84c7-743800cbc57e>: iisnode leaves CNodeHttpModule::OnExecuteRequestHandler with RQ_NOTIFICATION_PENDING

0 0 4 0 0 0x0 <4bc12acb-77fa-4382-84c7-743800cbc57e>: iisnode scheduled a retry of a named pipe connection to the node.exe process

0 0 5 0 0 0x0 <4bc12acb-77fa-4382-84c7-743800cbc57e>: iisnode created named pipe connection to the node.exe process

0 0 5 0 0 0x0 <4bc12acb-77fa-4382-84c7-743800cbc57e>: iisnode initiated sending http request headers to the node.exe process and completed synchronously

0 0 5 0 0 0x0 <4bc12acb-77fa-4382-84c7-743800cbc57e>: iisnode finished sending http request headers to the node.exe process

0 0 5 0 0 0x0 <4bc12acb-77fa-4382-84c7-743800cbc57e>: iisnode initiated reading http request body chunk and completed synchronously

0 0 5 0 0 0x0 <4bc12acb-77fa-4382-84c7-743800cbc57e>: iisnode detected the end of the http request body

0 0 5 0 0 0x0 <4bc12acb-77fa-4382-84c7-743800cbc57e>: iisnode starting to read http response

0 0 5 0 0 0x0 <4bc12acb-77fa-4382-84c7-743800cbc57e>: iisnode initiated reading http response chunk and will complete asynchronously

0 0 5 0 0 0x0 <4bc12acb-77fa-4382-84c7-743800cbc57e>: iisnode starting to process http response status line

0 0 2 0 0 0x0 <4bc12acb-77fa-4382-84c7-743800cbc57e>: iisnode failed to process http response status line

0 0 5 0 0 0x0 <4bc12acb-77fa-4382-84c7-743800cbc57e>: iisnode request processing failed for reasons unrecognized by iisnode

0 0 5 0 0 0x0 <4bc12acb-77fa-4382-84c7-743800cbc57e>: iisnode decreases pending async operation count

0 0 5 0 0 0x0 <4bc12acb-77fa-4382-84c7-743800cbc57e>: iisnode posts completion from SendEmtpyResponse

0 0 5 0 0 0x0 <4bc12acb-77fa-4382-84c7-743800cbc57e>: iisnode increases pending async operation count

0 0 5 0 0 0x0 <4bc12acb-77fa-4382-84c7-743800cbc57e>: iisnode enters CNodeHttpModule::OnAsyncCompletion callback

0 0 5 0 0 0x0 <4bc12acb-77fa-4382-84c7-743800cbc57e>: iisnode decreases pending async operation count

0 0 5 0 0 0x0 <4bc12acb-77fa-4382-84c7-743800cbc57e>: iisnode leaves CNodeHttpModule::OnAsyncCompletion with RQ_NOTIFICATION_FINISH_REQUEST «>

The text was updated successfully, but these errors were encountered:

Hi John, any solution so far?

I am having the same messages. I used to fetch WordPress data prior to this yet unobserved bug

Here the error message

iisnode encountered an error when processing the request.

HRESULT: 0x6d
HTTP status: 500
HTTP subStatus: 1013
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’.

I solved this custom development issue by setting up the Azure SDK on my local pc, then using the ‘command azure site log download’ to fetch the error logs and continue with these’s content’s information.

Источник

Ошибка 500 Internal Server Error: что это и как её исправить

Разработчики и люди, профессионально работающие с веб-приложениями, боятся 500 Internal Server Error . Оптимальный способ её устранения зависит от сервера и того, что на нём запущено. В данной статье приводятся советы по диагностике и исправлению ошибки 500 .

Ошибка 500 Internal Server Error — диагностика

Важно помнить, что эта ошибка происходит на стороне сервера. Это значит, что HTML-код , выполняемый на стороне клиента, а также JavaScript или любые другие запущенные в браузере объекты, не могут быть причиной, по которой возникает ошибка 500 Internal Server Error . Само название ( Internal Server Error – ‘внутренняя ошибка сервера’ ) говорит о том, что ошибка происходит на сервере.

Ошибка 500 Internal Server Error — устранение на популярных платформах

Многие пользователи устанавливают на свой сервер популярные CMS-системы , такие как WordPress , Joomla , Drupal и они не должны вызывать ошибку 500 , если всё настроено правильно. Однако она всё равно всплывает – из-за несовместимости версий, некачественных установок или сбоя прав доступа на сервере.

Вот некоторые распространённые проблемы, которые могут вызывать подобную ошибку в часто используемых CMS :

  • Если вы только что обновили движок до новой версии, вероятно, обновление прошло с ошибками и необходимо провести его повторно. Скорее всего, на сайте разработчика есть инструкции, как это правильно сделать.
  • Если вы только что активировали новый плагин или новую тему, стоит попробовать отменить эти изменения. Даже профессионально написанные плагины могут конфликтовать с другими и вызывать 500 Internal Server Error nginx
  • Если вы обновляли CMS , старые плагины и темы могут быть с ней несовместимы. Единственное, что можно сделать в таком случае — отключать их по очереди, пока ошибка 500 не исчезнет.
  • Неправильно заданные права доступа на сервере или ошибки в файле .htaccess . Серверу не удаётся получить доступ к скриптам, файлам и другим ресурсам, поэтому он выдаёт ошибку.

Когда причиной, по которой возникает ошибка 500 Internal Server Error являются скрипты и плагины, лучше всего искать ответы на сайтах их разработчиков.

Ошибка 500 Internal Server Error — устранение на стороне серверных скриптов

Другой причиной по которой может возникнуть ошибка 500 Internal Server Error может стать разработка и тестирование собственных скриптов.

Чтобы справиться с такой ошибкой, попробуйте следующие решения :

  • Настройка прав на сервере : часто неверная настройка прав доступа к файлу или папке приводит к тому, что сервером выдаётся ошибка 500 Internal Server Error . Из-за того, что ему не удаётся запустить скрипт. Выясните, какие права должны быть настроены, и выставьте их соответствующим образом.
  • Превышено время ожидания : возможно, истекло время ожидания ответа от PHP или другого серверного скрипта. Это происходит из-за того, что недоступен определённый ресурс или коде была допущена ошибка, запускающая бесконечный цикл.
  • Превышено время ожидания соединения с сервером: если сервер был занят, перезагружался или потерял соединение, скрипт может выдать ошибку 500 Internal Server Error . Возможно, в следующий раз ошибки не будет. Но если ошибка появляется при тестировании, велика вероятность того, что она встретится и пользователям.
  • Ошибки в файле .htaccess: в некоторых случаях ошибку 500 может вызывать код, прописанный в файле .htaccess .
  • Ошибки в скрипте: если ошибку выдаёт скрипт, можете запросить у него подробную информацию об ошибке. К примеру, в PHP можно включить вывод ошибок на экран или в лог-файл, добавив директиву display_errors . По умолчанию среда выполнения может скрывать ошибки, но это не очень удобно для отладки программы.

Попросите помощи у системного администратора

В некоторых случаях у разработчиков нет полного контроля над сервером.

Если скрипт запускается на сервере сторонней организации, она может помочь вам в следующем :

  • Предоставить документацию о своём сервере и возможных причинах ошибки 500 . В зависимости от используемой операционной системы и настройки оборудования, данная ошибка может возникать по разным причинам.
  • Попросите службу поддержки хостинга посмотреть лог-файлы с ошибками — системный администратор сможет определить, был ли сервер во время возникновения ошибки загружен или вовсе « упал ».

Ошибку 500 Internal Server Error довольно легко устранить

Ошибка 500 Internal Server Error — как исправить ? В большинстве случаев причины возникновения ошибки 500 легко исправляются. Проблема заключается в том, что без конкретной информации определение причины возникновения сбоя усложняется. Легче всего справиться с ошибкой, когда разработчик выяснит, что изменилось перед возникновением ошибки.

Не забывайте, что произошедшие изменения могли быть осуществлены и другими людьми — например, администратором сервера. Если же ничего не менялось, вероятно, сам сервер стал причиной возникновения ошибки из-за несовместимости программного обеспечения или проблем с производительностью.

Вадим Дворников автор-переводчик статьи « 500 Internal Server Error: What It Is And How To Fix It »

Источник

Internal server error 1013

Looks like the game servers just had a hard crash. We’ll have to wait till they can get everything rebooted.

Also, if you’re looking for a House to Join in the Urgvinja Region (South West) Search for Faded Dominion on ID 48438 🙂

Quick update: Warlords, our EU West server is down for unscheduled maintenance at this time there is no ETA as to when it will be opened up, we’ll update as soon as we have more information.

Quick update: Warlords, our EU West server is down for unscheduled maintenance at this time there is no ETA as to when it will be opened up, we’ll update as soon as we have more information.

Quick update: Warlords, our EU West server is down for unscheduled maintenance at this time there is no ETA as to when it will be opened up, we’ll update as soon as we have more information.

Thank you very much for the update and the speed at which you guys respond to these type of issues. Make sure you guys don’t overwork yourselves :staxelCow:

Источник

Internal server error 1013

Вопрос

I am getting the following autodiscover error

Id : 1013
Type : Error
Message : When contacting https://**internal server FQDN**/autodiscover/autodiscover.xml received the error The remote server returned an error: (404) Not Found.

I attempt to navigate to the file with a browser and I get a 404 error as well. I checked the permissions on the file and they were only set for authenticated users (which is what I expect to access it anyway, but I added everyone read as well.)

Does anyone have any idea how to fix this issue?

Ответы

Please recreate the /AutoDiscover virtual directory, and then check the issue again

Remove-AutodiscoverVirtualDirectory «cas-servernameAutodiscover (default web site)»

New-AutodiscoverVirtualDirectory -WebsiteName «Default Web Site» -WindowsAuthentication $true -BasicAuthentication $true

Restart IISAdmin service

Please run ExBPA against the exchange server for health check

Notes : For the exchange related question on the SBS server, please use the “ Small Business Server ” forum which would be the best place for it

Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

Источник

Internal server error 1013

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

I am getting the following autodiscover error

Id : 1013
Type : Error
Message : When contacting https://**internal server FQDN**/autodiscover/autodiscover.xml received the error The remote server returned an error: (404) Not Found.

I attempt to navigate to the file with a browser and I get a 404 error as well. I checked the permissions on the file and they were only set for authenticated users (which is what I expect to access it anyway, but I added everyone read as well.)

Does anyone have any idea how to fix this issue?

Answers

Please recreate the /AutoDiscover virtual directory, and then check the issue again

Remove-AutodiscoverVirtualDirectory «cas-servernameAutodiscover (default web site)»

New-AutodiscoverVirtualDirectory -WebsiteName «Default Web Site» -WindowsAuthentication $true -BasicAuthentication $true

Restart IISAdmin service

Please run ExBPA against the exchange server for health check

Notes : For the exchange related question on the SBS server, please use the “ Small Business Server ” forum which would be the best place for it

Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

Источник

Понравилась статья? Поделить с друзьями:
  • Img tool error 131
  • Iis при выполнении этой операции произошла ошибка web config
  • Img error html
  • Iis ошибка 5002
  • Img attributes style как изменить