Updated Discourse, broke my app.yml?

I do remember updating once or twice shortly after the initial installation and didn’t have any problems.
Do you really think that insufficient RAM would trigger an “invalid YML” problem?

You can try to create a swap file (it takes 2 minutes) :

If Mittineague is right, that should help you go trough the rebuild

1 Like

Just by looking your YML looks good to me. Have you run it through yamllint? That’s where I’d start first. Beyond that, I’m unsure, as Discourse during upgrades doesn’t touch your app.yml. It will touch the templates but those shouldn’t throw the error you have above (I wouldn’t think).

Yeah, I used yamllint and it gave the same error as I gave above:

(<unknown>): did not find expected key while parsing a block mapping at line 40 column 3

I also tried making the swapfile, but I couldn’t tell which directory I needed to be in (didn’t understand “opened to your droplet”). Running the first line gave the error

install: cannot remove ‘/swapfile’: Operation not permitted

I tried in the “discourse” directory and the root directory for the server.

Hmm, I just did a copy-paste of the app.yml you previously posted and it passed fine.

Make sure that line begins with a 2 spaces indent and not a 2 space-tab indent.

2 Likes

Then what you pasted here doesn’t match what you have in your app.yml. As what is pasted parses just fine.

Swap won’t solve a yaml error. That is purely 100% an issue with your app.yml file. However, if you still want to setup swap, please follow

1 Like

cpradio, you posted the exact same link that Steven did, and I explained how it wasn’t clear/didn’t work.

As for the yml file, I replaced the sensitive fields with stuff like <password> and <email list>. Of course it doesn’t match what’s in my yml file (that’s the point). However… that was a pretty good hint to go look at the fields I replaced. Went through and found that for <email list> I had

'user1@example.com','user2@example.com'

Which is NOT how the example says to do it. I removed the two middle single quotation marks and the yml parsed and the forum updated. I got a “502 Bad Gateway”, but a quick search told me to do

./launcher cleanup
./launcher start app

And my site is up and running. No clue why it was running before the update and died right after, but that’s not really important now. Thanks for the help, everyone.

4 Likes

Okay, to clarify.

‘opened to your droplet’ simply means SSH’d into your droplet. As for the error you received, it could be that you already have swap enabled. If you run the command free -m, does it have a line pertaining to swap already? If so, are the values higher than 0? And if they are, you already have swap, the bigger question is, what are the values? (to determine if you have enough swap and a screenshot of the entire free -m output would be preferred)

That makes perfect sense. I would have never guessed that the developer email list could be the problem, I’ve never seen that error related to that before. So I’m glad you discovered that. :slight_smile:

1 Like

i was having the same issues with this code

(<unknown>): could not find expected ':' while scanning a simple key at line 111 column 1 -e LANG=en_US.UTF-8

although i didn’t make any changes, only ran the most recent update. i tried:

./launcher cleanup
./launcher start app

and that shut the forum down completely. now i get a 502 badgateway error. inside terminal i still get the original error message. Any ideas how to fix it?

http://www.yamllint.com says it’s valid

Can you post a version of your app.yml with the sensitive fields censored?

@Stephen thanks for your reply. i’m not sure i can, its not loading and i get the error ./launcher: No such file or directory when i make any command. i didn’t really do anything to it but obviously i’ve broken something. i’ll try turning the instance off on digital ocean and back on again

cd/var/discourse: No such file or directory

…hmm

i ran ./launcher cleanup

as advised in other places here. have i done something very wrong

So from a fresh SSH session if you type:

cd /var/discourse

You get that error?

Did you use ./launcher enter app at any point during this?

launcher is only available within that path.

Ok, have you used rm or mv at all?

yes. i don’t think i did anything else after the app.yml file failed

no

also no to rm and mv

And do you still see a 502 error from the server?

i did ./launcher stop app

yes.

(i need some more characters here)

In which case, are you sure it’s the right server? If /var/discourse is missing then nginx can’t be there to serve a 502.

What about docker ps ? What does it return?