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

ninjapeps's avatar

ninjapeps wrote a reply+100 XP

9h ago

Site not receiving events in prod

Someone on a different forum suggested that there could be a connection issue since there were repeated reconnection attempts every few seconds. Screenshot of dev tools output added to the post.

ninjapeps's avatar

ninjapeps started a new conversation+100 XP

3d ago

Site not receiving events in prod

I have a site that uses reverb. Events are working just fine on my machine. However, it doesn't receive anything once uploaded to the dev server.

window.addEventListener('DOMContentLoaded', function() {
  window.Echo.channel('makebid')
    .listen('MakeBid', (event) => {
      console.log('bid');
    })

  window.Echo.channel('closeauction')
    .listen('EndAuction', (event) => {
      console.log('end');
    })
});

Nothing got output to console.

Supervisor is set up to run reverb and queue. The logs aren't displaying any errors from reverb. The queue log is showing events running and completing. Browser is able to connect to the websocket.

What else could be causing this? I don't know what else I need to check in order to properly debug this.

EDIT: I was informed elsewhere that there appears to be a connection issue since there are repeated reconnection attempts shown on dev tools. Not sure how to add images here so screenshot here: https://imgur.com/a/BZW9d5Z

And in case there could be an issue with my nginx config: https://docs.google.com/document/d/1_EDmIVutr0Ol1ARw3L8BIdqjsAbd-S8chEzaQbnxd5E/edit?tab=t.0

ninjapeps's avatar

ninjapeps wrote a reply+100 XP

3d ago

Need help setting up for prod

I had already solved this a while ago and it turned out the only thing I had to do was run npm run build. After doing that, everything ran just fine.

Yes, I believe that error came from supervisor. 8080 was unavailable and 6001 was the port I kept seeing tutorials recommend so I changed it to that.

As for the nginx configurations, most were defaults provided by the server and the ones for reverb were taken from a tutorial.

ninjapeps's avatar

ninjapeps wrote a reply+100 XP

1mo ago

Need help setting up for prod

Yes, reverb is on the same server.

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

User is authenticated.

ninjapeps's avatar

ninjapeps started a new conversation+100 XP

1mo ago

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.

EDIT: I forgot I made this thread. Turned out the only reason for my problem was that I had to run npm run build again. After that, it worked properly.