YAML syntax error -- control characters are not allowed at line 1 column 1

On setting up I have the following error:

(<unknown>): control characters are not allowed at line 1 column 1 -e LANG=en_US.UTF-8
YAML syntax error. Please check your containers/*.yml config files.

My password does not have any special characters. I just accidentally included some-don’t ask!

My app.yml file looks like this…

Any ideas?

Was this file created using discourse-setup, or manually?

1 Like

I’m not entirely sure @Stephen. My guess would be manually.

How did you install the instance?

By following discourse/INSTALL-cloud.md at master · discourse/discourse · GitHub

Ok, so in that guide you’re told to use: ./discourse-setup which autogenerates the yml file for you. The quickest solution is to re-run it and provide all the correct details.

The YML syntax is sometimes a sticking problem for the unfamiliar, the setup tool will bypass your needing to decipher it.

1 Like

Ok, I have actually rerun the ./discourse-setup again and same problem occurs.

Ok, which symbols exist in your passwords?

Characters such as quotes " should be avoided.

Turns out there’s no strange characters in my SMTP password now. Yet I’m still getting the error.

This has caught some oddball issues for me before, not sure if you’re already tried it.

http://www.yamllint.com/

1 Like

Ok, it is sorted now. Started afresh this morning and entered everything REALLY carefully. Process running and expected now. Must have entered something really minute.

Thanks for your responses.

2 Likes

I see you solved this already, but in my experience weird control characters at the beginning of a file usually result from editing in some GUI editor that likes to add the byte-order mark to text files. They could be invisible, but when you run some tool like hexdump -C on them, you see the extra bytes:

00000000  ef bb bf 73 6f 6d 65 20  74 65 78 74 20 68 65 72  |...some text her|
00000010  65 0a                                             |e.|
00000012
3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.