【问题标题】:Illuminate \ Broadcasting \ BroadcastException No message照亮\广播\广播异常没有消息
【发布时间】:2019-09-07 23:09:21
【问题描述】:

我正在使用Laravel websocket written by beyoundcode

几天后,我连接到myDomain.com/laravel-websockets,第一步解决了。

但是现在,当我触发 event 时,laravel 出现错误:

/public_html/vendor/laravel/framework/src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php 
**at line 117-(in my case)-**

这是我的堆栈跟踪截图:

我阅读了这些问题和问题,但对我没有任何帮助:

Laravel Pusher exception: “Illuminate\Broadcasting\BroadcastException”

Exception: Illuminate \ Broadcasting \ BroadcastException No message in PusherBroadcaster.php:119

Laravel pusher Illuminate \ Broadcasting \ BroadcastException No message

但没有一个对我有帮助。

我也看到了这些issue

PusherBroadcaster exception "Failed to connect to Pusher" when running in queue

基于this comment,我更新了我的php.ini 文件:

[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
curl.cainfo ="/etc/pki/tls/certs/ca-bundle.crt"

these options tested too:

curl.cainfo ="/etc/pki/tls/cert.pem"
curl.cainfo ="/etc/pki/tls/certs/ca-bundle.crt"

我确实在 localhost 中测试了该场景,一切似乎都很好,我想我的 ssl 有问题,所以为了更详细的信息,我不得不说我正在使用使用 linux centos7vps 和我的控制面板是directadmin,我使用letsencrypt和我的控制面板来使用https

有谁知道我的问题是什么?

在此先感谢

【问题讨论】:

  • 你有解决办法吗?面临同样的问题尝试了所有提到的。

标签: php laravel ssl websocket


【解决方案1】:

就我而言,当我将cert keys 放入 apache 可以访问这些文件的路径

我确实添加了带有这些值的 curl 选项数组:

        'options' => [
            'cluster' => env('PUSHER_APP_CLUSTER'),
            'encrypted' => true,
            'host' => '127.0.0.1',
            'port' => 6001,
            'scheme' => 'https',
            'curl_options' => [
                CURLOPT_SSL_VERIFYHOST => 0,
                CURLOPT_SSL_VERIFYPEER => 0,
            ]

然后别忘了

php 工匠缓存:清除

php 工匠配置:清除

希望这能治愈你的头痛,因为我的。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-09-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-02-18
    • 1970-01-01
    • 2013-09-09
    相关资源
    最近更新 更多