-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Error 135 in Initdb deploying inside Kubernetes #451
Comments
Not sure if this helps, I tried a Centos7-postgres image and got a similiar error though with a bit more details.: fixing permissions on existing directory /var/lib/pgsql/data/userdata ... ok |
We have no great ideas on how to debug this as we are neither experts in Postgres code nor Kubernetes code and we cannot realistically debug all issues with running the Official Images in random environment X. Since you have been able to get it to work on plain Docker on the "broken" machine (and on a separate Kubernetes cluster), then it is not a problem with the Docker image. I would recommend trying to find out what is different between your two clusters and what is different between the plain Docker run and the Kubernetes deployment config (cgroups like memory limits, In the future, it'd be better to post questions like this in the Docker Community Forums, the Docker Community Slack, Stack Overflow, or a Kubernetes specific help group. |
Hi dlohin, I'm getting the same issue and to expand slightly further on this, it works on my local minikube but not on a private K8s cluster running on vmware datastores so I am suspecting it maye be this aspect. I will continue fighting it and feedback if I stumble across the fix. |
Same issue here. This image on K8s does not work (simple kubectl run) but running on plain docker (docker run) in the same host does. |
Hey Guys, any progress or info for this issue? I am stuck on this for an urgent Demo. |
This is the only thing relevant I found relating to a bus error in kubernetes/docker
|
Have the same issue, as well as on the gitlab image(error in postgres) and richarvey/nginx-php-fpm, webdevops/php-nginx, wordpress images (with php-fpm). Docker runs fine on the same host. Problem appeared on 1.12 version. 1.9 worked fine for me on all images.
I've tried to run postgresql 9.6.5. I've tried to mount /dev/shm/ both on the same host path and in empty dir. It didn't help. Guess it's not problem with shared memory. Host system: ubuntu 16.04. |
So is there any clue about this issue? |
For me temporary workaround was to run one node at 1.9.11 and run this kind of images on it. |
I believe I hit the same issue (postgres works through docker run, but not k8s). The issue I hit was that huge pages were enabled, but they were not working through k8s, and Postgres wouldn't fall back properly to not using huge pages. I think there are several possible solutions to the problem:
|
As nbartos said, I tried to set vm.nr_hugepages = 0 in /etc/sysctl.conf. |
I get the same issue, and i try to change the docker image
them use new image in k8s, it works well. |
Thanks for the solution, @nbartos! It also resolves for me the problem with running Solr in Kubernetes with "fatal error has been detected by the Java Runtime Environment"! Here is the output of crashing Solr pod in k8s before setting the
|
When I attempt to run the Postgres container using Kubernetes I get an error and the container crashes. I have been banging my head for a few days on this but can't find anything that points me in the right direction as to what to debug. I have tried using the Postgres container with Docker using the same host and this works fine. I have also tested on a different cluster using Kubernetes cluster and it is working fine so I believe it is something environment specific.
When I set the container to not enter into the entrypoint I can then recreate the initdb error.
Here is the output I get when I run initdb:
postgres@postgresql-844495667c-fdtzw:/$ /usr/lib/postgresql/10/bin/initdb -d -n /db
Running in debug mode.
Running in no-clean mode. Mistakes will not be cleaned up.
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
VERSION=10.4 (Debian 10.4-2.pgdg90+1)
PGDATA=/db
share_path=/usr/share/postgresql/10
PGPATH=/usr/lib/postgresql/10/bin
POSTGRES_SUPERUSERNAME=postgres
POSTGRES_BKI=/usr/share/postgresql/10/postgres.bki
POSTGRES_DESCR=/usr/share/postgresql/10/postgres.description
POSTGRES_SHDESCR=/usr/share/postgresql/10/postgres.shdescription
POSTGRESQL_CONF_SAMPLE=/usr/share/postgresql/10/postgresql.conf.sample
PG_HBA_SAMPLE=/usr/share/postgresql/10/pg_hba.conf.sample
PG_IDENT_SAMPLE=/usr/share/postgresql/10/pg_ident.conf.sample
The database cluster will be initialized with locale "C".
The default database encoding has accordingly been set to "SQL_ASCII".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /db ... ok
creating subdirectories ... ok
selecting default max_connections ... 20
selecting default shared_buffers ... 400kB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... 2018-05-29 13:59:16.693 UTC [249] DEBUG: invoking IpcMemoryCreate(size=3055616)
Bus error (core dumped)
child process exited with exit code 135
initdb: data directory "/db" not removed at user's request
Things I have tried:
Increasing SHM on the host and the container
Running as privileged
Running older versions of Postgres
Running STRACE to see if anything jumped out at me
Increasing CPU limits and requests
Even if someone can point me in the right direction I would be forever grateful. Right now I am stuck banging my head against a wall.
postgresdump.zip
The text was updated successfully, but these errors were encountered: