Found character that cannot start any token while scanning for the next token at line 86 column 1 -e LANG=en_US.UTF-8


#1

For some reason it appears my discourse/docker instance crashed and trying to start the app with launcher start app results in:

starting up existing container
+ /usr/bin/docker start app
app

but then visiting the site I have a completely blank screen

Then trying a launcher rebuild app results in the following error message:

Ensuring discourse docker is up to date
Fetching origin
Discourse Docker is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 10 app
app
(<unknown>): found character that cannot start any token while scanning for the next token at line 86 column 1 -e LANG=en_US.UTF-8
YAML syntax error. Please check your /var/discourse/containers/*.yml config files.

I’ve looked at my app.yaml and I’m not sure what is wrong?

The lines at that part of the config are:

env:
  LANG: en_US.UTF-8
  ## TODO: How many concurrent web requests are supported?
  ## With 2GB we recommend 3-4 workers, with 1GB only 2
  UNICORN_WORKERS: 2
  ##

Any troubleshooting ideas greatly appreciated as our site is completely offline now :frowning:

edit
I’ve also run full apt-get updates/dist-upgrade etc and updated all packages to latest. Actually the service did finally manage to start, but I’m still unable to rebuild the app due to the above error.


#2

ok As it turns out, our log files were completely filling up the server disk space, our docker instance’s access.log ended up taking up a whopping 17gb! I found this thread: Docker install allows nginx log files to keep growing?

Which recommends a git pull and rebuild, which is what I’ve been trying to accomplish anyhow, so any tips would still be greatly appreciated!


#3

Another unfortunate disk space hog I noticed was /var/lib/docker/aufs with a huge 13.4gb, so combined these two directories are using over 30gb of disk space =\

I found this thread Docker - Diff very big, how to clean?

which also mentions an update and rebuild, so it would be great to figure out how to take care of this error and rebuild the app!


(Kane York) #4

Try apt-get clean, then ./launcher cleanup app, then a rebuild.


#5

Unfortunately this didn’t work :frowning:
./launcher cleanup app did manage to free some space, but the rebuild still fails:

Ensuring discourse docker is up to date
Fetching origin
remote: Counting objects: 12, done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 12 (delta 2), reused 1 (delta 1), pack-reused 3
Unpacking objects: 100% (12/12), done.
From https://github.com/discourse/discourse_docker
   4b733d8..9473d53  master     -> origin/master
Updating Discourse Docker
Updating 4b733d8..9473d53
Fast-forward
 launcher                          |  15 -------
 scripts/mailtest                  | 179 -----------------------------------------------------------------------------
 templates/cloudflare.template.yml |  22 ++++++++++
 3 files changed, 22 insertions(+), 194 deletions(-)
 delete mode 100755 scripts/mailtest
 create mode 100644 templates/cloudflare.template.yml
Ensuring discourse docker is up to date
Fetching origin
Discourse Docker is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 10 app
app
(<unknown>): found character that cannot start any token while scanning for the next token at line 86 column 1 -e LANG=en_US.UTF-8
YAML syntax error. Please check your /var/discourse/containers/*.yml config files.

(Kane York) #6

Oh yeah, that means you screwed up your YML file. Use an online YAML validator like http://yamllint.com .


#7

Ah right you are, it’s so strange because the console was reporting the
offending LANG: en_US.UTF-8 (which was on line 36), yet accurately the
incorrect tabspacing on line 86.

Worked perfectly and this freed 22gb of space on our server!