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

Postgres failing to start #1

Closed
chbrandt opened this issue Oct 22, 2015 · 4 comments
Closed

Postgres failing to start #1

chbrandt opened this issue Oct 22, 2015 · 4 comments
Labels

Comments

@chbrandt
Copy link
Member

Trying to start, postgres raises the following message

* Starting PostgreSQL 9.4 database server                                                                                                                               * Removed stale pid file.
The PostgreSQL server failed to start. Please check the log output:
2015-10-22 15:35:57 UTC [32-1] FATAL:  could not access private key file "/etc/ssl/private/ssl-cert-snakeoil.key": Permission denied

Of course, the server does not start and everything else fails.

@chbrandt chbrandt added the bug label Oct 22, 2015
@chbrandt
Copy link
Member Author

This is a well discussed issue around docker/aufs containers where confusion on how aufs treats files modified in different layers appear on permissions.
For the main discussion about it, see:

For other lateral/example discussions, see:

@chbrandt
Copy link
Member Author

Since it is a problem touching file permissions, one can try to manual fix the problem, like in this comment. Or something like that, people have been discussing.

The better solution, though, is to use DeviceMapper as the fs driver, instead of AUFS. At least that is what people there (at docker and surroundings) are proposing. So, to change your storage driver, add the option --storage-driver=devicemapper to your daemon initialization options. See this blog for a direct recipe on it, and the official documentation for completeness.

@chbrandt
Copy link
Member Author

Just keep it open as a source of info before I put it clear in ("known issue") documentation. (when there is a documentation actually :-P)

@chbrandt chbrandt reopened this Oct 22, 2015
@chbrandt
Copy link
Member Author

chbrandt commented Nov 2, 2015

I tried to use '--no-cache' when building the image (like suggested by this comment) and it looks like it worked.
If it works, I have to understand how to force it when autobuilding.

guillon added a commit to guillon/docker-lava-server that referenced this issue Aug 18, 2016
PostgreSQL may fail at startup with /etc/ssl/private/ssl-cert-snakeoil.key
permission denied.

This is due to a limitation of the AUFS backend which can be worked
around by recreating the /etc/ssl/private directory.

Ref to gavodachs/docker-dachs#1 for
the actual bug and moby/moby#783 for
more details on the AUFS issue.

Change-Id: I0afe01e880f4ace4a38d3751a8c621c97d97d658
guillon added a commit to guillon/docker-lava-server that referenced this issue Aug 18, 2016
Reorder layer commands in order to install ssl-cert in the first layer
in order to avoid permission denied issue when starting postgresql on
/etc/ssl/private/ssl-cert-snakeoil.key.

This is due to a limitation of the AUFS docker backend.
Ref to gavodachs/docker-dachs#1 for
an instance of the bug and to moby/moby#783
for more details on the AUFS issue.

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

No branches or pull requests

1 participant