BlazeDS 通过 SSL 数据推送

发布于 2024-08-13 09:15:43 字数 408 浏览 6 评论 0原文

我有一个应用程序,使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

我很OK 2024-08-20 09:15:43

要问自己的问题(并在此处发布)

  • 请求是否显示在您的访问日志中?
  • Tomcat/其他东西是否通过 HTTPS 提供普通 HTML 页面的服务器?
  • 响应标头是什么样的?清除缓存会改变什么吗?
  • 您使用什么浏览器?
  • 您可以设置明确的缓存标头吗?

尝试以下其中一项:

 Cache-Control: no-store
 Cache-Control: no-store, must-revalidate
 Cache-Control: no-store,max-age=0,must-revalidate
 Cache-Control: max-age=0,must-revalidate
 Cache-Control: must-revalidate

Questions to ask yourself (and post here)

  • Is the request showing up in your access logs?
  • Does Tomcat/whatever server up normal HTML pages via HTTPS?
  • What do the response headers look like? Does clearing your cache change anything?
  • What browser are you using?
  • Can you set explicate caching headers?

Try one of these:

 Cache-Control: no-store
 Cache-Control: no-store, must-revalidate
 Cache-Control: no-store,max-age=0,must-revalidate
 Cache-Control: max-age=0,must-revalidate
 Cache-Control: must-revalidate
朮生 2024-08-20 09:15:43

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 your services-config.xml to SecureAMFEndpoint.

Broadly speaking, https with BlazeDS (either push, or RPC) works just fine, assuming you configure it properly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文