Kloadut / dokku-pg-plugin

PostgreSQL plugin for Dokku
201 stars 75 forks source link

Recovering from crash #57

Open wackytobaccy opened 10 years ago

wackytobaccy commented 10 years ago

So I've got this plugin running on a DigitalOcean. I Power Cycled the instance on accident. Now my app won't start at all. Here's the output on pushing to the DO instance.

Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 368 bytes | 0 bytes/s, done.
Total 4 (delta 3), reused 0 (delta 0)
-----> Cleaning up ...
-----> Building APP_NAME_REDACTED ...
remote: Cloning into '/tmp/tmp.wC88GqdTqf'...
remote: done.
remote: HEAD is now at fc1c707... shit
       Python app detected
-----> Installing dependencies with pip
       Cleaning up...
-----> Discovering process types
       Procfile declares types -> web
-----> Releasing APP_NAME_REDACTED ...
-----> Deploying APP_NAME_REDACTED ...
-----> Checking status of PostgreSQL
       Found image postgresql/APP_NAME_REDACTED database
       Checking status... stopped.
remote: cat: /home/dokku/.postgresql/volume_APP_NAME_REDACTED: No such file or directory
To dokku@IP_ADDRESS_REDACTED:APP_NAME_REDACTED
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'dokku@IP_ADDRESS_REDACTED:APP_NAME_REDACTED'

Note that the database name is not APP_NAME_REDACTED, but actually APP_NAME_REDACTED-db. Also, ll in /home/dokku/.postgresql gives this:

total 16
drwxr-xr-x 2 dokku dokku 4096 Nov 10 11:45 ./
drwxr-xr-x 6 dokku root  4096 Oct  4 23:48 ../
-rwx------ 1 dokku dokku   17 Oct  9 00:01 pwd_APP_NAME_REDACTED-db*
-rw-r--r-- 1 dokku dokku   89 Oct  9 00:01 volume_APP_NAME_REDACTED-db

My instance has 512 mb of ram.

npham1 commented 9 years ago

Did you find the solution for this?

wackytobaccy commented 9 years ago

Heh, nope.

jonathan-nye commented 9 years ago

It looks like you should be able to use the link command to point to the right DB name: dokku postgresql:link APP_NAME_REDACTED APP_NAME_REDACTED-db

wackytobaccy commented 9 years ago

This is what I'm getting if I try that:

-----> Setting config vars and restarting APP_NAME
DATABASE_URL: postgres://root:REDACTED@REDACTED:/db
-----> Releasing APP_NAME ...
-----> Release complete!
-----> Deploying APP_NAME ...
-----> Checking status of PostgreSQL
       Found image postgresql/APP_NAME database
       Checking status... stopped.
cat: /home/dokku/.postgresql/volume_APP_NAME: No such file or directory

Weird that it's looking for APP_NAME instead of APP_NAME-db (which is the name of my db).

flakron commented 9 years ago

Just what I got today, when I had to restart my machine. This is holding me back from using the plugin in production.