无法启动 laravel-websockets 管理页面 [英] Can't start the laravel-websockets admin page
问题描述
我已经在 centos 服务器上启动并运行了演示 laravel websockets 应用程序,并遵循了此处的基本安装说明:
一旦我这样做了,我就可以看到:
<块引用>在端口 6001 上启动 WebSocket 服务器...为应用密钥 someKey 打开了新连接.连接 id 531095113.417906678 发送消息 {"event":"pusher:connection_established","data":"{\"socket_id\":\"531095113.417906678\",\"activity_timeout\":30}"}someKey:连接 id 531095113.417906678 收到消息:{"event":"pusher:subscribe","data":{"auth":"someKey:6ed67f163e2eee2460fb0fbc8ce33f7b6a8e4080a1051bdasha"private-socket165d"private-socket1b9d"subscribe-a5051bddasha-bdashabdashab2ds9","data":{"auth"
并且 laravel websockets 仪表板可以连接.
如此简单(当你知道的时候!)
I have the demo laravel websockets app up and running on a centos server, having followed the basic installation instructions here: https://github.com/beyondcode/laravel-websockets-demo
I've also got it set up and running in Nginx (so am not running php artisan serve)
However, I can't get the php artisan websockets:serve
command to work. on the cli it says:
"Starting the WebSocket server on port 6001..."
And I can get into mydomain/laravel-websockets
and see the admin console, but it can't connect - instead I get a
"Channels current state is unavailable" error.
If I do the exact same steps on my local machine, without going through Nginx, the websocket connecting works fine.
I can't find any reference to the laravel-websockets package error logging or where I might find it.. there are no errors being logged in app/storage/logs
.
Does anyone have any ideas?
It turned out to be that I needed to open port 6001 in the EC2 console.
Once I did this I could see:
Starting the WebSocket server on port 6001... New connection opened for app key someKey. Connection id 531095113.417906678 sending message {"event":"pusher:connection_established","data":"{\"socket_id\":\"531095113.417906678\",\"activity_timeout\":30}"} someKey: connection id 531095113.417906678 received message: {"event":"pusher:subscribe","data":{"auth":"someKey:6ed67f163e2eee2460fb0fbc8ce33f7b6a8e4080a535d4a101bbe9b15a1b29d6","channel":"private-websockets-dashboard-subscribed"}}.
And the laravel websockets dashboard could connect.
So Simple (when you know!)
这篇关于无法启动 laravel-websockets 管理页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!