Error update to 4.22.0 from 4.21.0

Hi…

I have just tried to update ghost to 4.22.0 from v4.21.0!

But I get this error:

Message: Ghost was able to start, but errored during boot with: Unable to find storage adapter LocalFileStorage in ,/var/www/ghost/content/adapters/,/var/www/ghost/versions/4.22.0/core/server/adapters/.

Here is the log

Debug Information:
    OS: Ubuntu, v20.04.3 LTS
    Node Version: v16.13.0
    Ghost Version: 4.22.0
    Ghost-CLI Version: 1.18.0
    Environment: production
    Command: 'ghost update'
Message: Ghost was able to start, but errored during boot with: Unable to find storage adapter LocalFileStorage in ,/var/www/ghost/content/adapters/,/var/www/ghost/versions/4.22.0/core/server/adapters/.
Suggestion: journalctl -u ghost_www-futurenode-dk -n 50
Stack: Error: Ghost was able to start, but errored during boot with: Unable to find storage adapter LocalFileStorage in ,/var/www/ghost/content/adapters/,/var/www/ghost/versions/4.22.0/core/server/adapters/.
    at Server.<anonymous> (/usr/lib/node_modules/ghost-cli/lib/utils/port-polling.js:73:28)
    at Object.onceWrapper (node:events:509:28)
    at Server.emit (node:events:390:28)
    at emitCloseNT (node:net:1681:8)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)

sudo journalctl -u ghost_www-futurenode-dk -n 50:

Nov 05 18:07:40 dragon.futurenode.dk systemd[1]: Stopping Ghost systemd service for blog: www-futurenode-dk...
Nov 05 18:07:40 dragon.futurenode.dk systemd[1]: ghost_www-futurenode-dk.service: Succeeded.
Nov 05 18:07:40 dragon.futurenode.dk systemd[1]: Stopped Ghost systemd service for blog: www-futurenode-dk.
Nov 05 18:07:41 dragon.futurenode.dk systemd[1]: Started Ghost systemd service for blog: www-futurenode-dk.
Nov 05 18:07:41 dragon.futurenode.dk node[1976239]: - Inspecting operating system
Nov 05 18:07:43 dragon.futurenode.dk node[1976284]: [2021-11-05 17:07:43] INFO Running migrations.
Nov 05 18:07:44 dragon.futurenode.dk systemd[1]: Stopping Ghost systemd service for blog: www-futurenode-dk...
Nov 05 18:07:45 dragon.futurenode.dk node[1976239]: /usr/lib/node_modules/ghost-cli/lib/process-manager.js:46
Nov 05 18:07:45 dragon.futurenode.dk node[1976239]:         throw error;
Nov 05 18:07:45 dragon.futurenode.dk node[1976239]:         ^
Nov 05 18:07:45 dragon.futurenode.dk node[1976239]: {
Nov 05 18:07:45 dragon.futurenode.dk node[1976239]:   message: 'Ghost was able to start, but errored during boot with: Unable to find storage adapter LocalFileStorage in ,/var/www/ghost/content/adapters/,/var/www/ghost/versions/4.22.0/core/server/adapters/.'
Nov 05 18:07:45 dragon.futurenode.dk node[1976239]: }
Nov 05 18:07:45 dragon.futurenode.dk systemd[1]: ghost_www-futurenode-dk.service: Main process exited, code=exited, status=1/FAILURE
Nov 05 18:07:45 dragon.futurenode.dk systemd[1]: ghost_www-futurenode-dk.service: Failed with result 'exit-code'.
Nov 05 18:07:45 dragon.futurenode.dk systemd[1]: Stopped Ghost systemd service for blog: www-futurenode-dk.
Nov 05 18:07:52 dragon.futurenode.dk systemd[1]: Started Ghost systemd service for blog: www-futurenode-dk.
Nov 05 18:07:53 dragon.futurenode.dk node[1976375]: - Inspecting operating system
ghost-mgr@dragon:/var/www/ghost$

My site: https://www.futurenode.dk

Can anyone help???

// Thomas

In your config.production.json file do you have a storage entry? If so, what does it look like?

Hi @Kevin

Thanks for your reply - here is my config.production.json

