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

Permission denied on SSL certificat #30

Open
thromera opened this issue Sep 9, 2014 · 15 comments
Open

Permission denied on SSL certificat #30

thromera opened this issue Sep 9, 2014 · 15 comments

Comments

@thromera
Copy link

thromera commented Sep 9, 2014

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
Copy link

+1

@alejo90
Copy link

alejo90 commented Sep 10, 2014

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

@vshulyak
Copy link

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
Copy link
Author

@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
Copy link

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
Copy link
Contributor

ravster commented Oct 2, 2014

+1. I'm seeing this error too.

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

@balboah
Copy link

balboah commented Oct 10, 2014

+1

@bananos
Copy link

bananos commented Oct 21, 2014

+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 moby/moby#783

Any workaround?

@mlvn23
Copy link

mlvn23 commented Nov 1, 2014

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
Copy link

Well, there seems to be problem with devicemapper too, as mentioned in moby/moby#4860. So, it seems, that it would be better to rebuild the image, as mentioned by @Erowlin

@verdverm
Copy link

I tried using devicemapper as a backend and started running into this issue:
moby/moby#4036

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

@miloskroulik
Copy link

I've created pull request based on @Erowlin's comment at #38 It works fine.

@soupdiver
Copy link

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

@oyvindsk
Copy link

+1

@zachlatta
Copy link

Running into this issue as well.

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