beyondcode / laravel-websockets

Websockets for Laravel. Done right.
https://beyondco.de/docs/laravel-websockets
MIT License
5.08k stars 628 forks source link

Channels current state is unavailable! (IIS) #714

Closed rezasys2 closed 3 years ago

rezasys2 commented 3 years ago

Hello guys, I'm using Laravel 7.3 on IIS server - Windows server 2019. I'm getting this error "Channels current state is unavailable" and the cmd stuck on Starting the websocket server on 6001". My package versions are listed below: "pusher/pusher-php-server": "~3.0", "beyondcode/laravel-websockets": "^1.9",

I'm also using Laravel echo and the cert and key file are all set fine. Websocket config:

 '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' => true,
              'enable_statistics' => true,
              'encrypted' => true,
          ],
      ],

  'ssl' => [

          'local_cert' => 'C:/cer/certify.crt',

          'local_pk' => 'C:/cer/private.key',

          'passphrase' => '',

          'verify_peer' => false,

          'allow_self_signed' => true,
],

broadcasting config:

        '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'),
            'encrypted' => true,
            'host' => '127.0.0.1',
            'port' => 6001,
            'useTLS' => true,
            'scheme' => 'https',
            'curl_options' => [
                CURLOPT_SSL_VERIFYHOST => 0,
                CURLOPT_SSL_VERIFYPEER => 0,
           ]
       ],
   ],
criting commented 3 years ago

I have the same issue here. 3 days and still can not make it to work again

tupywebteam commented 3 years ago

I have the same issue

rezasys2 commented 3 years ago

Any experienced users could help us? Or does it have any logs to check?

McAlvaro commented 3 years ago

I also have the same problem ... Did anyone find a solution ...?

shahpankaj981 commented 3 years ago

Facing same issue. Can anyone help?

jackbaron commented 3 years ago

I have a same issue. Anyone find a solution?

rezasys2 commented 3 years ago

Finally, this solution worked for me, I had to change the port and config.