ninjapeps's avatar

Need help setting up for prod

(I keep getting a note saying I can't post links yet even though there aren't any links in my post so I've replaced http with hype)

I've got reverb working on my local machine. Now I'm having difficulty getting it to work on the server. I think I've finally gotten supervisor to run properly already so now my only issue is that the sockets can't be read. In the network tab of dev tools, the ws links all have the domain localhost:8080 and a status of blocked.

Not sure if the issue is with my env values

REVERB_APP_ID=396160  
REVERB_APP_KEY=ujjxjmewenx3ruqys4bf  
REVERB_APP_SECRET=ebqtdneudtyu3vategoj  
REVERB_SERVER_HOST=127.0.0.1  
REVERB_SERVER_PORT=6001  
REVERB_HOST="\<my site's url\>"  
REVERB_PORT=443  
REVERB_SCHEME=https  
BROADCAST_CONNECTION=reverb 

or with my Nginx config

I can't use 8080 because I get this error when I try:

Failed to listen on "tcp://127.0.0.1:8080": Address already in use (EADDRINUSE)

Any help would be appreciated. Thank you.

1 like
2 replies
vincent15000's avatar

Some suggestions :

  • is Reverb installed on the same server ?

  • have you a firewall that could block the access ?

  • have you authenticated the user for the broadcasting ?

channelAuthorization: {
    endpoint: '/api/broadcasting/auth',
    headers: {
        'Authorization': 'Bearer ' + sessionStorage.getItem('token'),
    },
},
return Application::configure(basePath: dirname(__DIR__))
    ->withRouting(
        web: __DIR__.'/../routes/web.php',
        api: __DIR__.'/../routes/api_v1.php',
        commands: __DIR__.'/../routes/console.php',
        channels: __DIR__.'/../routes/channels.php',
        health: '/up',
    )
    ->withMiddleware(function (Middleware $middleware) {
        // $middleware->statefulApi();
    })
    ->withExceptions(function (Exceptions $exceptions) {
        //
    })
    ->withBroadcasting(
        __DIR__.'/../routes/channels.php',
        ['prefix' => 'api', 'middleware' => ['api', 'auth:sanctum']],
    )
    ->create();
ninjapeps's avatar

Yes, reverb is on the same server.

To my knowledge, there's no firewall blocking either 8080 or 6001.

User is authenticated.

Please or to participate in this conversation.