zalando / postgres-operator

Postgres operator creates and manages PostgreSQL clusters running in Kubernetes
https://postgres-operator.readthedocs.io/
MIT License
4.35k stars 980 forks source link

libdl.so.2 error in postgres container #758

Closed spencergilbert closed 4 years ago

spencergilbert commented 4 years ago

/bin/sh: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory

Images in use:

Running in kubernetes 1.16.2 - rancher on bare metal Ubuntu 18.04.3 LTS machines. Any ideas on what the issue or fix might be? Not sure if this issue should be here or in the spilo/patroni repos.

Thanks!

FxKu commented 4 years ago

@CyberDem0n

CyberDem0n commented 4 years ago

The image works perfectly:

$ docker run --rm -ti registry.opensource.zalan.do/acid/spilo-11:1.6-p1                                                                                                                                                                             
decompressing spilo image...                                                                                                                                                                                                                                                    
2019-12-12 11:49:38,553 - bootstrapping - INFO - Figuring out my environment (Google? AWS? Openstack? Local?)                                                                                                                                                                   
2019-12-12 11:49:40,559 - bootstrapping - INFO - Could not connect to 169.254.169.254, assuming local Docker setup                                                                                                                                                              
2019-12-12 11:49:40,569 - bootstrapping - INFO - No meta-data available for this provider                                                                                                                                                                                       
...
CyberDem0n commented 4 years ago

And I also run Ubuntu 18.04:

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.3 LTS"
spencergilbert commented 4 years ago

exciting! I got onto one of our physical nodes and did that...

Unable to find image 'registry.opensource.zalan.do/acid/spilo-11:1.6-p1' locally 1.6-p1: Pulling from acid/spilo-11 76f8062a9036: Pull complete 0031d3e0cf2a: Pull complete 5a7e484c3823: Pull complete fb79f328b5a5: Pull complete f3ad643bffff: Pull complete 27813c61ac39: Pull complete a666c64b1115: Pull complete 93b2e888a92d: Pull complete ea968a7a38bf: Pull complete Digest: sha256:88501b8ca1aaa7a29bec0b5bda658c571323147d06983777410d09f34fea62f5 Status: Downloaded newer image for registry.opensource.zalan.do/acid/spilo-11:1.6-p1 /bin/sh: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory

so i'm assuming something about how are machines are setup/or security hardened has messed with that lib I guess...

spencergilbert commented 4 years ago

Figured this out! We're running Aqua for security and removing that resolves the issue. Thanks!

venkatsambath commented 2 months ago

I faced a similar issue. For those who cant stop aqua agents. you can update aqua enforcers configmap - with AQUA_PRELOAD_NO_LIBDL: "true"