Missing /shared/postgres_data and redis_data after upgrade


(Marijn Haverbeke) #1

After upgrading my instance the docker container is only returning Bad Gateway responses. At the end of ./launcher logs it says (repeatedly):

368:C 27 May 09:56:35.591 # Can't chdir to '/shared/redis_data': No such file or directory
2016-05-27 09:56:36 UTC [369-1] FATAL:  data directory "/shared/postgres_data" does not exist

And indeed, when I look inside of the container, the only thing in /shared are some things that the instance apparently created itself, so the mounting is failing. Here’s my app.yml on pastebin.

Any idea what might be going on? For now, my sites are down and I don’t know how to proceed.


(Alan Tan) #2

Can you check if the folders are in /var/discourse/shared/standalone?


(Marijn Haverbeke) #3

Yes, they are there.

Downgrading docker from 1.11 (from docker’s own apt distribution) to 1.6 (debian package) helped, but now I can’t run the latest version of Discourse anymore, since it requires 1.8


(Alan Tan) #4

Hmm that is odd, can you try docker 1.11 again and rebuild? This time run docker inspect <container name> and see if the folders have been mounted properly.


(Sam Saffron) #5

You want to upgrade docker, older versions have plenty of issues.

In addition to inspect can you do docker info and docker version after upgrading ?


(Marijn Haverbeke) #6

@sam Upgrading docker is exactly what triggered this issue.

@tgxworld They had definitely not been mounted. I didn’t store the output of docker inspect, but will report back here when I have the time to try again.


(Ben M) #7

I have this exact same problem too. Just upgraded Docker to 1.11.1.

I can try out whatever suggestions people have.


(Ben M) #8

Ok, I can confirm that a further destroy/bootstrap/start cycle appears to have fixed it.


(Marijn Haverbeke) #9

Is a destroy before a bootstrap significant? I ended up running at least 5 bootstraps when I was struggling with this, but didn’t try destroy.


(Sam Saffron) #10

Just use the rebuild command, it does everything

Bootstrap creates an image, but to bring it into play you have to destroy the old image


(Marijn Haverbeke) #11

That appears to have been the problem. The first rebuild after upgrading ended by telling me to run bootstrap (and that it’d backed up the postgres data). I did that, and that ended by telling me I could now run start to start the app. So that’s what I did but I guess that wasn’t enough? Doing a full rebuild fixed the problem.


(jon r) #12

This thread seems useful in pointing to the right direction: