amazon-web-services - AWS EC2 中的 JSF Websocket 在 localhost 但不在 EC2 (AWS) 上工作
问题描述
我正在使用 <f:websocket> 来更新聊天页面。
该应用程序在 Wildfly 20 中运行,并且在 localhost 中运行良好,但 websocket 在 EC2 AWS 实例上出现以下错误。
jsf.js.xhtml?ln=javax.faces:1 WebSocket connection to 'wss://app.mydomain.com/javax.faces.push/incomingPush?8c34119c-cd10-41ca-bc13-65494ce18d4f' failed: Error during WebSocket handshake: Unexpected response code: 404
我还在wildfly日志中发现了这个错误,我认为它有事情要做(因为在localhost中我没有收到这个错误):
2020-12-17 18:40:44,641 ERROR [org.jboss.weld.Bean] (default task-9) WELD-000019: Error destroying an instance com.sun.faces.push.WebsocketChannelManager$ViewScope@6d608a43 of Managed Bean [class com.sun.faces.push.WebsocketChannelManager$ViewScope] with qualifiers [@Any @Default]
我已经被这个问题困扰了一个星期了。任何帮助将不胜感激。
谢谢!
解决方案
推荐阅读
- javascript - 为什么在检查时跳过了函数并且未定义 onclick,尽管在脚本中定义了?
- css - 如何在 MUI Grid 中有不同的水平和垂直间距?
- python - 分页不适用于我的 Django 休息框架项目,我正在使用通用视图
- javascript - 尽管 URL 正确,Angular 路由器仍无法加载我的组件
- c# - .Net Core 控制台应用程序发布未在发布文件夹中创建任何文件
- marklogic - 为什么 MarkLogic 肯定会在 XML 文档中存储无效字符?
- hyperledger-fabric - 如何解决./byfn.sh -m 生成问题?
- docker - 复制或添加命令未在 docker hub 上执行
- postgresql - docker-compose 中的 Postgres 找不到/挂载 /etc/postgresql/postgres.conf
- python - png 文件无法在具有非 PlateCarree 投影的地图上正确显示