Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

4msar's avatar
Level 2

Laravel 10 Pusher and soketi failed to broadcast event

Hello everyone, I have been working with a project where I need the socket connection for realtime connection. I am using soketi for the socket provider with pusher.

My socket connection is working fine, but in my laravel application when I sent a message and it's trigger a broadcast event by broadcast(new MessageSent($message)) then it's failing. here is the error from Horizon.

Illuminate\Broadcasting\BroadcastException: Pusher error: cURL error 6: Could not resolve host: app.myapp.com (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://app.myapp.com:6001/apps/my-ws/events?auth_key=my-websocket&auth_timestamp=1692289479&auth_version=1.0&body_md5=561d4438f98606b843b8ac36060e4a3a&auth_signature=22adda43c4c31c85a56de51fa0107ca6be7c0a17ee5b0ae4790fa862821c6856. in /var/www/laravel-app/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php:164

Composer.json

"php": "^8.0",
"barryvdh/laravel-dompdf": "^2.0",
"carlos-meneses/laravel-mpdf": "^2.1",
"guzzlehttp/guzzle": "^7.0",
"laravel/framework": "^10.0",
"laravel/horizon": "^5.19",
"laravel/socialite": "^5.4",
"laravel/tinker": "^2.0",
"laravel/ui": "^4.2",
"predis/predis": "^2.0",
"pusher/pusher-php-server": "^7.2"
"twilio/sdk": "^7.0",
"tymon/jwt-auth": "^2.0"

Server info

  • Digital Ocean / Ubuntu 22.04
  • PHP8.1
  • Nginx

Soketi is installed in this machine by there doc and run by pm2 - process manager.

0 likes
1 reply
4msar's avatar
Level 2

Problem solved, I was running jitsi-meet and the soketi and the laravel in a same droplet. after move the jitsi-meet to another droplet, it was fixed

Please or to participate in this conversation.