【问题标题】:Can't debug using Azure SDK for Node.js无法使用适用于 Node.js 的 Azure SDK 进行调试
【发布时间】:2013-03-15 18:13:42
【问题描述】:

多年来我一直对 Azure SDK 感到非常沮丧,我一直在使用它,但仍然会出现将错误输出到日志文件的问题:

Application has thrown an uncaught exception and is terminated:
Error: ENOENT, no such file or directory 'C:\DWASFiles\Sites\pazooza\VirtualDirectory0\site\wwwroot\iisnode\RD00155D4313F9-20848-stdout-Tue Mar 26 2013 03:10:56 GMT+0000 (GMT Standard Time).txt'
    at Object.openSync (fs.js:240:18)
    at Object.writeFileSync (fs.js:628:15)
    at SyncWriteStream.<anonymous> (D:\Program Files (x86)\iisnode\interceptor.js:181:20)
    at Object.<anonymous> (console.js:25:18)
    at IncomingMessage.<anonymous> (C:\DWASFiles\Sites\pazooza\VirtualDirectory0\site\wwwroot\utils\facebook.js:69:21)
    at IncomingMessage.emit (events.js:88:20)
    at HTTPParser.parserOnMessageComplete [as onMessageComplete] (http.js:130:23)
    at CleartextStream.socketOnData [as ondata] (http.js:1288:20)
    at CleartextStream._push (tls.js:375:27)
    at SecurePair.cycle (tls.js:734:20)

如您所见,发生错误是因为 fs 对象试图查找 c: 驱动器上的某些内容,指向我的本地计算机的 c: 驱动器是什么与假设位于的日志系统有关Azure 网站?

和 D:\Program Files (x86)\iisnode\interceptor.js

它不应该指向 Azure 云网站实例中的资源吗?

Azure SDK 中的任何人都可以告诉我如何消除此错误。

几个月前我问过这个问题,我们认为我们现在已经修复了它,它又回来了......非常令人沮丧的微软......你们是为了让我们的生活更轻松吗?

我在这里的其他问题导致了这个问题:

Webmatrix 2 brokenWindows Azure Node.js Internal Server Error

我的 node.js web.config 文件如下所示:

<configuration>
     <system.webServer>
          <handlers>
               <!-- indicates that the server.js file is a node.js application to be handled by the iisnode module -->
               <add name="iisnode" path="server.js" verb="*" modules="iisnode"/>
          </handlers>
          <rewrite>
               <rules>
                    <!-- Don't interfere with requests for node-inspector debugging -->
                    <rule name="NodeInspector" patternSyntax="ECMAScript" stopProcessing="true">                    
                        <match url="^server.js\/debug[\/]?" />
                    </rule>

                    <!-- First we consider whether the incoming URL matches a physical file in the /public folder -->
                    <rule name="StaticContent">
                         <action type="Rewrite" url="public{{REQUEST_URI}}"/>
                    </rule>

                    <!-- All other URLs are mapped to the Node.js application entry point -->
                    <rule name="DynamicContent">
                         <conditions>
                              <add input="{{REQUEST_FILENAME}}" matchType="IsFile" negate="True"/>
                         </conditions>
                         <action type="Rewrite" url="server.js"/>
                    </rule>

               </rules>
          </rewrite>
          <!-- You can control how Node is hosted within IIS using the following options  -->
          <iisnode
            loggingEnabled="true"
            devErrorsEnabled="true"
         />
     </system.webServer>
</configuration>

任何关于为什么在我设置 logginEnabled="true" 时出现此错误的帮助或建议将不胜感激。

当我将 loggingEnabled 设置为 false 时,没有错误并且网站运行正常,但是当它打开时,一切都变得糟糕了!

【问题讨论】:

    标签: node.js azure sdk


    【解决方案1】:

    您可以在https://github.com/windowsazure/iisnode 下提交问题吗?

    听起来这是 IISNode 日志记录的问题?我们或许可以帮助您提供有关该问题的更多详细信息。

    安德烈

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-02-15
      • 1970-01-01
      • 1970-01-01
      • 2017-04-25
      • 1970-01-01
      • 1970-01-01
      • 2020-02-13
      相关资源
      最近更新 更多