Digital Ocean > Upgrade Errors

I’ve hit a hurdle with a Digital Ocean droplet that keeps giving me errors when trying to upgrade Ghost.

Ghost-CLI version: 1.24.0
Ghost version: 5.2.3 (at /var/www/ghost)

This is my latest error:

$ ghost upgrade - An error occurred.Message: 'Invalid Version: null'

When you check the instance with Ghost doctor, the output seems fine:

✔ Checking system Node.js version - found v16.15.1
✔ Checking logged in user
✔ Ensuring user is not logged in as ghost user
✔ Checking if logged in user is directory owner
✔ Checking current folder permissions
✔ Checking system compatibility
✔ Checking for a MySQL installation
Instance is currently running
ℹ Validating config [skipped]
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
✔ Checking binary dependencies
✔ Checking free space
✔ Checking systemd unit file
✔ Checking systemd node version - found v16.15.1

Other weird things worth noting is that when I run ghost ls it tells me No installed ghost instances found which is so bizarre. The site is running. Ghost doctor literally says Instance is currently running

I have tried all sorts of things including running ghost setup, installing latest ghost-cli.

Anyone got some tips on what to try next?

This is so strange, not sure if this helps:

$ ghost start
Ghost is already running! For more information, run:  ghost ls
$ ghost ls 
No installed ghost instances found

This messy error is from ghost log

AME: InternalServerError
CODE: ERR_TLS_CERT_ALTNAME_INVALID
MESSAGE: The server has encountered an error.

level: critical

RequestError: Hostname/IP does not match certificate's altnames: IP: 198.199.71.117 is not in the cert's list: 
    at /var/www/ghost/versions/5.2.3/core/server/adapters/scheduling/SchedulingDefault.js:319:23
    at ClientRequest.<anonymous> (/var/www/ghost/versions/5.2.3/node_modules/got/source/request-as-event-emitter.js:178:14)
    at Object.onceWrapper (node:events:642:26)
    at ClientRequest.emit (node:events:539:35)
    at ClientRequest.origin.emit (/var/www/ghost/versions/5.2.3/node_modules/@szmarczak/http-timer/source/index.js:37:11)
    at TLSSocket.socketErrorListener (node:_http_client:454:9)
    at TLSSocket.emit (node:events:527:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
systemctl status ‘*ghost*’

To see if the systemd service is running, who owns the process, recent logs and other details.

Here is the output from that command @markstos

What does it mean :slight_smile: ?

ghost_test.therookies.co.service - Ghost systemd service for blog: test.therookies.co
     Loaded: loaded (/lib/systemd/system/ghost_test.therookies.co.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2023-02-10 05:47:22 UTC; 2 days ago
       Docs: https://ghost.org/docs/
   Main PID: 471565 (ghost run)
      Tasks: 22 (limit: 2339)
     Memory: 136.2M
     CGroup: /system.slice/ghost_test.therookies.co.service
             ├─471565 ghost run
             └─471608 /usr/bin/node current/index.js

● ghost_198.199.71.117.service - Ghost systemd service for blog: 198.199.71.117
     Loaded: loaded (/lib/systemd/system/ghost_198.199.71.117.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2023-02-10 05:52:58 UTC; 2 days ago
       Docs: https://ghost.org/docs/
   Main PID: 471867 (ghost run)
      Tasks: 22 (limit: 2339)
     Memory: 167.0M
     CGroup: /system.slice/ghost_198.199.71.117.service
             ├─471867 ghost run
             └─471910 /usr/bin/node current/index.js

● ghost_147-182-137-130.service - Ghost systemd service for blog: 147-182-137-130
     Loaded: loaded (/lib/systemd/system/ghost_147-182-137-130.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2023-01-12 04:05:06 UTC; 1 months 1 days ago
       Docs: https://ghost.org/docs/
   Main PID: 798 (ghost run)
      Tasks: 22 (limit: 2339)
     Memory: 344.9M
     CGroup: /system.slice/ghost_147-182-137-130.service
             ├─ 798 ghost run
             └─1625 /usr/bin/node current/index.js```

You are running three instances of Ghost. Is that your intent?

No, not the intent at all :man_shrugging:

I’ve had the server for quite a few years now and I’m guessing they are all legacy, and from the looks of it I’ve created quite a mess.

Do you know how I remove unwanted instances, and make sure Ghost can see the correct one?

1 Like