具有SSL的Azure辅助角色上的Node.js导致ERR_SSL_PROTOCOL_ERROR

时间:2012-09-28 18:38:22

标签: javascript node.js ssl azure

我有一个WorkerRole,它配置为通过csdef中的Runtime / EntryPoint / ProgramEntryPoint元素启动node.exe,并在端口443上为https配置HttpsIn EndPoint w /有效证书。我还在运行时/环境中设置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命中节点。

我错过了什么?谢谢!

1 个答案:

答案 0 :(得分:1)

问题是我在Node中启动Web服务器时使用的是http模块而不是https模块。使用ssl证书启动https服务器后即可使用。

我在WebRole中遵循SSL w / Node指南,这需要与WorkerRole中的SSL w / Node进行不同的设置。

相关问题