【问题标题】:Node.js on Azure Worker Role w/ SSL results in ERR_SSL_PROTOCOL_ERROR带有 SSL 的 Azure Worker Role 上的 Node.js 导致 ERR_SSL_PROTOCOL_ERROR
【发布时间】:2012-09-28 18:38:22
【问题描述】:

我有一个 WorkerRole 配置为通过 csdef 中的 Runtime/EntryPoint/ProgramEntryPoint 元素启动 node.exe,并在端口 443 上为 https 配置了一个 HttpsIn EndPoint 并带有有效证书。我还在 Runtime/Environment 中设置了 PORT 环境变量,节点使用它来监听传入的请求。

当我启动服务(在本地开发结构或 Azure 中)并尝试访问该服务时,我收到以下错误:

SSL connection error
Unable to make a secure connection to the server. This may be a problem with the server, or it may be requiring a client authentication certificate that you don't have.
Error 107 (net::ERR_SSL_PROTOCOL_ERROR): SSL protocol error.

我已经验证了node.exe确实在服务启动时启动了,如果我在Compute Emulator中查找本地端口,通常是这样的:

http://localhost:444

我能够使用我的浏览器直接成功地点击节点。未配置 SSL 时,我也可以通过 Azure 访问节点。

我错过了什么?谢谢!

【问题讨论】:

    标签: javascript node.js ssl azure


    【解决方案1】:

    问题是我在 Node.js 中启动 Web 服务器时使用的是 http 模块而不是 https 模块。一旦我使用 ssl 证书启动 https 服务器就可以工作。

    我正在遵循 WebRole 中带节点的 SSL 指南,它需要与 WorkerRole 中带节点的 SSL 不同的设置。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-09-06
      • 2015-03-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-01
      相关资源
      最近更新 更多