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

[bitnami/wordpress-nginx] error while loading shared libraries: libldap_r-2.4.so.2: cannot open shared object file: No such file or directory #63502

Closed
g-vdn opened this issue Mar 3, 2024 · 9 comments
Assignees
Labels
solved tech-issues The user has a technical issue about an application wordpress-nginx

Comments

@g-vdn
Copy link

g-vdn commented Mar 3, 2024

Name and Version

bitnami/wordpress-nginx:latest

What architecture are you using?

amd64

What steps will reproduce the bug?

After the latest update, the docker image running on unRAID will not start
The container was functional before

What is the expected behavior?

For the container to start

What do you see instead?

/opt/bitnami/php/bin/php: error while loading shared libraries: libldap_r-2.4.so.2: cannot open shared object file: No such file or directory
@g-vdn g-vdn added the tech-issues The user has a technical issue about an application label Mar 3, 2024
@github-actions github-actions bot added the triage Triage is needed label Mar 3, 2024
@github-actions github-actions bot removed the triage Triage is needed label Mar 3, 2024
@github-actions github-actions bot assigned fevisera and unassigned carrodher Mar 3, 2024
@fevisera
Copy link
Contributor

fevisera commented Mar 7, 2024

Hi @g-vdn,

Thank you for getting in touch. I have attempted to replicate the issue, but unfortunately, I was not able to reproduce it.

I used the docker-compose.yml file and deployed wordpress-nginx:latest, and WordPress responded without any issues:

$ cd bitnami/
$ docker-compose up -d
$ curl -Is http://localhost
HTTP/1.1 200 OK
Server: nginx
...
$

Additionally, please note that you have the option to enhance the image with extra libraries by customizing it. You can refer to the customization guide at https://github.com/bitnami/containers/tree/main/bitnami/wordpress-nginx#customize-this-image for instructions on extending the image.

I hope this information assists you in resolving your issue.

@fevisera fevisera changed the title error while loading shared libraries: libldap_r-2.4.so.2: cannot open shared object file: No such file or directory [bitnami/wordpress-nginx] error while loading shared libraries: libldap_r-2.4.so.2: cannot open shared object file: No such file or directory Mar 7, 2024
@g-vdn
Copy link
Author

g-vdn commented Mar 10, 2024

Hi @fevisera,

Replying quite late, had some RAM issues which crashed the server on which container is running.

Thanks for looking into this. I am using unRAID hypervisor, it's kinda picky when you are not installing dockers from the Community Apps, I installed this image from Docker hub, manually set-up each ENV var I thought is needed, and worked fine for a while, I created a wordpress site, test it, etc. I don't work actively on it, so no idea when this issue happened exactly, but now I am stuck with this

image

Not very good with dockers at this point, I know just little above the basics. Seems to me that library missing from host OS, am I correct in this?

@fevisera
Copy link
Contributor

Hi @g-vdn,

No problem. That library seems to be available in the latest container:

$ docker-compose -f bitnami/wordpress-nginx/6/debian-12/docker-compose.yml exec -it wordpress bash
I have no name!@95402c8e53cd:/$ ldconfig -p |grep libldap
        libldap-2.5.so.0 (libc6,x86-64) => /lib/x86_64-linux-gnu/libldap-2.5.so.0

Could you try using the latest container version (6.4.3-debian-12-r0), available a couple of days ago, and check if the error persist? If the error persists, it would be greatly appreciated if you could share the details of the container configuration (such as environment variables, configuration files, etc.) that are being set up, so that I can attempt to reproduce the issue.

Thanks!

@g-vdn
Copy link
Author

g-vdn commented Mar 11, 2024

Hi @fevisera

Here are the environment variables used:

wp_xml

Till now I was using latest image, now used debian one which you mentioned, same thing

Screenshot 2024-03-11 113152

What config files would you need? I have 2 persistent locations mapped, as is visible in XML. Let me know which you need and I'll share.

Thanks!

@fevisera
Copy link
Contributor

Hi,

The docker images command does not reflect which image is being used by your wordpress-nginx container. Maybe you should try running docker ps which would provide information on which the docker image is being used by each container.

Regarding the config file, I'm not sure how you are providing an XML for configuring the container. Could you share more details on how you are deploying the container?

@g-vdn
Copy link
Author

g-vdn commented Mar 11, 2024

Hi @fevisera ,

I am running the container under unRAID hypervisor, running Slackware OS

root@theark:~# cat /etc/*rel*
NAME=Slackware
VERSION="15.0"
ID=slackware
VERSION_ID=15.0
PRETTY_NAME="Slackware 15.0 x86_64 (post 15.0 -current)"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:slackware:slackware_linux:15.0"
HOME_URL="http://slackware.com/"
SUPPORT_URL="http://www.linuxquestions.org/questions/slackware-14/"
BUG_REPORT_URL="http://www.linuxquestions.org/questions/slackware-14/"
VERSION_CODENAME=current

Docker version: Docker version 24.0.9, build 2936816

Here is the output of docker inspect, hope this will provide more useful data for you

