elastalert icon indicating copy to clipboard operation
elastalert copied to clipboard

Erro on start Elastalert server

Open renatofritola opened this issue 5 years ago • 2 comments

When trying to start the elastalert server container the following error occurs:

`> @bitsensor/[email protected] start /opt/elastalert-server

sh ./scripts/start.sh 16:45:56.555Z INFO elastalert-server: Server: Stopping server /opt/elastalert-server/src/common/websocket.js:34 wss.clients.forEach(function (ws) { ^ TypeError: Cannot read property 'clients' of null at Timeout._onTimeout (/opt/elastalert-server/src/common/websocket.js:22:7) at listOnTimeout (internal/timers.js:531:17) at processTimers (internal/timers.js:475:7) `

I already reviewed the settings and all are correct.

Could you help me please?

renatofritola avatar Dec 20 '19 16:12 renatofritola

Isn't this the same as https://github.com/bitsensor/elastalert/issues/131?

solution there:

https://github.com/bitsensor/elastalert/blob/2.0.1/src/common/websocket.js#L27 For me increasing of this timeout helped: command: [ "/bin/sh", "-c", "sed -i 's|10000|60000|' src/common/websocket.js && npm start"]

I believe this parameter has to be exposed to the application config instead of hardcoding.

naretto avatar Jan 08 '20 04:01 naretto

Hey there,

  1. Jan 2020 :-P I think the mentioned post is no solution, but a workaround.

Any chance to get this as env var to pass at startup or to get the timeout changed entirely?

selfisch avatar Mar 16 '21 08:03 selfisch