Upgrade failed - could use some help to try and fix using SSH

Yesterday I had an admin message about upgrades. From the web UI, I did the Docker upgrade first and this seemed to go well. After it finished, the upgrade button for Discourse was enabled and I initiated that. At some point something broke and now our site is down. I was on my phone at the time and I didn’t manage to look at the log carefully to see where exactly things broke, before

I’m currently pocking around over SSH and about to try ./launcher rebuild app to hopefully get a better idea about what exactly is the problem in the upgrade. I’ve never done Discourse command-line repair and I want to make sure that I don’t blow away our data. Looking over app.yml, I see that the container is stateless - great - and that all the data is on the host, accessed as a shared volume.

I ran discourse-doctor and it looks like disk space is not the issue. Will the rebuild app command touch the local data store?

Yes, do the ./launcher rebuild app that should do it. It will not blow away your data.

If you’d rather not to it yourself, please see Automatic Rebuilds When You Need Them.

2 Likes

Thanks, the rebuild seems to have worked - the GitHub avatars and favicon don’t show for some reason, though.

1 Like

Hi!
I have upgraded and the page gave me a 504 Gateway Time-out error.
I did this, and it still doesn´t work.

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

Do you have any idea why it still not working?

No. There is not much chance of having any idea. My best guess is that you didn’t wait for the server to fully restart, but it could be about anything. Did the rebuild complete without error? Are you out of disk space? Does docker ps show that the container is running?

Docker ps shows me this:

If a put ./launcher enter app, it tells me that Container is not running. How can I do it to run?

In the log file I see this:
Could not find rake-13.0.1 in any of the sources
Run bundle install to install missing gems.
Does it have any importance?
Thanks

That container name means that the rebuild is still going, and for just 4 minutes.

You can tail the logs with

docker logs -tf sweet_chatelet

Are the logs moving?

1 Like

it finnished the rebuild and it puts only this:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

And for ./launcher enter app I receive this:
Error response from daemon: Container … is not running

1 Like

So the rebuild is failing at some step.

Try a new rebuild with just ./launcher rebuild app and watch the logs. When it stops with another failure, scroll up and search for error messages, those will show what is the problem. Copy those here and we can help.

1 Like

@Falco if I put ./launcher logs app I have this:
Could not find rake-13.0.1 in any of the sources
Run bundle install to install missing gems.

Is this the whole logs? Can you share a larger portion of the logs?

Is this server behind some weird firewall or corporate environment? Or is it a simple VPS on the internet?

After finnishing the ./launcher rebuild app it show me this: ** 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.

but ./discourse-doctor doesn´t solve anything

can you scroll up and look for earlier error messages?

I don’t know if this one help you to see what happens

The first 3 screenshots are from ./launcher logs app and those are useless.

The last one is from ./launcher rebuild app and is the one with the answers! Please check it for errors, and it possible paste the whole output as text here.

Thanks for that!

/pups/lib/pups/config.rb:106:in `block (2 levels) in run_commands': Invalid run command cd (SyntaxError)
	from /pups/lib/pups/config.rb:100:in `each'
	from /pups/lib/pups/config.rb:100:in `block in run_commands'
	from /pups/lib/pups/config.rb:99:in `each'
	from /pups/lib/pups/config.rb:99:in `run_commands'
	from /pups/lib/pups/config.rb:78:in `run'
	from /pups/lib/pups/cli.rb:31:in `run'
	from /pups/bin/pups:8:in `<main>'
44bf915bdff740d4441ad5239f79d5b14a6ed375300c52b85c10eefb7af677a2
** 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.

Looks like your app.yml has some invalid commands.

Maybe you tried to add a plugin and added some invalid characthers?

Can you paste it here, after removing any passwords?

Sure, here it is:
app.txt (3.4 KB)

Oh looks like you tried to enable Subfolder support with Docker but the first block indentation got messed up.

All you need to is to add two extra spaces at the beginning of lines 82, 83, 84 and 85.

After that save the file and rebuild.

3 Likes