taigaio / taiga-docker

Mozilla Public License 2.0
1.12k stars 290 forks source link

[BUG] taiga-events_1 container failing #44

Open dbrifox opened 2 years ago

dbrifox commented 2 years ago

taiga-events_1 container fails with error:

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! taigaio-events@6.4.0 start:production: NODE_ENV=production node ./src/index.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the taigaio-events@6.4.0 start:production script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /taiga-events/.npm/_logs/2021-10-02T13_47_35_746Z-debug.log

Complete log file content:

0 info it worked if it ends with ok 1 verbose cli [ 1 verbose cli '/usr/local/bin/node', 1 verbose cli '/usr/local/bin/npm', 1 verbose cli 'run', 1 verbose cli 'start:production' 1 verbose cli ] 2 info using npm@6.14.12 3 info using node@v12.22.1 4 verbose config Skipping project config: /taiga-events/.npmrc. (matches userconfig) 5 verbose run-script [ 'prestart:production', 'start:production', 'poststart:production' ] 6 info lifecycle taigaio-events@6.4.0~prestart:production: taigaio-events@6.4.0 7 info lifecycle taigaio-events@6.4.0~start:production: taigaio-events@6.4.0 8 verbose lifecycle taigaio-events@6.4.0~start:production: unsafe-perm in lifecycle true 9 verbose lifecycle taigaio-events@6.4.0~start:production: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/taiga-events/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 10 verbose lifecycle taigaio-events@6.4.0~start:production: CWD: /taiga-events 11 silly lifecycle taigaio-events@6.4.0~start:production: Args: [ '-c', 'NODE_ENV=production node ./src/index.js' ] 12 silly lifecycle taigaio-events@6.4.0~start:production: Returned: code: 1 signal: null 13 info lifecycle taigaio-events@6.4.0~start:production: Failed to exec start:production script 14 verbose stack Error: taigaio-events@6.4.0 start:production: NODE_ENV=production node ./src/index.js 14 verbose stack Exit status 1 14 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16) 14 verbose stack at EventEmitter.emit (events.js:314:20) 14 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 14 verbose stack at ChildProcess.emit (events.js:314:20) 14 verbose stack at maybeClose (internal/child_process.js:1022:16) 14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) 15 verbose pkgid taigaio-events@6.4.0 16 verbose cwd /taiga-events 17 verbose Linux 3.10.0-1160.31.1.el7.x86_64 18 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "start:production" 19 verbose node v12.22.1 20 verbose npm v6.14.12 21 error code ELIFECYCLE 22 error errno 1 23 error taigaio-events@6.4.0 start:production: NODE_ENV=production node ./src/index.js 23 error Exit status 1 24 error Failed at the taigaio-events@6.4.0 start:production script. 24 error This is probably not a problem with npm. There is likely additional logging output above. 25 verbose exit [ 1, true ]

brett-stanley commented 2 years ago

Had the same symptom, rolling back to taiga-events:6.3.0 to see if it occurs again

tdelatorre commented 2 years ago

Hi! Rolling back to taiga-events:6.3.0 works?

sarbanha commented 2 years ago

I have the same problem but I start the service manually after taiga-events-rabbitmq is fully up and running. I am waiting for updates

bameda commented 2 years ago

Yes, sometimes the problem with taiga-events is because taiga-events-rabbitmq start after taiga-events. In these cases, simply restart the taiga-events service with docker-compose start -d taiga-events and check the logs again.

glowing-axolotl commented 1 year ago

The pull request above https://github.com/kaleidos-ventures/taiga-docker/pull/105 fixes this problem.

As a temporary workaround while the pull request is reviewed and (maybe) accepted, you can: In the taiga-events service add:

  taiga-events:
...
    depends_on:
      taiga-events-rabbitmq:
        condition: service_healthy

And in the service taiga-events-rabbitmq add:

  taiga-events-rabbitmq:
...
    healthcheck:
      test: "rabbitmq-diagnostics is_running"

This will also slow down the docker compose up, which will now take about 30 seconds to complete (since it will wait for the rabbitmq to be healthy to launch all the remaining pods).

glowing-axolotl commented 1 year ago

Whoops, as I was reviewing the conflicts on the pull request, I noticed daniel-herrero pushed a fix for this exact issue 4 days ago https://github.com/kaleidos-ventures/taiga-docker/commit/e6af1448b4a7ba4a5e22785ab507500cf38b45e6 . Therefore the pull request above is no more needed, this issue can be closed.

happydoom commented 1 year ago

Current stable just has:

taiga-events: ... depends_on: taiga-events-rabbitmq: condition: service_healthy

But error still occurs as per the above. Adding in:

taiga-events-rabbitmq: ... healthcheck: test: "rabbitmq-diagnostics is_running"

Seems to make it work and stops crash