marklogic / marklogic-docker

Docker image for MarkLogic Server
Other
8 stars 13 forks source link

Issues launching container: sudo: effective uid is not 0 #223

Open grtjn opened 1 year ago

grtjn commented 1 year ago

We are running on a RedHat VM, that has been outsourced to a third party. I am afraid they have done something recently to the way the disk space has been mounted on which we keep our volume data. Starting a MarkLogic container shows this in the console, after which MarkLogic doesn't seem to have started:

2023-08-29 20:57:52.625 Info: Starting MarkLogic container with 11.0.2-centos-1.0.2 from release/docker-1.0.2
2023-08-29 20:57:52.672 Info: OVERWRITE_ML_CONF is false, not writing to /etc/marklogic.conf
2023-08-29 20:57:52.673 Info: INSTALL_CONVERTERS is false, not installing converters.
2023-08-29 20:57:52.674 Info: TZ is defined, setting timezone to Europe/Amsterdam.
sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?
sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?
sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?
2023-08-29 20:57:57.681 Info: MARKLOGIC_ADMIN_PASSWORD is set, using ENV for admin password.
2023-08-29 20:57:57.682 Info: MARKLOGIC_ADMIN_USERNAME is set, using ENV for admin username.
2023-08-29 20:57:57.683 Info: MARKLOGIC_WALLET_PASSWORD is set, using ENV for wallet-password.
2023-08-29 20:57:57.684 Info: MARKLOGIC_INIT is true, but the server is already initialized. Skipping initialization.
2023-08-29 20:57:57.685 Info: MARKLOGIC_JOIN_CLUSTER is false or not defined, not joining cluster.
2023-08-29 20:57:57.686 Info: Cluster config complete, marking this node as ready.
sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?

Has any of you encountered this, and is really the only option to remount the filesystem with the suid option? That was at least suggested here:

https://unix.stackexchange.com/a/546823

I also encounted this issue when doing sudo in a Dockerfile, which was easily by-passed by doing USER root first and then skipping sudo. It made me wonder if the startup script is potentially doing sudo's, and if it would be possible to do without?

Any help appreciated!

grtjn commented 1 year ago

As a workaround I could use ' user: root' in my docker compose, but I'd rather not..

jkerr5 commented 1 year ago

The current startup script uses sudo as the MarkLogic startup process currently runs as root. We are working on a non-root image which we hope to release soon.

vitalykorolev commented 3 months ago

@grtjn we just released Docker 2.0.0 which provides UBI rootless image! Please give it a try in your environment.