Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FATAL: could not access private key file "/etc/ssl/private/ssl-cert-snakeoil.key": Permission denied #3

Open
warmwater opened this issue Jul 21, 2014 · 6 comments

Comments

@warmwater
Copy link

Hi
When I try to run initdb then run startdb (or service postgresql start),it keeps showing following error message:

FATAL: could not access private key file "/etc/ssl/private/ssl-cert-snakeoil.key": Permission denied

@homme
Copy link
Member

homme commented Jul 23, 2014

I am assuming you are mounting the same volume from the host when running initdb and startdb. Do you get the same problem when running the commands in series in the same container e.g.

docker run -v /tmp/osm-postgresql:/var/lib/postgresql homme/openstreetmap-tiles initdb startdb

Also do a docker pull homme/openstreetmap-tiles to ensure you are running an up to date image.

@warmwater
Copy link
Author

Thanks for response

yes I encounter the same problem when I run the commands in series

@warmwater
Copy link
Author

Temp solution: I disabled ssl in postgresql.conf, then "run startdb" works fine now.

I create a container and "run initdb" using the bash prompt. Then edit postgresql.conf to set ssl disabled, then "run startdb", and it works.

So I continued to "run createuser createdb", all looks good. However, I can not find "migrate" function in run script. What does this function do? and where do I find it?

anyway, I can import osm file and start service now. I am happy :)

Thanks for help.

@clkao
Copy link

clkao commented Sep 7, 2014

This is likely caused by using docker aufs storage backend. switching to devicemapper or btrfs should fix this.

@PoCk3T
Copy link

PoCk3T commented Nov 19, 2014

@warmwater : how did you disabled ssl in postgresql.conf ?

I went to /data/osm-postgresql/9.3/main/postgresql.conf, uncommented the "ssl = off" line, tried to "startdb" again, even "initdb startdb", but ....

I still got the very same error related to "FATAL: could not access private key file "/etc/ssl/private/ssl-cert-snakeoil.key": Permission denied"

What did I do wrong ?

Thanks in advance :)

@PoCk3T
Copy link

PoCk3T commented Nov 21, 2014

My own workaround:

Just after you installed Docker, add this line to /etc/default/docker:
DOCKER_OPTS="--storage-driver=devicemapper"

Worked like a charm for me :)

PS : source = Painted-Fox/docker-postgresql#30 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants