FAILED TO BOOTSTRAP on setup

This error on setup Discourse:

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && gem update bundler failed with return #<Process::Status: pid 297 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"web", "cmd"=>["gem update bundler", "find $home ! -user discourse -exec chown discourse {} \\+"]}
d85fae83cd3f933238f0e21e6e562469400baf63643d9c6dcd138c739dfa0830
** 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.

I tried some solutions, it didn’t work.

1 Like

Did you try discourse doctor?

1 Like
./discourse-doctor
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && gem update bundler failed with return #<Process::Status: pid 298 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"web", "cmd"=>["gem update bundler", "find $home ! -user discourse -exec chown discourse {} \\+"]}
00e8acc18f87b395d0b4f8de4d859dad8c8824b148243fa8f0c6085e5b0982a4
** 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.
==================== END REBUILD LOG ====================
Failed to rebuild app.

Checking your domain name . . .

Connection to sosyal.dursuncanpoyraz.com.tr succeeded.
You should probably remove any non-standard plugins and rebuild.
Attempting to restart existing container. . . 

+ /usr/bin/docker run --shm-size=512m -d --restart=always -e LANG=en_US.UTF-8 -e RAILS_ENV=production -e UNICORN_WORKERS=4 -e UNICORN_SIDEKIQS=1 -e RUBY_GLOBAL_METHOD_CACHE_SIZE=131072 -e RUBY_GC_HEAP_GROWTH_MAX_SLOTS=40000 -e RUBY_GC_HEAP_INIT_SLOTS=400000 -e RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=1.5 -e DISCOURSE_DB_SOCKET=/var/run/postgresql -e DISCOURSE_DB_HOST= -e DISCOURSE_DB_PORT= -e LETSENCRYPT_DIR=/shared/letsencrypt -e DISCOURSE_DEFAULT_LOCALE=en -e DISCOURSE_HOSTNAME=sosyal.dursuncanpoyraz.com.tr -e DISCOURSE_DEVELOPER_EMAILS=poyrazdursuncan@gmail.com -e DISCOURSE_SMTP_ADDRESS=smtp.gmail.com -e DISCOURSE_SMTP_PORT=587 -e DISCOURSE_SMTP_USER_NAME=poyrazdursuncan@gmail.com -e 'DISCOURSE_SMTP_PASSWORD=Poyraz!19681973' -e DISCOURSE_SMTP_ENABLE_START_TLS=true -e LETSENCRYPT_ACCOUNT_EMAIL= -h localhost-app -e DOCKER_HOST_IP=172.17.0.1 --name app -t -p 80:80 -p 443:443 -v /var/discourse/shared/standalone:/shared -v /var/discourse/shared/standalone/log/var-log:/var/log --mac-address 02:78:00:1c:c3:10 local_discourse/app /sbin/boot
Unable to find image 'local_discourse/app:latest' locally
docker: Error response from daemon: pull access denied for local_discourse/app, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
Failed to restart the container.


==================== PLUGINS ====================
          - git clone https://github.com/discourse/docker_manager.git

No non-official plugins detected.

See https://github.com/discourse/discourse/blob/master/lib/plugin/metadata.rb for the official list.

========================================
1 Like

Please include a few more lines above the FAILED message. I’m assuming this is a fresh install? If not, did you make any changes to app.yml file?

1 Like

It looks like docker can’t pull the base image. I’ve seen this happen, I think, when I’d previously logged in to docker hub but the login expired? Or you’ve hit rate limits?

2 Likes

Could the problem be from the security rule on the virtual server? The first day I entered the virtual server, it gave the same error.

Edit:
I don’t know docker. I started learning yesterday. I pulled at most 20 images yesterday.

1 Like

No solution? Is there anyone to help?

You can try spinning up a new vm and /or running a trivial docker program. They have some hello world kind of thing. You can see if docker works at all.

1 Like

Docker works. I installed teamspeak3 with docker. I even installed nginx and tested port 80. But it gives an error at discourse’s command.

