Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Offical apps | Community apps | Demo | Docs | Install
  1. Cloudron Forum
  2. N8N
  3. Broken Update n8n to 4.40.0 - n8n app stuck in restart loop — npm EACCES on /home/cloudron/.npm despite chown in start script

Broken Update n8n to 4.40.0 - n8n app stuck in restart loop — npm EACCES on /home/cloudron/.npm despite chown in start script

Scheduled Pinned Locked Moved N8N
2 Posts 2 Posters 61 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • dsp76D
    dsp76D
    dsp76
    wrote last edited by
    #1

    After a failed backup/restart cycle, my n8n app (Cloudron package io.n8n.cloudronapp, v4.40.0) got stuck in a permanent restart loop and won't come back up.

    Symptoms:

    Healthcheck fails repeatedly: Healthcheck error: Error: connect ECONNREFUSED <app-ip>:5678 (previously EHOSTUNREACH)
    On every start attempt, npm fails while installing extra node modules:
    npm error code EACCES
    npm error syscall mkdir
    npm error path /home/cloudron/.npm/_cacache/tmp
    npm error errno EACCES
    npm error Your cache folder contains root-owned files...
    npm error sudo chown -R 1000:1000 "/home/cloudron/.npm"
    This happens even on a freshly recreated container (Cloudron deleted and recreated the container as part of a repair/debug task), so it's not a leftover from the old container's filesystem — it recurs immediately on the new one too.
    The package's own start.sh already runs chown -R cloudron:cloudron /app/data /run/n8n /run/.npm /run/.cache /run/*.ssh before the npm install step for PKG_EXTRA_NODE_MODULES (a handful of custom node packages), yet the EACCES persists.
    The app also briefly entered a Cloudron "Repair mode... sleeping" state during one restart attempt, which I've since disabled.

    What I've checked:

    /run/cloudron.npm (symlink target of /home/cloudron/.npm) is present and empty, owned by cloudron:cloudron (uid 1000).
    No supervisorctl socket present (/var/run/supervisor.sock doesn't exist) — image apparently doesn't run supervisord for shell access, only via the packaged start.sh → exec supervisord.
    /run is mounted as ext4, not tmpfs, so it's not a "wiped on restart" issue.

    Question:
    Is /run/cloudron.npm (or its _cacache subfolder specifically) expected to sometimes get root-owned entries from an npm install step that runs as root before the gosu cloudron:cloudron npm install line, and if so, is there a known race/ordering bug in the n8n package's start.sh between the chown and the actual npm install for PKG_EXTRA_NODE_MODULES?

    Workaround used: Restoring from an earlier backup instead of continuing to debug live, since the app was fully down.

    Environment:

    Cloudron app: n8n (io.n8n.cloudronapp@4.40.0)
    Cloudron CLI used for restart/logs

    (Ask me about B2B marketing automation & low code business solutions, if thats interesting for you.)

    1 Reply Last reply
    0
    • girishG
      girishG
      girish
      Staff
      wrote last edited by
      #2

      We are working on a fix, please see https://forum.cloudron.io/topic/15892/broken-update-n8n-to-2.36.8/

      1 Reply Last reply
      1
      • girishG girish locked this topic

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Bookmarks
      • Search