Painted-Fox / docker-postgresql

A dockerfile that produces a docker image that runs postgresql.
MIT License
72 stars 57 forks source link

Permission denied on SSL certificat #30

Open thromera opened 10 years ago

thromera commented 10 years ago

Fresh install, docker pull paintedfox/postgresql and

 docker run -d --name="postgresql" \
             -p 127.0.0.1:5432:5432 \
             -v /tmp/postgresql:/data \
             -e USER="super" \
             -e DB="database_name" \
             -e PASS="$(pwgen -s -1 16)" \
             paintedfox/postgresql

Here is the log :

POSTGRES_USER=super POSTGRES_PASS=xxx POSTGRES_DATA_DIR=/data POSTGRES_DB=database_name Starting PostgreSQL... Couldn't initialize inotify. Are you running Linux 2.6.13 or later, and was the CONFIG_INOTIFY option enabled when your kernel was compiled? If so, something mysterious has gone wrong. Please e-mail radu.voicilas@gmail.com and mention that you saw this message. 2014-09-09 13:07:23 UTC FATAL: could not access private key file "/etc/ssl/private/ssl-cert-snakeoil.key": Permission denied

theshapguy commented 10 years ago

+1

alejo90 commented 10 years ago

It has something to do with phusion/baseimage. I reverted it to phusion/baseimage:0.9.10 and it worked.

vshulyak commented 10 years ago

Ok, found a solution. Build a new image with --no-cache option from Dockerfile. And probably the image needs to be rebuilt? @Painted-Fox ?

Seems like it's a bug with AuFS mentioned by jpetazzo, not sure if it's relevant though.

thromera commented 10 years ago

@alejo90 yes, it's the phusion/baseimage. I moved to phusion/baseimage:0.9.13 and everything works fine. @vshulyak I don't know if @Painted-Fox has something to do with his DockerFile, or if it 's a bug caused by phusion/baseimage...

mikeywaites commented 10 years ago

Im still seeing this issue using the current build from the docker registry.

==> postgres: 2014-09-30 03:32:36 UTC FATAL:  could not access private key file "/etc/ssl/private/ssl-cert-snakeoil.key": Permission denied
==> postgres: POSTGRES_DATA_DIR=/data
==> postgres: POSTGRES_DB=test
==> postgres: Starting PostgreSQL...
==> postgres: Couldn't initialize inotify.  Are you running Linux 2.6.13 or later, and was the
==> postgres: CONFIG_INOTIFY option enabled when your kernel was compiled?  If so,
==> postgres: something mysterious has gone wrong.  Please e-mail radu.voicilas@gmail.com
==> postgres:  and mention that you saw this message.
ravster commented 10 years ago

+1. I'm seeing this error too.

Postgres is starting up when the image is built with the --no-cache option, though.

balboah commented 9 years ago

+1

bananos commented 9 years ago

+1

2014-10-21 20:08:35 UTC FATAL:  could not access private key file "/etc/ssl/private/ssl-cert-snakeoil.key": Permission denied
POSTGRES_USER=super
POSTGRES_PASS=12345
POSTGRES_DATA_DIR=/data
POSTGRES_DB=cldb
Starting PostgreSQL...
2014-10-21 20:08:36 UTC FATAL:  could not access private key file "/etc/ssl/private/ssl-cert-snakeoil.key": Permission denied

Here's the original Docker/AuFS bug https://github.com/docker/docker/issues/783

Any workaround?

mlvn23 commented 9 years ago

I also encountered this issue, and the work-around is to use devicemapper instead of AUFS.

Add this line in /etc/default/docker:

DOCKER_OPTS="--storage-driver=devicemapper"

and restart the docker service.

miloskroulik commented 9 years ago

Well, there seems to be problem with devicemapper too, as mentioned in https://github.com/docker/docker/issues/4860. So, it seems, that it would be better to rebuild the image, as mentioned by @Erowlin

verdverm commented 9 years ago

I tried using devicemapper as a backend and started running into this issue: https://github.com/docker/docker/issues/4036

Still have the original AUFS problem w/o the dm backend

miloskroulik commented 9 years ago

I've created pull request based on @Erowlin's comment at https://github.com/Painted-Fox/docker-postgresql/pull/38 It works fine.

soupdiver commented 9 years ago

it would be nice to have an updated version pushed to the registry

oyvindsk commented 9 years ago

+1

zachlatta commented 9 years ago

Running into this issue as well.