# Failed to bootstrap, also 500 error loading any page

**URL:** https://meta.discourse.org/t/failed-to-bootstrap-also-500-error-loading-any-page/40468
**Category:** Support
**Created:** [March 2, 2016, 11:20pm UTC](https://meta.discourse.org/t/failed-to-bootstrap-also-500-error-loading-any-page/40468 "2016-03-02T23:20:12Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![robreed](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robreed/32/36296_2.png) [@robreed](https://meta.discourse.org/u/robreed)
#### Post date: [March 2, 2016, 11:20pm UTC](https://meta.discourse.org/t/failed-to-bootstrap-also-500-error-loading-any-page/40468/1 "2016-03-02T23:20:12Z")

</div>

Received bundler out of date message updating Discourse, so I built the container as advised. That seemed to work except that I got a message that there was already a server running on port 80. Tried rebooting the server. Now server’s throwing off a 500 error loading any page.

Admittedly I’m out of my depth with docker and discourse.

Tried rebuilding container bc… no good reason which generates the following error.

```
FAILED
--------------------
RuntimeError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 297 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:105:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --verbose --without test --without development'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}

```

I’m open to any suggestions. Thanks in advance.

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [March 2, 2016, 11:21pm UTC](https://meta.discourse.org/t/failed-to-bootstrap-also-500-error-loading-any-page/40468/2 "2016-03-02T23:21:29Z")

</div>

What do the previous errors say?

---

<div class="post-metadata">

### Author: ![robreed](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robreed/32/36296_2.png) [@robreed](https://meta.discourse.org/u/robreed)
#### Post date: [March 2, 2016, 11:50pm UTC](https://meta.discourse.org/t/failed-to-bootstrap-also-500-error-loading-any-page/40468/3 "2016-03-02T23:50:28Z")

</div>

Rerunning ./launcher rebuild app, the only errors…

```
database "discourse" already exists
...
role "discourse" already exists
...
column "like_notification_frequency" of relation "user_options" already exists
...
StandardError: An error has occurred, this and all later migrations canceled:
...
FATAL: xlog flush request 0/E91964B8 is not satisfied --- flushed only to 0/E9159030

```

…

and the process ends

```
2016-03-02 23:41:44 UTC [67-6] LOG: abnormal database system shutdown
195:M 02 Mar 23:41:44.148 # User requested shutdown...
195:M 02 Mar 23:41:44.149 * Saving the final RDB snapshot before exiting.
195:M 02 Mar 23:41:44.271 * DB saved on disk
195:M 02 Mar 23:41:44.272 # Redis is now ready to exit, bye bye...

```

Thanks

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [March 3, 2016, 12:54am UTC](https://meta.discourse.org/t/failed-to-bootstrap-also-500-error-loading-any-page/40468/4 "2016-03-03T00:54:56Z")

</div>

Something _really_ bad is going on here. Your database is in a completely pantsed state. `xlog flush request is not satisfied` smells… diskspacey, maybe? At any rate, you’ve broken something real good. How’s your backups?

Please paste the output of `df -h`, `free -m`, `docker info` and `docker version`.

---

<div class="post-metadata">

### Author: ![robreed](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robreed/32/36296_2.png) [@robreed](https://meta.discourse.org/u/robreed)
#### Post date: [March 3, 2016, 2:29am UTC](https://meta.discourse.org/t/failed-to-bootstrap-also-500-error-loading-any-page/40468/5 "2016-03-03T02:29:27Z")

</div>

> [@mpalmer](#):
>
> How’s your backups?

Ha 🙂

I have a snapshot from like December. I have a Discourse backup from today, yesterday, and so on.

```
df -h
Filesystem Size Used Avail Use% Mounted on
udev 486M 0 486M 0% /dev
tmpfs 100M 8.5M 91M 9% /run
/dev/disk/by-label/DOROOT 30G 16G 13G 57% /
tmpfs 497M 0 497M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 497M 0 497M 0% /sys/fs/cgroup
tmpfs 100M 0 100M 0% /run/user/0

free -m
             total used free shared buffers cached
Mem: 993 466 526 7 61 238
-/+ buffers/cache: 167 825
Swap: 2047 0 2047

docker --info
flag provided but not defined: --info

docker --version
Docker version 1.9.1, build a34a1d5

```

Thanks again.

---

<div class="post-metadata">

### Author: ![Steven](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steven/32/187890_2.png) [@Steven](https://meta.discourse.org/u/Steven)
#### Post date: [March 3, 2016, 3:59pm UTC](https://meta.discourse.org/t/failed-to-bootstrap-also-500-error-loading-any-page/40468/6 "2016-03-03T15:59:45Z")

</div>

If you have a recent backup maybe this could help :

> [@riking](#):
>
> ## Example: Delete a corrupted database
> 
> Sometimes you screw up the database and need to restore from a backup. However, if the broken database is making the site unusable, you may not be able to get to /admin/backups to upload and restore the old backup. When this happens, you will want to nuke the database.
> 
> From the host:
> 
> `root@discourse:~# cd /var/discourse`  
> `root@discourse:/var/discourse# ./launcher destroy app`  
> `root@discourse:/var/discourse# echo rm -rv shared/standalone/postgres_*`  
> `rm -rv shared/standalone/postgres_backup shared/standalone/postgres_data shared/standalone/postgres_data_old shared/standalone/postgres_run`  
> `root@discourse:/var/discourse# ./launcher bootstrap app`  
> `root@discourse:/var/discourse# ./launcher start app`

([**Source**](https://meta.discourse.org/t/advanced-troubleshooting-with-docker/15927))

---

<div class="post-metadata">

### Author: ![robreed](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robreed/32/36296_2.png) [@robreed](https://meta.discourse.org/u/robreed)
#### Post date: [March 3, 2016, 5:58pm UTC](https://meta.discourse.org/t/failed-to-bootstrap-also-500-error-loading-any-page/40468/7 "2016-03-03T17:58:57Z")

</div>

That worked. Thanks for all of your help @mpalmer and @Steven. The outcome wouldn’t have been as good without you.

I’m stuck with an original issue that started me down this path in the first place, but that’s another issue.

To be clear, I consider this issue to be resolved.

Cheers

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [March 4, 2016, 12:04am UTC](https://meta.discourse.org/t/failed-to-bootstrap-also-500-error-loading-any-page/40468/8 "2016-03-04T00:04:24Z")

</div>

Also that should have been `docker info` not `docker --info` sorry about that. I guess in the future it’s just

```
docker info
docker version

```

that seems to work on my box.

---

<div class="post-metadata">

### Author: ![robreed](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robreed/32/36296_2.png) [@robreed](https://meta.discourse.org/u/robreed)
#### Post date: [March 4, 2016, 4:50pm UTC](https://meta.discourse.org/t/failed-to-bootstrap-also-500-error-loading-any-page/40468/9 "2016-03-04T16:50:46Z")

</div>

Yep that works for me. That was my fault.

`docker --help` clearly makes a distinction between options and commands.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [December 25, 2018, 5:42pm UTC](https://meta.discourse.org/t/failed-to-bootstrap-also-500-error-loading-any-page/40468/10 "2018-12-25T17:42:45Z")

</div>



---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [December 25, 2018, 8:42pm UTC](https://meta.discourse.org/t/failed-to-bootstrap-also-500-error-loading-any-page/40468/11 "2018-12-25T20:42:58Z")

</div>


