简体   繁体   English

使用部署在CentOS服务器上的Latchet框架时,无法从webapp的JS建立websocket连接

[英]Unable to make websocket connection from webapp's JS when using Latchet framework deployed on CentOS server

We are developing a webapp on Laravel framework to be deployed on CentOS linux server. 我们正在开发基于Laravel框架的webapp,并将其部署在CentOS linux服务器上。 For updates pushable from server to the browser, we are using Latchet . 对于可从服务器推送到浏览器的更新,我们使用Latchet We did the development on the Windows machine, and on there our webapp side (HTML/JS on browser) is able to make connections to the websocket server (Latchet), and hence successfully getting the server push notifications. 我们是在Windows机器上进行开发的,在那里,我们的webapp端(浏览器上的HTML / JS)能够建立到websocket服务器(闩锁)的连接,从而成功获取服务器推送通知。 The problem is that, when we do the actual deployment on our staging server on CentOS, the webapp side is not being able to make the websocket connection with the Latchet server. 问题是,当我们在CentOS上的登台服务器上进行实际部署时,webapp端无法与Latchet服务器建立websocket连接。

We have checked all the dependencies, firewall, and network settings. 我们已经检查了所有依赖项,防火墙和网络设置。 We also telnet to the exposed websocket IP and port, and it connects with no issue. 我们也通过telnet到公开的websocket IP和端口,并且连接没有问题。 My suspicion is in the some configuration we are missing rite now. 我怀疑是在某些配置中,我们现在缺少rite。

it turn out the issue was only due to port blocking by the local firewall. 事实证明,问题仅是由于本地防火墙阻止了端口。 Thus as soon as I stopped the iptables and ip6tables services, my issue immediately resolved. 因此,一旦我停止了iptables和ip6tables服务,我的问题就立即得到解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Laravel 5.6框架并且无法使用odbc_connect()连接到mssql服务器 - Laravel 5.6 framework and unable to make connection to mssql server using odbc_connect() Ratchet Websocket Apache2 SSL 无法连接到 PHP websocket - Ratchet Websocket Apache2 SSL unable to make connection to PHP websocket 与webs.js服务器的PHP websocket连接 - PHP websocket connection to node.js server 无法在Centos 6中从PHP连接到mssql服务器 - Unable to connect to mssql server from PHP in Centos 6 无法将文件从PHP上传到Centos服务器? - Unable to upload file from PHP to Centos server? PHP- Zend Framework-在CentOS服务器上从另一个动作的角度调用动作 - PHP- Zend Framework- Call action from another action's view on CentOS Server 使用 Amp\\Websocket 从开放流连接获取 websocket ping? - Get websocket pings from an open stream connection using Amp\Websocket? Websocket服务器连接 - Websocket server connection 致命错误:在服务器中部署但不在本地部署时,在Zend Framework 2中找不到类 - Fatal error: Class not found in Zend Framework 2 when deployed in server but not locally 连接到 websocket 服务器:从 javascript 正常,从 php 不正常 - Connection to websocket server : OK from javascript, not OK from php
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM