更新失败

root@www:/var/discourse# ./launcher start data
x86_64 arch detected.

+ /usr/bin/docker run --shm-size=512m -d --restart=always -e LANG=en_US.UTF-8 -e LC_ALL=en_US.UTF-8 -e LANGUAGE=en_US.UTF-8 -h www-data -e DOCKER_HOST_IP=172.17.0.1 --name data -t -v /var/discourse/shared/data:/shared -v /var/discourse/shared/data/log/var-log:/var/log --mac-address 02:e6:17:cc:a2:dc local_discourse/data /sbin/boot
Unable to find image 'local_discourse/data:latest' locally
docker: Error response from daemon: pull access denied for local_discourse/data, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

Run 'docker run --help' for more information
root@www:/var/discourse# 

Any suggestions? Searching for that error message turns up only this thread.

That suggests that maybe you ran a ./launcher cleanup and deleted the data container (I don’t see another way that the container would be missing, but I could be wrong). If that’s the case, and, really, in any case, what I would do is spin up a new droplet, copy over your yml files and restore your latest backup.

If you’d like a fish rather than being taught, you can contact me or ask in Marketplace

1 个赞

The thing that got the site back up, after the data container was gone, was to edit data.yml and change the template to the postgres13 templet and then rebuild the data container, then it was possible to start up the data container, destroy and start the web_only container (it won’t connect to a different data container than the one it found when it was created). Then the site was back up and running.

I’m pretty sure that if I’d retried the database upgrade it would have worked, but just to be safe, I made a fresh database backup, moved him to a new droplet, restored the database, and he’s back up and running.

1 个赞

Could you possibly say a few words about how the problem arose, for example to reassure others that it probably won’t apply to them?

1 个赞

Tk;dr: no.

I can’t write tell what the original problem was. Knowing to switch to the pg13 template was the fix for the issue once the container was deleted. That’s part of what the pg15 topic says to do. Maybe there was a disk space problem at one point?

ah, I think I see now… it was an upgrade of a rather old system using pg13? So fairly rare situation.

The upgrade failed because the PostgreSQL upgrade required 14GB of free disk space and the droplet didn’t have quite that much.

Why it didn’t work after I expanded the disk space, might be that as suggested by @Jagster above I did a ./launcher cleanup that was inappropriate for a two-container installation.

At some point I’d like to switch to a single-container installation since that seems less problematic for someone who doesn’t really know the Discourse architecture. I would also prefer not to self-host but the site has a lot of photos and Discourse hosting jumped from $100 to $200 a month when we ran out of disk space. The site only brings in around $30-40 a month from Google Ads.

I migrated to Digital Ocean only two years ago.

And yet I did it a week ago, when I was out of space.

@pfaffman suggested that might have been the problem. I have no idea.

No. That would have caused the same problem for the single container setup.

The problem was that when you tried to gain disk space you destroyed your stopped data container. The crucial mistake, I think, was doing the cleanup while your data and web only containers were stopped.

The two container setup saved you some grief since it made it easier to delay the postgres upgrade. In this case, however, you got stuck because the upgrade added the ai plugin, and that forced you to do the postgres upgrade on the data container.

Maybe if a launcher cleanup had been run before you tried to upgrade or if you’d not run it at all and resized.

So there were a bunch of issues

  • Maybe too many docker images filling the disk (maybe disk too small)
  • PostgreSQL update required
  • Ai plugin added to core, forcing database upgrade
  • PostgreSQL upgrade failing for some reason and not knowing to start the data container (I think the message says to)
  • Running launcher cleanup with the data container shut down, which deleted the container that needed to start up in order to do a clean shut down
1 个赞

The only thing I dd to gain disk space was to resize the droplet.

Everything else I did was to try to complete the failed upgrade, based on suggestions in command output, posts here, or in linked topics.

1 个赞

@pfaffman my site is getting slammed with obvious spam. Is it possible that some anti-spam tool got lost in the upgrade?

It’s not likely. I don’t know if Akismet was ever configured, but it’s no longer very effective. What’s recommended now is this: Discourse AI - Spam detection The AI plugin is now part of core and is installed.

If you’d like help you can email me.

EDIT: It’s possible, but not likely, that the change described here could explain your spam uptick.