Users javenfang and Werner_M report failing Discourse installations due to a missing /root/.ssh/authorized_keys file in the container during ./launcher bootstrap app, despite following the official cloud install guide. Sander78 and codinghorror confirm using the official Docker install and recommend Ubuntu 14.04 x64 LTS. mpalmer investigates and suspects the issue stems from missing or misconfigured sshd.template.yml, which normally writes the authorized_keys file. javenfang shares their app.yml, copied from samples/standalone.yml, and tgxworld advises removing the last line referencing authorized_keys, citing a commit that deprecated it — this resolves the issue for javenfang. Later, sirideain notes the same error persists in the web_only container, even with SSH keys configured on the host VM. pfaffman clarifies that the command is intentional — it warns if no keys are present, and keys from the host are added to the container if available. sirideain confirms the line was removed from standalone but remains in web_only, raising questions about consistency.
I’ve tried many many times and different env, and try to search to resolve the problem. But I failed.
With installation from official doc, I always fail into the error reported:
I, [2016-02-02T03:25:19.047866 #38] INFO -- : > echo "Beginning of custom commands"
I, [2016-02-02T03:25:19.052456 #38] INFO -- : Beginning of custom commands
I, [2016-02-02T03:25:19.053237 #38] INFO -- : > echo "End of custom commands"
I, [2016-02-02T03:25:19.055437 #38] INFO -- : End of custom commands
I, [2016-02-02T03:25:19.055904 #38] INFO -- : > awk -F\# '{print $1;}' ~/.ssh/authorized_keys | awk 'BEGIN { print "Authorized SSH keys for this container:"; } NF>=2 {print $NF;}'
awk: fatal: cannot open file `/root/.ssh/authorized_keys' for reading (No such file or directory)
I, [2016-02-02T03:25:19.060638 #38] INFO -- : Authorized SSH keys for this container:
I, [2016-02-02T03:25:19.061065 #38] INFO -- : Terminating async processes
I’m running into the same issue.
I’ve set up an AWS EC2 running Ubuntu Trusty. Installed Docker following all the procedures described here (including all pre-requisites), everything checks fine and Docker started up cleanly.
Installed Discourse following the procedures outlined here. Configured the variables in /var/discourse/containers/app.yml file according to instructions and my current environment – btw, I know these settings are correct because I had previously installed Discourse in another Ubuntu Trusty server running Apache hosting a development website I use in a regular basis for debugging (the reason for moving Discourse to an EC2 instance is because I couldn’t get both the Apache Server and Docker running concurrently in the Ubuntu server).
So after doing all this, and upon running ./launcher bootstrap app
near the end of the bootstrap process I get that same error. Anyone with ideas on how to get past that and get Discourse running?
What file in samples did you copy into containers/app.yml? What changes did you make? Can you post the complete app.yml file here in the topic, so we can try to reproduce the problem?
It’s the authorized_keysin the container which isn’t being found. Normally, the sshd.template.yml file is where authorized_keys gets written. If that template is removed, that could definitely cause the problem you’re seeing.
[2018-08-23T13:32:36.971204 #14] INFO -- : > awk -F\# '{print $1;}' ~/.ssh/authorized_keys | awk 'BEGIN { print "Authorized SSH keys for this container:"; } NF>=2 {print $NF;}'
awk: fatal: cannot open file `/root/.ssh/authorized_keys' for reading (No such file or directory)