Quarkus Websocket在Azure WebApp上无法正常工作

发布于 2025-02-06 09:37:46 字数 1683 浏览 2 评论 0原文

问题

Websocket在客户端(浏览器)收到消息后关闭。

我发送的第三消息上的实际行为

,我可以在控制台上看到Websocket已关闭或关闭状态的错误消息。

如何复制?

  1. git克隆 https://github.com/quarkusio/quarkusio/quarkusio/quarkus-quarkus-quickstarts.gits.gits.gits.gits.gits.git WebSockets-QuickStart
  2. 编辑index.html在第81行,从“ ws”到'wss'
  3. 添加application.properties src/main/resources
  4. 添加'quarkus.http.port = 80'到application.properties
  5. 添加'quarkus.packus.package.type = = package.type = = jar'to Application.properties
  6. mvn com.microsoft.azure配置Azure web插件
  7. Uber -
  8. 通过执行: 到部署的应用程序

部署应用程序

其他信息,

我设法将其部署到Azure WebApp,并具有与SockJS上面实现相同的配置。 https://techcommunity.microsoft.com/t5/apps-on-azure-blog/ususe-websocket-with-java-java-in-azure-app-service/ba-pba-p/ba-p/3158851 这在起作用。部署版本: https://spring-messaging-messaging-messaging-messaging-messaging-messaging-messaging-messaging-stomp-websocket一下A>

我想念什么? -.--

Issue

Websocket is closed once it receive a message at the client side (browser).

Actual behavior

On the 3rd message I send, I can see the error message at the console that WebSocket is already in CLOSING or CLOSED state.
enter image description here

How to Reproduce?

  1. git clone https://github.com/quarkusio/quarkus-quickstarts.git
  2. cd websockets-quickstart
  3. edit index.html at line 81 from 'ws' to 'wss'
  4. add application.properties under src/main/resources
  5. add 'quarkus.http.port=80' to application.properties
  6. add 'quarkus.package.type=uber-jar' to application.properties
  7. configure azure webapp plugin by executing: mvn com.microsoft.azure:azure-webapp-maven-plugin:2.3.0:config
  8. choose (linux, java 11)
  9. mvn package azure-webapp:deploy
  10. navigate to the deployed app

Deployed App

https://quarkus-websockets-quickstart.azurewebsites.net/

Additional Info

I managed to deploy to Azure Webapp with the same configuration as above a spring implementation with sockjs. https://techcommunity.microsoft.com/t5/apps-on-azure-blog/using-websocket-with-java-in-azure-app-service/ba-p/3158851
This is working. Deployed version: https://spring-messaging-stomp-websocket.azurewebsites.net/

What am I missing? -.-

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文