BlazeDS 通过 SSL 数据推送
我有一个应用程序,使用 blazeDS 的数据推送技术将数据发送到 Flex Client 事件 5 秒。当我通过 HTTP(带或不带代理)运行该应用程序时,该应用程序运行良好。当我通过 https 运行它时,数据推送不再起作用。我收到以下错误
rootCause [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2
text="Error #2032: Stream Error.
URL: https://localhost/admin/messagebroker/streamingamfsecure?command=open&version=1
有人成功通过 SSL 进行流式传输吗?
谢谢, 普拉蒂玛
I have an application that uses the data push technology of blazeDS to send data to a Flex Client event 5 seconds. The application works fine when I run it via HTTP with or without a proxy. When I run it via https the data push doesn't work anymore. I get the following error
rootCause [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2
text="Error #2032: Stream Error.
URL: https://localhost/admin/messagebroker/streamingamfsecure?command=open&version=1
Has anyone successfully got streaming to work over SSL?
Thanks,
Pratima
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
要问自己的问题(并在此处发布)
尝试以下其中一项:
Questions to ask yourself (and post here)
Try one of these:
2032
是框架中的一个模糊错误。但是,需要检查的事情(除了 Stu 的列表)
您可以直接在浏览器中点击 https:// 页面吗?
我注意到您的示例中没有指定 SSL 的端口号。除非您不厌其烦地设置了一些 Apache SSL 重定向,否则这很可能是一个错误。
如果将 URL 粘贴到浏览器中,您应该能够点击它,并得到一个空响应。 那么您就会遇到问题(通常与 BlazeDS 无关)。
您的证书有效吗?
如果您使用的是自签名证书(这在开发中很常见), ,您的浏览器是否定义了安全例外?不同的浏览器会以不同的方式阻止尝试访问无效证书,但是没有自重的浏览器会允许此调用通过,直到设置异常。
您的通道定义正确吗?
从 http:// 切换到 https:// 时,您需要将 Flex 客户端上的 Channel 类更新为
SecureAMFChannel
和端点类将services-config.xml
中的内容添加到SecureAMFEndpoint
。一般来说,如果您配置正确,则 https 与 BlazeDS(无论是推送还是 RPC)都可以正常工作。
2032
is a bit of a vague error from the framework.However, things to check (in addition to Stu's list)
Can you hit the https:// page in a browser directly?
I notice in your example that you haven't specified the port number for SSL. Unless you've gone to the trouble of setting up some Apache SSL redirects, chances are this is a mistake.
If you paste the URL into a browser, you should be able to hit it, and get an empty response. Anything else, and you've got a problem (often one that doesn't relate to BlazeDS.)
Is your certificate valid?
If you're using a Self signed cert (as is common in development), does your browser have a security exception defined? Various browsers will block attempts to hit invalid certs in different ways, but no self-resepcting browser would allow this call through until an exception has been set up.
Is your channel defined correctly?
When switching from http:// to https://, you need to update your Channel class on the flex client to
SecureAMFChannel
and the endpoint class in yourservices-config.xml
toSecureAMFEndpoint
.Broadly speaking, https with BlazeDS (either push, or RPC) works just fine, assuming you configure it properly.