root@theark:~# docker inspect wordpress-nginx
[
    {
        "Id": "b92bfb793a73b75489970a2016a68166aa38157f5d1a872c1c2cd980603ee364",
        "Created": "2024-03-11T10:28:08.316461868Z",
        "Path": "/opt/bitnami/scripts/wordpress/entrypoint.sh",
        "Args": [
            "/opt/bitnami/scripts/nginx-php-fpm/run.sh"
        ],
        "State": {
            "Status": "exited",
            "Running": false,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 0,
            "ExitCode": 127,
            "Error": "",
            "StartedAt": "2024-03-11T10:28:26.142043406Z",
            "FinishedAt": "2024-03-11T10:28:26.538276327Z"
        },
        "Image": "sha256:35ef423ea300ce152e26341afac3b9a622d7d249e778a8a9ca584c44d44f13f4",
        "ResolvConfPath": "/var/lib/docker/containers/b92bfb793a73b75489970a2016a68166aa38157f5d1a872c1c2cd980603ee364/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/b92bfb793a73b75489970a2016a68166aa38157f5d1a872c1c2cd980603ee364/hostname",
        "HostsPath": "/var/lib/docker/containers/b92bfb793a73b75489970a2016a68166aa38157f5d1a872c1c2cd980603ee364/hosts",
        "LogPath": "/var/lib/docker/containers/b92bfb793a73b75489970a2016a68166aa38157f5d1a872c1c2cd980603ee364/b92bfb793a73b75489970a2016a68166aa38157f5d1a872c1c2cd980603ee364-json.log",
        "Name": "/wordpress-nginx",
        "RestartCount": 0,
        "Driver": "btrfs",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": [
                "/mnt/user/appdata/wordpress-nginx/main:/bitnami/wordpress/:rw",
                "/mnt/user/appdata/wordpress-nginx/opt:/opt/bitnami:rw"
            ],
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {
                    "max-file": "1",
                    "max-size": "50m"
                }
            },
            "NetworkMode": "bridge",
            "PortBindings": {
                "8443/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "8443"
                    }
                ]
            },
            "RestartPolicy": {
                "Name": "no",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": null,
            "ConsoleSize": [
                0,
                0
            ],
            "CapAdd": null,
            "CapDrop": null,
            "CgroupnsMode": "private",
            "Dns": [],
            "DnsOptions": [],
            "DnsSearch": [],
            "ExtraHosts": null,
            "GroupAdd": null,
            "IpcMode": "private",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": null,
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,
            "Runtime": "runc",
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": [],
            "BlkioDeviceReadBps": [],
            "BlkioDeviceWriteBps": [],
            "BlkioDeviceReadIOps": [],
            "BlkioDeviceWriteIOps": [],
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "0,1,2,6,7,8",
            "CpusetMems": "",
            "Devices": [],
            "DeviceCgroupRules": null,
            "DeviceRequests": null,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": null,
            "PidsLimit": null,
            "Ulimits": null,
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "MaskedPaths": [
                "/proc/asound",
                "/proc/acpi",
                "/proc/kcore",
                "/proc/keys",
                "/proc/latency_stats",
                "/proc/timer_list",
                "/proc/timer_stats",
                "/proc/sched_debug",
                "/proc/scsi",
                "/sys/firmware",
                "/sys/devices/virtual/powercap"
            ],
            "ReadonlyPaths": [
                "/proc/bus",
                "/proc/fs",
                "/proc/irq",
                "/proc/sys",
                "/proc/sysrq-trigger"
            ]
        },
        "GraphDriver": {
            "Data": null,
            "Name": "btrfs"
        },
        "Mounts": [
            {
                "Type": "bind",
                "Source": "/mnt/user/appdata/wordpress-nginx/opt",
                "Destination": "/opt/bitnami",
                "Mode": "rw",
                "RW": true,
                "Propagation": "rprivate"
            },
            {
                "Type": "bind",
                "Source": "/mnt/user/appdata/wordpress-nginx/main",
                "Destination": "/bitnami/wordpress",
                "Mode": "rw",
                "RW": true,
                "Propagation": "rprivate"
            }
        ],
        "Config": {
            "Hostname": "b92bfb793a73",
            "Domainname": "",
            "User": "1001",
            "AttachStdin": false,
            "AttachStdout": true,
            "AttachStderr": true,
            "ExposedPorts": {
                "8080/tcp": {},
                "8443/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "HOST_CONTAINERNAME=wordpress-nginx",
                "WORDPRESS_BLOG_NAME=https://domain.com",
                "WORDPRESS_DATABASE_NAME=wordpress_db",
                "WORDPRESS_DATABASE_USER=wordpress",
                "HOST_HOSTNAME=theark",
                "WORDPRESS_USERNAME=wp_admin_user",
                "WORDPRESS_DATABASE_PORT_NUMBER=3306",
                "WORDPRESS_DATABASE_PASSWORD=23R8hqCrL9TVE53o8U7gisA",
                "TZ=Europe/Prague",
                "HOST_OS=Unraid",
                "WORDPRESS_PASSWORD=u&25@9%R*#Au6#3Rqw7g4&!",
                "WORDPRESS_FIRST_NAME=John",
                "WORDPRESS_LAST_NAME=Doe",
                "WORDPRESS_DATABASE_HOST=theark",
                "[email protected]",
                "NGINX_HTTPS_PORT_NUMBER=8443",
                "PATH=/opt/bitnami/common/bin:/opt/bitnami/php/bin:/opt/bitnami/php/sbin:/opt/bitnami/nginx/sbin:/opt/bitnami/mysql/bin:/opt/bitnami/wp-cli/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "HOME=/",
                "OS_ARCH=amd64",
                "OS_FLAVOUR=debian-12",
                "OS_NAME=linux",
                "APP_VERSION=6.4.3",
                "BITNAMI_APP_NAME=wordpress-nginx",
                "NGINX_HTTP_PORT_NUMBER="
            ],
            "Cmd": [
                "/opt/bitnami/scripts/nginx-php-fpm/run.sh"
            ],
            "Image": "bitnami/wordpress-nginx:6.4.3-debian-12-r0",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": [
                "/opt/bitnami/scripts/wordpress/entrypoint.sh"
            ],
            "OnBuild": null,
            "Labels": {
                "com.vmware.cp.artifact.flavor": "sha256:c50c90cfd9d12b445b011e6ad529f1ad3daea45c26d20b00732fae3cd71f6a83",
                "net.unraid.docker.icon": "https://s.w.org/style/images/about/WordPress-logotype-wmark.png",
                "net.unraid.docker.managed": "dockerman",
                "org.opencontainers.image.base.name": "docker.io/bitnami/minideb:bookworm",
                "org.opencontainers.image.created": "2024-03-09T11:03:49Z",
                "org.opencontainers.image.description": "Application packaged by VMware, Inc",
                "org.opencontainers.image.licenses": "Apache-2.0",
                "org.opencontainers.image.ref.name": "6.4.3-debian-12-r0",
                "org.opencontainers.image.title": "wordpress-nginx",
                "org.opencontainers.image.vendor": "VMware, Inc.",
                "org.opencontainers.image.version": "6.4.3"
            }
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "d9ed6337de958e1a45311a68c8770e03932d0ff599ae874f69e42afda6b82d5c",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {},
            "SandboxKey": "/var/run/docker/netns/d9ed6337de95",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "bridge": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "782428eb517dbcca005b05f92aef55d9d9e9b38f07347681ef08f8472651bfed",
                    "EndpointID": "",
                    "Gateway": "",
                    "IPAddress": "",
                    "IPPrefixLen": 0,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "",
                    "DriverOpts": null
                }
            }
        }
    }
]

