Can't rebuild because ssh template is removed

We are trying to rebuild our discourse installation (as asked by the admin interface)
Here are the errors, please help, we are not verse in docker

    root@school-forum:/var/discourse# ./launcher rebuild app
    Ensuring launcher is up to date
    Fetching origin
    Launcher is up-to-date
    cat: templates/sshd.template.yml: No such file or directory
    cd /pups && git pull && /pups/bin/pups --stdin
    /usr/bin/docker: invalid reference format: repository name must be lowercase.
    See '/usr/bin/docker run --help'.
    cat: cids/app_bootstrap.cid: No such file or directory
    "docker rm" requires at least 1 argument.
    See 'docker rm --help'.

    Usage:  docker rm [OPTIONS] CONTAINER [CONTAINER...]

    Remove one or more containers
    rm: cannot remove ‘cids/app_bootstrap.cid’: No such file or directory
    ** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
    ./discourse-doctor may help diagnose the problem.
    root@school-forum:/var/discourse#

Please help – we dont’ seem to find people with similar problems recently.

Edit: after apt-get update/upgrade, I get a new error message:

/usr/bin/docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:297: copying bootstrap data to pipe caused \"write init-p: broken pipe\"": unknown.
Your Docker installation is not working correctly

See: https://meta.discourse.org/t/docker-error-on-bootstrap/13657/18?u=sam
root@school-forum:/var/discourse# ./launcher rebuild app
/usr/bin/docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:297: copying bootstrap data to pipe caused \"write init-p: broken pipe\"": unknown.
Your Docker installation is not working correctly

See: https://meta.discourse.org/t/docker-error-on-bootstrap/13657/18?u=sam
3 Likes

Have you rebooted after a docker upgrade? What version of os and docker do you have?

1 Like

I had this error myself.

I fixed it by editing App.yml and commenting that line in Templates. Use # to comment the line.

Rebuild app worked fine after.

1 Like

That file is missing after(not sure if it was there before) the git pull.

1 Like

That’s it!

https://github.com/discourse/discourse_docker/commit/8c8dbd03d41925da367ee7deb82dc0afd0305230

I edited the title to indicate the issue

3 Likes

After trying a few things. Figured just try commenting it out. Up until today’s post hadn’t found any one else had this rebuild issue. :beers::sunglasses::+1::sparkles:

4 Likes

Hi all, quick update: commenting out the line in app.yml fixed this problem, however the rebuild fails further along with this message:

cd /pups && git pull && /pups/bin/pups --stdin
fatal: unable to access 'https://github.com/discourse/pups.git/': Could not resolve host: github.com
1e4e6a45815a1196e4687a17e44a0beb1dd6229cd61ba2a3b657903e6cd2b56e
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.

Also ./discourse-doctor fails after trying to rebuild – with the same message

4 Likes

Sorry to hear. Likely need a team member to assist. As didn’t have an issue after.

I’ve been working with @multicam as we go through this, and it looks like it might be something to do with the DNS asigned by docker.

This is the best example of a similiar problem I could find, but their fixes didnt resolve it for us.

1 Like

Had this exact same problem upgrading from 2.4.2 to 2.4.3, with the log as follows:

Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 10 app
app
cat: templates/sshd.template.yml: No such file or directory
cd /pups && git pull && /pups/bin/pups --stdin
/usr/bin/docker: invalid reference format: repository name must be lowercase.
See '/usr/bin/docker run --help'.
cat: cids/app_bootstrap.cid: No such file or directory
"docker rm" requires at least 1 argument(s).
See 'docker rm --help'.

Usage:  docker rm [OPTIONS] CONTAINER [CONTAINER...]

Remove one or more containers
rm: cannot remove 'cids/app_bootstrap.cid': No such file or directory
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.

After running ./discourse-doctor app rebuild failed again but the container was restarted so the website is back to normal on version 2.4.2.

Any solutions so far?

Stop including the missing ssh template, as described here:

2 Likes

Sent in a PR to re-add the file, blank:

https://github.com/discourse/discourse_docker/pull/463

This should fix the errors for existing setups.


Additionally, sent another PR to actually give people a warning this is an issue:

https://github.com/discourse/discourse_docker/pull/464

4 Likes

This is solved @Heliosurge @tjands @snakeninny - do another ./launcher rebuild and it should work fine.

2 Likes