Closed Corinthian72 closed 3 years ago
I have the same issue.
I have the same issue.
Somehow It works if i'm not trying to "websockets:serve" manualy, but starting websockets in supervisord.conf
[program:websockets]
command=/usr/bin/php /var/www/html/artisan websockets:serve
numprocs=1
autostart=true
autorestart=true
user=sail
config/broadcasting.php
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'useTLS' => false,
'encrypted' => false,
'host' => '127.0.0.1',
'port' => 6001,
'scheme' => 'http'
],
],
config/websockets.php
'apps' => [
[
'id' => env('PUSHER_APP_ID'),
'name' => env('APP_NAME'),
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'capacity' => null,
'enable_client_messages' => false,
'enable_statistics' => true,
],
],
It's actually not stuck, it's just waiting for a new connection. I tot I was stuck at the beginning due to the message.
In my local environment I'm using Laravel Sail and Docker Desktop.
Installed laravel-websockets in accordance with official docs
Also found issue #693 and forwarded the websockets port in my docker-compose.yml
My configs
config/websockets.php
config/broadcasting.php
.env
When using "sail artisan websockets:serve" I always get stuck on "Starting the WebSocket server on port 6001"
When I use "php artisan websockets:serve" there are 2 outcomes
Without port forwarding in docker-compose.yml - stuck on "Starting the WebSocket server on port 6001"
With port forwarding in docker-compose.yml
RuntimeException Failed to listen on "tcp://0.0.0.0:6001": Address already in use at vendor/react/socket/src/TcpServer.php:172