Closed periseas closed 4 years ago
Please show your debug logs of websockets:serve
I'm getting the same error. Been stuck on this for weeks with Forge + nginx + AWS. Would love to see a new tutorial making this work
any news on this? I have the same problem
Please show your debug logs of websockets:serve
verify that if you have the port open or you can enable it with, sudo iptables -A INPUT -p tcp -i eth0 --dport 6001 -j ACCEPT
I too am seeing this same error message. I am using Laravel Forge with a Digital Ocean instance. Latest Laravel 6 and PHP 7.4. I have opened up port 6001 on the server.
There are no debug logs of websocket:serve. It says:
Starting the WebSocket server on port 6001...
but nothing else.
I downgraded to PHP 7.3 to try as well as 7.4 required the latest pusher/pusher-php-server v4. After downgrading to 7.3, I updated to latest pusher/pusher-php-server v3. That did not help either.
Ok, I think I solved the problem for myself and that this helps others. I am using Laravel Forge to provision the servers. I also use SSL option and Let's Encrypt. This automatically forces all traffic to use SSL. So when you are trying to connect to websockets, it's trying to connect over wss which is the secure url for websockets.
I didn't have websockets configured for SSL so it was denying the connection. Once I configured SSL for websockets, I was finally able to connect the dashboard successfully. For Forge, I just used the path's that it created for the Let's Encrypt certs and added them to the websockets configuration.
For future reference, there might be a problem with the client: https://github.com/beyondcode/laravel-websockets/issues/510
Hi ! Sorry for re-opening old subjects, I also found a solution after reading r0bdiabl0's answer.
If after configuring the ssl for your websockets and it stills not working try adding
'verify_peer' => false,
to your config/websockets.php file in the ssl configuration.
Worked for me
I get the error: failed: WebSocket is closed before the connection is established.
I already checked many answers but I can't find the solution, I leave the codes.
websockets.php
broadcasting.php
Bootstrap.js