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

**URL:** https://meta.discourse.org/t/found-character-that-cannot-start-any-token-while-scanning-for-the-next-token-at-line-86-column-1-e-lang-en-us-utf-8/30795
**Category:** Self-hosting
**Created:** [2015 年 7 月 5 日午後 12:51 UTC](https://meta.discourse.org/t/found-character-that-cannot-start-any-token-while-scanning-for-the-next-token-at-line-86-column-1-e-lang-en-us-utf-8/30795 "2015-07-05T12:51:00Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![kkershaw](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kkershaw/32/115025_2.png) [@kkershaw](https://meta.discourse.org/u/kkershaw)
#### Post date: [2015 年 7 月 5 日午後 12:51 UTC](https://meta.discourse.org/t/found-character-that-cannot-start-any-token-while-scanning-for-the-next-token-at-line-86-column-1-e-lang-en-us-utf-8/30795/1 "2015-07-05T12:51:00Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![kkershaw](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kkershaw/32/115025_2.png) [@kkershaw](https://meta.discourse.org/u/kkershaw)
#### Post date: [2015 年 7 月 5 日午後 1:18 UTC](https://meta.discourse.org/t/found-character-that-cannot-start-any-token-while-scanning-for-the-next-token-at-line-86-column-1-e-lang-en-us-utf-8/30795/2 "2015-07-05T13:18:56Z")

</div>

**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? - #9 by sam](https://meta.discourse.org/t/docker-install-allows-nginx-log-files-to-keep-growing/26518/9)

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!

---

<div class="post-metadata">

### Author: ![kkershaw](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kkershaw/32/115025_2.png) [@kkershaw](https://meta.discourse.org/u/kkershaw)
#### Post date: [2015 年 7 月 6 日午前 8:23 UTC](https://meta.discourse.org/t/found-character-that-cannot-start-any-token-while-scanning-for-the-next-token-at-line-86-column-1-e-lang-en-us-utf-8/30795/3 "2015-07-06T08:23:36Z")

</div>

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 [https://meta.discourse.org/t/docker-diff-very-big-how-to-clean/12696/5](https://meta.discourse.org/t/docker-diff-very-big-how-to-clean/12696/5)

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!

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [2015 年 7 月 6 日午後 9:09 UTC](https://meta.discourse.org/t/found-character-that-cannot-start-any-token-while-scanning-for-the-next-token-at-line-86-column-1-e-lang-en-us-utf-8/30795/4 "2015-07-06T21:09:21Z")

</div>

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

---

<div class="post-metadata">

### Author: ![kkershaw](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kkershaw/32/115025_2.png) [@kkershaw](https://meta.discourse.org/u/kkershaw)
#### Post date: [2015 年 7 月 7 日午後 4:14 UTC](https://meta.discourse.org/t/found-character-that-cannot-start-any-token-while-scanning-for-the-next-token-at-line-86-column-1-e-lang-en-us-utf-8/30795/5 "2015-07-07T16:14:22Z")

</div>

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.

```

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [2015 年 7 月 7 日午後 4:51 UTC](https://meta.discourse.org/t/found-character-that-cannot-start-any-token-while-scanning-for-the-next-token-at-line-86-column-1-e-lang-en-us-utf-8/30795/6 "2015-07-07T16:51:37Z")

</div>

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

---

<div class="post-metadata">

### Author: ![kkershaw](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kkershaw/32/115025_2.png) [@kkershaw](https://meta.discourse.org/u/kkershaw)
#### Post date: [2015 年 7 月 7 日午後 6:17 UTC](https://meta.discourse.org/t/found-character-that-cannot-start-any-token-while-scanning-for-the-next-token-at-line-86-column-1-e-lang-en-us-utf-8/30795/7 "2015-07-07T18:17:53Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [2024 年 6 月 8 日午後 12:46 UTC](https://meta.discourse.org/t/found-character-that-cannot-start-any-token-while-scanning-for-the-next-token-at-line-86-column-1-e-lang-en-us-utf-8/30795/8 "2024-06-08T12:46:07Z")

</div>

このトピックは3260日後に自動的に閉じられました。新しい返信は許可されなくなりました。
