Problem upgrade to 2.5.0.beta4

Clicked upgrade button to upgrade Docker. All seemed to go well after done. clicked return and received following:

You are running an old version of the Discourse image.
Upgrades via the web UI are disabled until you run the latest image.
To do so log in to your server using SSH and run:

        cd /var/discourse
        git pull
        ./launcher rebuild app

Did above steps with following error:

root@ubuntu-s-1vcpu-1gb-nyc1-01:~# cd /var/discourse
root@ubuntu-s-1vcpu-1gb-nyc1-01:/var/discourse# git pull
remote: Enumerating objects: 22, done.
remote: Counting objects: 100% (22/22), done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 22 (delta 11), reused 12 (delta 6), pack-reused 0
Unpacking objects: 100% (22/22), done.
From https://github.com/discourse/discourse_docker
   70a3323..8c8dbd0  master     -> origin/master
 * [new branch]      pg12       -> origin/pg12
Updating 70a3323..8c8dbd0
Fast-forward
 launcher                    |  2 +-
 templates/sshd.template.yml | 49 ---------------------------------------------
 templates/web.template.yml  |  2 ++
 3 files changed, 3 insertions(+), 50 deletions(-)
 delete mode 100644 templates/sshd.template.yml
root@ubuntu-s-1vcpu-1gb-nyc1-01:/var/discourse# ./launcher rebuild app

WARNING: We are about to start downloading the Discourse base image
This process may take anywhere between a few minutes to an hour, depending on your network speed

Please be patient

Unable to find image 'discourse/base:2.0.20200429-2110' locally
2.0.20200429-2110: Pulling from discourse/base
54fec2fa59d0: Pulling fs layer
19bc9811812d: Pulling fs layer
54fec2fa59d0: Verifying Checksum
54fec2fa59d0: Download complete
54fec2fa59d0: Pull complete
19bc9811812d: Verifying Checksum
19bc9811812d: Download complete
19bc9811812d: Pull complete
Digest: sha256:3400307b0464d1fc70f554f990e22842f0abe82e3ed42fbee1eb5bad464ce008
Status: Downloaded newer image for discourse/base:2.0.20200429-2110
Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 10 app
app
cd /pups && git pull && /pups/bin/pups --stdin
Already up to date.
I, [2020-05-04T19:34:20.671303 #1]  INFO -- : Loading --stdin
I, [2020-05-04T19:34:20.680407 #1]  INFO -- : > locale-gen $LANG && update-locale
I, [2020-05-04T19:34:20.754357 #1]  INFO -- : Generating locales (this might take a while)...
Generation complete.

I, [2020-05-04T19:34:20.755052 #1]  INFO -- : > mkdir -p /shared/postgres_run
I, [2020-05-04T19:34:20.763216 #1]  INFO -- : 
I, [2020-05-04T19:34:20.765101 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2020-05-04T19:34:20.769530 #1]  INFO -- : 
I, [2020-05-04T19:34:20.770264 #1]  INFO -- : > chmod 775 /shared/postgres_run
I, [2020-05-04T19:34:20.774593 #1]  INFO -- : 
I, [2020-05-04T19:34:20.775571 #1]  INFO -- : > rm -fr /var/run/postgresql
I, [2020-05-04T19:34:20.780287 #1]  INFO -- : 
I, [2020-05-04T19:34:20.781259 #1]  INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2020-05-04T19:34:20.785953 #1]  INFO -- : 
I, [2020-05-04T19:34:20.786915 #1]  INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
I, [2020-05-04T19:34:20.884925 #1]  INFO -- : postgres already running stop container



FAILED
--------------------
Pups::ExecError: socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1 failed with return #<Process::Status: pid 25 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params "socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1"
28acae3e3ece0cb518bcdb99f94ff1f21dc7b8663ab30720b7d7dad43dcc6d52
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.

Discourse-doctor produces similar result. Can anybody identify this problem and point me in the right direction. TIA

EDIT: Rebooted OS, rebuild app and all is good. No idea what the problem was.

I´ve got a problem too. My error is:

Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 10 app
app
cat: templates/sshd.template.yml: No such file or directory
cd /pups && git pull && /pups/bin/pups --stdin
/usr/bin/docker: invalid reference format: repository name must be lowercase.
See '/usr/bin/docker run --help'.
cat: cids/app_bootstrap.cid: No such file or directory
"docker rm" requires at least 1 argument.
See 'docker rm --help'.
Usage:  docker rm [OPTIONS] CONTAINER [CONTAINER...]
Remove one or more containers
rm: cannot remove 'cids/app_bootstrap.cid': No such file or directory
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.

Discourse did run great so far…

You need to remove the ssh template that’s included near the top of your app.yml. Can’t rebuild because ssh template is removed

I don’t know what the OP’s problem is.

5 Likes

Same problem here. Docker is up-to-date (19.03) and I made git pull just before manual upgrade

(and unable to update using Web UI, stuck on “Currently upgrading”)

Be sure you delete that row from your app.yml you do not need it.

3 Likes

What is the output of docker ps ? Are you running single container?

If there are no containers running delete that socket file. Ensure socat is installed on your host.

2 Likes

Thanks @sam. As my edit to OP, reboot and app rebuild did the trick. I did just discover that I left the import container running which I now destroyed. Socat is installed. Here is docker ps output

CONTAINER ID        IMAGE                 COMMAND             CREATED             STATUS              PORTS                                      NAMES
e3c0fe465fb3        local_discourse/app   "/sbin/boot"        2 days ago          Up 11 minutes       0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp   app

Currently running beta4 for 3 days and all appears good. Many thanks.

1 Like

I had a similar problem with a manual upgrade only there were no clues to sshd template, just cat: cids/app_bootstrap.cid: No such file or directory. But after commenting out the sshd template from app.yml the rebuild worked ok.