@fevisera
Copy link
Contributor

Hi @g-vdn,

Could you share the exact steps to reproduce the error?

We may be missing something because the docker image includes libldap-2.5-0 library installed, so I do not get why your deployment is complaining about a previous version.

You can check that the library is there by doing the following, mentioned previously:

$ docker-compose exec -it wordpress ldconfig -p |grep libldap
        libldap-2.5.so.0 (libc6,x86-64) => /lib/x86_64-linux-gnu/libldap-2.5.so.0
$ 
$ docker-compose exec -it wordpress ls -l /lib/x86_64-linux-gnu/libldap-2.5.so.0
lrwxrwxrwx 1 root root 20 Feb  8  2023 /lib/x86_64-linux-gnu/libldap-2.5.so.0 -> libldap-2.5.so.0.1.8
$ 
$ docker-compose exec -it wordpress /opt/bitnami/php/bin/php --version
PHP 8.2.16 (cli) (built: Feb 19 2024 15:33:37) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.16, Copyright (c) Zend Technologies
    with Zend OPcache v8.2.16, Copyright (c), by Zend Technologies

@g-vdn
Copy link
Author

g-vdn commented Mar 13, 2024

Hi @fevisera,

Figured out the issue, /opt/bitnami was mapped as persistent storage.
I remember doing this because after every docker update or restart (this was many months back), WP version reverted to what it was previously, didn't persist. After mapping /opt/bitnami locally all was fine, till it didn't work. Now I see that WP stays at current version even after docker update/reboot.
Seems image updates don't work their way into local storage, what is mapped , like /opt/bitnami , will keep old data.

Before:
-v '/mnt/user/appdata/wordpress-nginx/main':'/bitnami/wordpress/':'rw'
-v '/mnt/user/appdata/wordpress-nginx/opt':'/opt/bitnami':'rw'

After:
-v '/mnt/user/appdata/wordpress-nginx':'/bitnami/wordpress/':'rw' 'bitnami/wordpress-nginx:latest'

Thanks a lot for your assistance

@fevisera
Copy link
Contributor

Hi @g-vdn,

I'm glad you were able to resolve it and thank you for providing additional details. Please note that you can find further information on persisting application data at https://github.com/bitnami/containers/tree/main/bitnami/wordpress-nginx#persisting-your-application.

Since the issue has been resolved, I will proceed to close it. Please, feel free to reach out again with any other issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved tech-issues The user has a technical issue about an application wordpress-nginx
Projects
None yet
Development

No branches or pull requests

3 participants