Update to 2.3.0.beta6 failed, trying to restore backup

I tried updating via

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

But I get the following error:

I, [2019-03-29T09:15:37.854326 #14]  INFO -- :
I, [2019-03-29T09:15:37.854871 #14]  INFO -- : Terminating async processes
I, [2019-03-29T09:15:37.855071 #14]  INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/10/bin/postmaster -D /etc/postgresql/10/main pid: 68
2019-03-29 09:15:37.855 UTC [68] LOG:  received fast shutdown request
I, [2019-03-29T09:15:37.855512 #14]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 184
184:signal-handler (1553850937) Received SIGTERM scheduling shutdown...
2019-03-29 09:15:37.858 UTC [68] LOG:  aborting any active transactions
2019-03-29 09:15:37.860 UTC [68] LOG:  worker process: logical replication launcher (PID 77) exited with exit code 1
2019-03-29 09:15:37.864 UTC [72] LOG:  shutting down
2019-03-29 09:15:37.879 UTC [68] LOG:  database system is shut down
184:M 29 Mar 2019 09:15:37.892 # User requested shutdown...
184:M 29 Mar 2019 09:15:37.892 * Saving the final RDB snapshot before exiting.
184:M 29 Mar 2019 09:15:38.178 * DB saved on disk
184:M 29 Mar 2019 09:15:38.179 # Redis is now ready to exit, bye bye...


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 423 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
ec21e8172621221577a35a76897ddd48979a20f98fb787dec09fab7af15a5737
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one
root@ubuntu-2gb-nbg1-1 /var/discourse #

This has resulted in the forum being offline, and I’d like to at least restore it as it was before (no backups server side unfortunately)

I tried:

script/discourse restore <filename.of.the.backup.tar.gz>

And got:

-bash: syntax error near unexpected tokennewline’`

I tried
./launcher enter app

And got
Error response from daemon: Container 2591571e6cc466088eba3ca29737d6df2f375fafea6103ec7659a1dd47b67fbc is not running

I don’t have much of a clue of what I’m doing, any help to restore would be really appreciated.
It is hosted on 2gb ram, 20gb space, and the .gz backup is 380mb

I upgraded to 4gb ram, 40gb space, as it was running low on space, but still get the same error when trying to

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

This is a screenshot of some errors I saw before it scrolled away, I don’t know if relevant.

You should be able to start the old container with

./launcher start app
2 Likes

Thank you, I ran that and its working fine on v2.3.0.beta5 and the forum is back up.

It appears like something is prohibiting the upgrade to 2.3.0.beta6 though.

You will need to scroll back to see what the problem is. You should fix the things mentioned in your screen shot, but they are not likely the cause of the problem.

Do you have any 3rd party plugins installed?

The plugins are here:

Scrolling back as far as it would go gives this error log:
error.txt (131.8 KB)

I managed to screenshot this part that isn’t in the log file:

First thing is to disable the non-standard plugins.

4 Likes

I also have this problem and was able to track it down to the moderator plugin. @angus could you take a look at this?

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 408 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
7619b976dd4de5fa5b66225abeddf9d01efda035a44d99af26399876c129ccb8
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one
8 Likes