laravel-echo-server icon indicating copy to clipboard operation
laravel-echo-server copied to clipboard

laravel-echo-server - [ioredis] Unhandled error event: Error: connect ETIMEDOUT

Open geimsdin opened this issue 5 years ago • 6 comments

Describe the bug Laravel-echo-server works good on my local environment (on http), when I deploy it to VPS running Ubuntu 18.04.4 (apache on https), with virtualmin cp and basic stuff... everything is great, queue and redis are working and talking, If I fire an event it goes on redis (I can see it in MONITOR) and goes in laravel queue too. The problems are when I start Laravel-echo-server: if I have a client open it connects very fast and then I start to get this error message in loop every 4 or 5 seconds:

[ioredis] Unhandled error event: Error: connect ETIMEDOUT at Socket. (/home/[omitted]/.nvm/versions/node/v14.5.0/lib/node_modules/laravel-echo-server/node_modules/ioredis/built/redis/index.js:285:37) at Object.onceWrapper (events.js:420:28) at Socket.emit (events.js:314:20) at Socket._onTimeout (net.js:483:8) at listOnTimeout (internal/timers.js:551:17) at processTimers (internal/timers.js:494:7)

To Reproduce I don't know if it is a bug with my specific configuration or not, I tried many laravel-echo-server.json parameters change and tests but I always get the same error.

Expected behavior Naturally i would like it to connect without this problems and I know that mine is not a proper issue but I would like someone to point me on how to debug this, where to look to find the problem

geimsdin avatar Jul 20 '20 06:07 geimsdin

Hi @geimsdin , I am actually facing the same issue, I would like to know if you finally found something helpfull, or even better, a solution so solve this situation ? Thank you :/

AnaiO avatar Jan 14 '21 15:01 AnaiO

Hi @AnaiO, I did solve configuring redis on a linux socket instead of a network socket because I was not able to understand what was wrong on the network interaction. Basically, having my redis server and apache on the same machine that was also a good approach.

geimsdin avatar Jan 14 '21 16:01 geimsdin

@geimsdin Alright ok, thank you very much for taking time to answer !

AnaiO avatar Jan 15 '21 13:01 AnaiO

Hi @geimsdin , I am facing the same issue for many days. I tried my best but i couldn't resolve this if you have found any solution to this problem please guide me. Thanks.

ch-dani avatar Mar 02 '21 03:03 ch-dani

Hi @geimsdin , I am facing the same issue for many days. I tried my best but i couldn't resolve this if you have found any solution to this problem please guide me. Thanks.

Sorry @ch-dani but my solution is to map it and access it on a Linux socket, probably the best solution in any case.

geimsdin avatar Mar 02 '21 04:03 geimsdin

@geimsdin thank you very much

ch-dani avatar Mar 02 '21 04:03 ch-dani