I started setup from scratch.

root@localhost:~# su -
root@localhost:~# git clone https://github.com/discourse/discourse_docker.git /var/discourse
Cloning into '/var/discourse'...
remote: Enumerating objects: 5025, done.
remote: Total 5025 (delta 0), reused 0 (delta 0), pack-reused 5025
Receiving objects: 100% (5025/5025), 1.10 MiB | 2.40 MiB/s, done.
Resolving deltas: 100% (3259/3259), done.
root@localhost:~# cd /var/discourse
root@localhost:/var/discourse# ./discourse-setup
Docker not installed. Enter to install from https://get.docker.com/ or Ctrl+C to exit
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 13857  100 13857    0     0   6805      0  0:00:02  0:00:02 --:--:--  6809
# Executing docker install script, commit: 3d8fe77c2c46c5b7571f94b42793905e5b3e42e4
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ sh -c curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" | apt-key add -qq - >/dev/null
Warning: apt-key output should not be parsed (stdout is not a terminal)
+ sh -c echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" > /etc/apt/sources.list.d/docker.list
+ sh -c apt-get update -qq >/dev/null
+ [ -n  ]
+ sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
+ sh -c docker version
Client: Docker Engine - Community
 Version:           20.10.2
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        2291f61
 Built:             Mon Dec 28 16:17:32 2020
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.2
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       8891c58
  Built:            Mon Dec 28 16:15:09 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.3
  GitCommit:        269548fa27e0089a8b8278fc4fc781d7f65a939b
 runc:
  Version:          1.0.0-rc92
  GitCommit:        ff819c7e9184c13b7c2607fe6c30ae19403a7aff
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:

  sudo usermod -aG docker your-user

Remember that you will have to log out and back in for this to take effect!

WARNING: Adding a user to the "docker" group will grant the ability to run
         containers which can be used to obtain root privileges on the
         docker host.
         Refer to https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
         for more information.
Port 80 appears to already be in use.

This will show you what command is using port 80
COMMAND  PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
nginx    958     root    8u  IPv4  20899      0t0  TCP *:http (LISTEN)
nginx    958     root    9u  IPv6  20901      0t0  TCP *:http (LISTEN)
nginx   3368 www-data    8u  IPv4  20899      0t0  TCP *:http (LISTEN)
nginx   3368 www-data    9u  IPv6  20901      0t0  TCP *:http (LISTEN)

If you are trying to run Discourse simultaneously with another web
server like Apache or nginx, you will need to bind to a different port

See https://meta.discourse.org/t/17247

If you are reconfiguring an already-configured Discourse, use 

./launcher stop app

to stop Discourse before you reconfigure it and try again.`
root@localhost:/var/discourse# ./launcher stop app

WARNING: We are about to start downloading the Discourse base image
This process may take anywhere between a few minutes to an hour, depending on your network speed

Please be patient

2.0.20201221-2020: Pulling from discourse/base
6ec7b7d162b2: Pull complete 
488a5181297e: Extracting [========================>                          ]  384.9MB/775.2MB
^C
root@localhost:/var/discourse# ./launcher stop app

WARNING: We are about to start downloading the Discourse base image
This process may take anywhere between a few minutes to an hour, depending on your network speed

Please be patient

2.0.20201221-2020: Pulling from discourse/base
6ec7b7d162b2: Pull complete 
488a5181297e: Pull complete 
Digest: sha256:e181dd9046cc293b10c5b29bbc21c5aa8b939ba5f0c500da4a9e952ed0b5195d
Status: Downloaded newer image for discourse/base:2.0.20201221-2020
docker.io/discourse/base:2.0.20201221-2020
Config file was not found, ensure containers/app.yml exists

ls: cannot access '*.yml': No such file or directory
Available configs ( )

Like it shows, you can’t use discourse setup if something is running on port 80 or 443.

2 Likes

Yes it works. How can I change the Nginx port for Discourse? I have Ghost installed on my server. Why can’t I use it on port 80 and 443?