{
  "url": "https://www.futurenode.dk",
  "admin": {
    "redirects": true
  },
  "server": {
    "port": 2368,
    "host": "127.0.0.1"
  },
  "updateCheck": {
    "url": "https://updates.ghost.org",
    "forceUpdate": true
  },
  "privacy": false,
  "useMinFiles": true,
  "paths": {
    "contentPath": "/var/www/ghost/content"
  },
  "storage": {
    "active": "LocalFileStorage"
  },
  "scheduling": {
    "active": "SchedulingDefault"
  },
  "database": {
    "client": "mysql",
    "connection": {
      "host": "localhost",
      "user": "MYDATABASEUSER",
      "password": "MYPASSWORD",
      "database": "MYDATABASE"
    }
  },
  "mail": {
    "from": "'FutureNode.dk' <no-reply@futurenode.dk>",
    "transport": "SMTP",
    "options": {
      "service": "Mailgun",
      "host": "smtp.eu.mailgun.org",
      "port": 465,
      "secureConnection": true,
      "auth": {
        "user": "MYMAILUSER",
        "pass": "MYPASSWORD"
      }
    }
  },
  "logging": {
    "level": "info",
    "rotation": {
      "enabled": true,
      "period": "1d",
      "count": 10
    },
    "transports": [
      "file"
    ],
    "slowHelper": {
      "level": "warn",
      "threshold": 300
    }
  },
  "spam": {
    "user_login": {
      "minWait": 300000,
      "maxWait": 604800000,
      "freeRetries": 4
    },
    "user_reset": {
      "minWait": 3600000,
      "maxWait": 3600000,
      "lifetime": 3600,
      "freeRetries": 4
    },
    "global_reset": {
      "minWait": 3600000,
      "maxWait": 3600000,
      "lifetime": 3600,
      "freeRetries": 4
    },
    "global_block": {
      "minWait": 3600000,
      "maxWait": 3600000,
      "lifetime": 3600,
      "freeRetries": 99
    },
    "private_block": {
      "minWait": 3600000,
      "maxWait": 3600000,
      "lifetime": 3600,
      "freeRetries": 99
    },
    "content_api_key": {
      "minWait": 3600000,
      "maxWait": 86400000,
      "lifetime": 3600,
      "freeRetries": 99
    }
  },
  "caching": {
    "301": {
      "maxAge": 31536000
    },
    "frontend": {
      "maxAge": 0
    },
    "customRedirects": {
      "maxAge": 31536000
    },
    "favicon": {
      "maxAge": 86400
    },
    "sitemap": {
      "maxAge": 3600
    },
    "robotstxt": {
      "maxAge": 3600000
    }
  },
  "process": "systemd",
  "imageOptimization": {
    "resize": true
  },
  "compress": true,
  "preloadHeaders": false,
  "adminFrameProtection": true,
  "sendWelcomeEmail": true
}

Hi again

Thanks for the hint, I have changed this:

  "storage": {
    "active": "LocalFileStorage"
  },

to

  "storage": {
    "active": "LocalImagesStorage",
    "media": "LocalMediaStorage",
    "LocalMediaStorage": {}
  },

Now it seems to work!

Glad you got it working! Out of interest, what install method lead to having all of those details in your config file, are they something you added yourself?

I have always used this config… I can’t remember where I got the settings from! Is it overkill?

I can see I have some settings from github

Typically your config.json would only contain settings that you’ve explicitly changed from the defaults. That way the config reflects only your specific changes and wouldn’t be affected by underlying changes to the built-in defaults like the one that tripped you up in this upgrade.

1 Like

Hi @Kevin slight_smile:

Sorry for the late reply.

It makes sense, can you post a temple that works and don’t have all these settings?

{
  "url": "https://www.futurenode.dk",
  "server": {
    "port": 2368,
    "host": "127.0.0.1"
  },
  "database": {
    "client": "mysql",
    "connection": {
      "host": "localhost",
      "user": "MYDATABASEUSER",
      "password": "MYPASSWORD",
      "database": "MYDATABASE"
    }
  },
  "mail": {
    "from": "'FutureNode.dk' <no-reply@futurenode.dk>",
    "transport": "SMTP",
    "options": {
      "service": "Mailgun",
      "host": "smtp.eu.mailgun.org",
      "port": 465,
      "secureConnection": true,
      "auth": {
        "user": "MYMAILUSER",
        "pass": "MYPASSWORD"
      }
    }
  }
}

That’s the config that is specific to your Ghost instance. The "server" block isn’t strictly necessary as you’re using the defaults but it’s typical to include it because it’s something that is likely to change when you have multiple sites and it’s information that’s useful to know at a glance.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.