Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pusher error: cURL error 28: SSL connection timeout on send BroadcastMessage #86

Closed
lsdevelop opened this issue Mar 14, 2024 · 1 comment
Assignees

Comments

@lsdevelop
Copy link

lsdevelop commented Mar 14, 2024

Reverb Version

1.0.0-beta2

Laravel Version

11.0

PHP Version

8.3

Description

I`m using Laravel Herd with SSL, the connection from client is working, but after update to laravel 11 and reverb (to laravel websockets) server dispatch events returns this:

Illuminate\Broadcasting\BroadcastException: Pusher error: cURL error 28: SSL connection timeout (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://chatbot.test:8080/apps/1001/events?auth_key=laravel-herd&auth_timestamp=1710421780&auth_version=1.0&body_md5=ab56f5161458b3dd0bd6c2564b449cc7&auth_signature=fd8da35337c12f08b01a15104940b53393adc23477033ec3f659dea66d1f67ad. in /Users/lucassantos/PhpstormProjects/chatbot/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php:164

My settings:

Herd: PHP Redis server, Real-Time reverb server
Laravel Horizon

composer:
"require": { "php": "^8.2.0", "aws/aws-sdk-php": "^3.256", "inertiajs/inertia-laravel": "^1.0", "laravel/framework": "^11.0", "laravel/horizon": "^5.23.1", "laravel/jetstream": "^5.0", "laravel/reverb": "@beta", "laravel/sanctum": "^4.0", "laravel/tinker": "^2.9.0", "league/flysystem-aws-s3-v3": "^3.24.0", "maatwebsite/excel": "^3.1", "opcodesio/log-viewer": "^v3.5.0", "pusher/pusher-php-server": "7.2.3", "tightenco/ziggy": "^2.0.4" }, "require-dev": { "fakerphp/faker": "^1.23.1", "lucascudo/laravel-pt-br-localization": "^v2.1.2", "mockery/mockery": "^1.6.9", "nunomaduro/collision": "^8.1", "phpunit/phpunit": "^10.5.11", "spatie/laravel-ignition": "^2.4.2" },

.env:
REVERB_APP_ID=1001 REVERB_APP_KEY=laravel-herd REVERB_APP_SECRET=secret REVERB_HOST=chatbot.test REVERB_PORT=8080 REVERB_SCHEME=https

config:
'reverb' => [ 'host' => env('REVERB_SERVER_HOST', '0.0.0.0'), 'port' => env('REVERB_SERVER_PORT', 8080), 'hostname' => env('REVERB_HOST'), 'options' => [ 'tls' => [], ], 'scaling' => [ 'enabled' => env('REVERB_SCALING_ENABLED', false), 'channel' => env('REVERB_SCALING_CHANNEL', 'reverb'), ], 'pulse_ingest_interval' => env('REVERB_PULSE_INGEST_INTERVAL', 15), ],

broadcast message:
`<?php

namespace App\Notifications;

use App\Enums\GlobalNotificationType;
use App\Helpers\Disk;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\BroadcastMessage;
use Illuminate\Notifications\Notification;

class ExportCompletedNotification extends Notification implements ShouldQueue
{
use Queueable;

public function __construct(public string $path, public string $fileType)
{
    //
}

public function via($notifiable): array
{
    return ['database', 'broadcast'];
}

public function toBroadcast($notifiable): BroadcastMessage
{
    return new BroadcastMessage([
        'data' => [...],
    ]);
}

}`

ps: This system working in production with Laravel Websockets

Steps To Reproduce

  1. install herd with reverb and redis servers
  2. install laravel horizon
  3. enable server custom dns "laravel.test"
  4. enable server ssl
  5. create broadcast message
  6. dispatch notification message
  7. check laravel horizon fail logs
@lsdevelop
Copy link
Author

Please close, this issure is simillary to #78

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants