-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
failed to map segment from shared object error on start #1339
Comments
Same issue,
How reproducible:100% Steps to Reproduce:
Actual Results:
Expected Results:
Additional info:This started when I upgraded to version 1.2.0 on RHEL 6.6 with noexec on
|
Well, this is awkward, it turned out to be a permissions issue with |
FWIW this issue is still prevalent in Docker 1.3.0 RC3, requiring /tmp to be exec. |
This should probably be called out in documentation somewhere. Just got bit by the fact the this was configured differently on our staging and prod servers, so our new deployment workflow using compose failed in production. |
Issue still prevalent in:
@kevana's work around using a wrapper script that exports a different TMP works for me |
If i manually do the export TMP to a new location it works with 1.4.0 RC3 |
Just upgraded, issue still prevalent in:
Still using @kevana's work around |
Have the same issue on CentOS 6.7 with both compose version 1.4.2 and 1.5.0rc2 - unfortunately even the workaround doesn't work for me. |
I'd suggest using the workaround of setting a new temp directory (by setting Note there are other install options as well: https://github.com/docker/compose/blob/master/docs/install.md#alternative-install-options |
Hi, same issue with centos 7. The workaround doesn't works. Any suggestion ? docker-compose: error while loading shared libraries: libz.so.1: failed to map segment from shared object: Operation not permitted |
You can also remount |
sudo mount /tmp -o remount,exec might do the trick, yes. |
Workaround given by @dnephin worked for me on CentOs 7 with SELinux being disabled. |
@Kostanos It appears you are inside a container (from the |
Wouldn't it be possible to add a check early in the code to see if tmp is mounted with the exec option? A useful error message would save time ;) |
Thank you so much , this worked for me. |
But mounting /tmp with exec is not so good for security :) (for example CIS need to have noexec on /tmp folder). And case was closed just.. like that without any word @shin- ? |
If executing inside the temp folder is not an option for you, you can always use the python package. |
But I think that error message could be better ;-) |
Unfortunately the error is not from To summarize the workarounds (for anyone else who hits this issue):
|
Thanks @dnephin |
#!/bin/bash
export TMPDIR=/srv/compose-tmp
/usr/local/bin/docker-compose-with-tmp "$@" Basically it is a proxy. |
if noexec on /tmp Docker 17.06.0-ce |
The following command works for me (Centos 7): |
I've been having a I've been running Docker with None of the solutions mentioned above helped, but I've managed to overcome the problem by adding tmpfs:
- /myapp/tmp:exec,mode=1777 |
Other workaround not already mentioned: Add the following line to
|
Does it mean there's no way for docker-compose to provide a more helpful error message? Edit: Sorry for the dumb question. I didn't see the word "message" on first read. |
In ansible-pulp CI, pip builds often fail to access .so files under /tmp Solution: Mount /tmp with exec in molecule.yml per: docker/compose#1339 (comment) fixes: #6266
…s under /tmp Solution: Mount /tmp with exec in molecule.yml per: docker/compose#1339 (comment) fixes: #6266
to install docker-compose in CentOS 7 only pip. |
Is there any plan to add some kind of config file to specify where |
I now use a dockerized version of docker-compose. With that, you can mount /tmp whereever you want, if it's still needed. |
@mk-pmb How are you doing that? |
|
Oh. Ha. I didn't get what you meant at first. That is kinda funny. Docker to run Compose to run Docker. Dockception. :D |
Its really crazy, I don't get this error in one RHEL server, but I get on the another which is under client's network and security. Both the server's are RHEL 8. What is the root cause for this ? Can anyone pls tell me? |
@shreeraj04 What are the mount options for /tmp on each? Probably the failing server has the "noexec" option set for /tmp. |
@mk-pmb Yes, your guess was right. Running the below command to set exec option for /tmp solved the issue. sudo mount /tmp -o remount,exec |
There are many reasons why you wouldn't want to use /tmp with exec permissions. One of which is DoD STIGs, which regulate on linux systems that the /tmp directory must be mounted with noexec. We need a fix for this. |
Someone who must follow STIG probably has some money and/or pogrammer work hours to spare, so maybe they can boost the fixing effort here: pyinstaller/pyinstaller#4548 |
Workaround for issue quay#2009 suggested in docker/compose#1339 (comment)
Workaround for issue quay#2009 suggested in docker/compose#1339 (comment) Signed-off-by: perat <perat86@icloud.com>
When I run docker-compose --version on a host with noexec set on /tmp I get the following error:
docker-compose: error while loading shared libraries: libz.so.1: failed to map segment from shared object: Operation not permitted
This is docker-compose version 1.2.0 running on Centos 6
A google search turned up the same error happening with another application and they attributed it to noexec being set on /tmp http://admin-ahead.com/portal/knowledgebase/4/error-while-loading-shared-libraries-libzso1-failed-to-map-segment-from-shared-object-Operation-not-permitted.html
This server has noexec set on /tmp and the error message is the same so I expect that is the cause. Trying to set TMP to another location without noexec didn't work.
The text was updated successfully, but these errors were encountered: