taiga-docker icon indicating copy to clipboard operation
taiga-docker copied to clipboard

[BUG] taiga-events_1 container failing

Open dbrifox opened this issue 4 years ago • 7 comments

taiga-events_1 container fails with error:

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] start:production: NODE_ENV=production node ./src/index.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] 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 [email protected] 3 info using [email protected] 4 verbose config Skipping project config: /taiga-events/.npmrc. (matches userconfig) 5 verbose run-script [ 'prestart:production', 'start:production', 'poststart:production' ] 6 info lifecycle [email protected]~prestart:production: [email protected] 7 info lifecycle [email protected]~start:production: [email protected] 8 verbose lifecycle [email protected]~start:production: unsafe-perm in lifecycle true 9 verbose lifecycle [email protected]~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 [email protected]~start:production: CWD: /taiga-events 11 silly lifecycle [email protected]~start:production: Args: [ '-c', 'NODE_ENV=production node ./src/index.js' ] 12 silly lifecycle [email protected]~start:production: Returned: code: 1 signal: null 13 info lifecycle [email protected]~start:production: Failed to exec start:production script 14 verbose stack Error: [email protected] 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 [email protected] 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 [email protected] start:production: NODE_ENV=production node ./src/index.js 23 error Exit status 1 24 error Failed at the [email protected] 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 ]

dbrifox avatar Oct 02 '21 13:10 dbrifox

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

brett-stanley avatar Oct 06 '21 16:10 brett-stanley

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

tdelatorre avatar Oct 13 '21 09:10 tdelatorre

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

sarbanha avatar Apr 07 '22 08:04 sarbanha

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.

bameda avatar Jun 27 '22 11:06 bameda

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 avatar Feb 28 '23 14:02 glowing-axolotl

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.

glowing-axolotl avatar Feb 28 '23 14:02 glowing-axolotl

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

happydoom avatar May 24 '23 14:05 happydoom