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

Failure to mount local folder with -v #491

Closed
dbcraig opened this issue Mar 22, 2019 · 5 comments
Closed

Failure to mount local folder with -v #491

dbcraig opened this issue Mar 22, 2019 · 5 comments

Comments

@dbcraig
Copy link

dbcraig commented Mar 22, 2019

Docker image running just fine in my VM until I try to mount local galaxy_storage with -v

galaxy-stable (19.01)
Linux 4.14.83+ x86-64
Docker version 18.06.1-ce, build 0ffa825

douglasbcraig@dbc-vm-docker-galaxy-1 ~ $ docker run -i -t -p 8080:80 -p 8021:21 -p 8022:22 -v /home/douglasbcraig/galaxy_storage/:/export/ bgruening/galaxy-stable
Enable Galaxy reports authentification 
tmpfs on /proc/kcore type tmpfs (rw,nosuid,size=65536k,mode=755)
Checking /export...
Disable Galaxy Interactive Environments. Start with --privileged to enable IE's.
Starting postgres
postgresql: started
Checking if database is up and running
Traceback (most recent call last):
  File "/usr/local/bin/check_database.py", line 9, in <module>
    from galaxy.model import User
  File "/galaxy-central/lib/galaxy/model/__init__.py", line 7, in <module>
    import base64
  File "/tool_deps/_conda/lib/python2.7/base64.py", line 9, in <module>
    import struct
  File "/tool_deps/_conda/lib/python2.7/struct.py", line 1, in <module>
    from _struct import *
ImportError: /galaxy_venv/lib/python2.7/lib-dynload/_struct.so: failed to map segment from shared object: Operation not permitted
Waiting for database
Traceback (most recent call last):
  File "/usr/local/bin/check_database.py", line 9, in <module>
    from galaxy.model import User
  File "/galaxy-central/lib/galaxy/model/__init__.py", line 7, in <module>
    import base64
  File "/tool_deps/_conda/lib/python2.7/base64.py", line 9, in <module>
    import struct
  File "/tool_deps/_conda/lib/python2.7/struct.py", line 1, in <module>
    from _struct import *
ImportError: /galaxy_venv/lib/python2.7/lib-dynload/_struct.so: failed to map segment from shared object: Operation not permitted
Waiting for database

... repeating forever

The local galaxy_storage directory is created and populated:

douglasbcraig@dbc-vm-docker-galaxy-1 ~/galaxy_storage $ ls -la
total 36
drwxr-xr-x 9 root          root          4096 Mar 22 20:34 .
drwxr-xr-x 4 douglasbcraig douglasbcraig 4096 Mar 22 20:34 ..
drwxr-xr-x 3 root          root          4096 Feb 22 18:43 .distribution_config
drwxr-xr-x 2          1450          1450 4096 Mar 22 20:34 ftp
drwxr-xr-x 8          1450          1450 4096 Mar 22 20:34 galaxy-central
drwxr-xr-x 3          1550          1550 4096 Mar 22 20:34 postgresql
drwxr-xr-x 2          1450          1450 4096 Feb 22 19:05 shed_tools
drwxr-xr-x 3          1450          1450 4096 Feb 22 19:08 tool_deps
drwxr-xr-x 3 root          root          4096 Mar 22 20:34 var

I've seen something similar in an older Issue #68, but this seems pretty vanilla use of -v

Doug

@bgruening
Copy link
Owner

@dbcraig is the mount point on some special filesystem? NFS or so?
Is the folder empty or is something already in this mounted folder?

@dbcraig
Copy link
Author

dbcraig commented Mar 22, 2019

Nothing special that I know. Simply at ~, which is where I'm running Docker.
This is a Google Cloud container-optimized VM, specifically:

Container-Optimized OS 72-11316.171.0 stable
Kernel: ChromiumOS-4.14.83 Kubernetes: 1.12.4 Docker: 18.06.1 Family: cos-stable

There are a few limitations listed, but nothing that jumps out to me (details).

Like I said, the Galaxy deployment starts up and behaves just fine if I don't mount the local folder. Specifically, if I open up the firewall on 8080 I can get at the Galaxy instance no problem.

I've tried it both ways: letting Galaxy create the folder, and I've also removed everything then created it myself prior to running Docker. In both cases Galaxy populates it, but then I get this error.

@bgruening
Copy link
Owner

Hi @dbcraig

I found a few interesting pages, that either indicates a problem with your cloud mount point, so your HOME, or some ulimit restrictions :(

Do you have any other filesystems around that you can try? /tmp maybe?

@dbcraig
Copy link
Author

dbcraig commented Mar 23, 2019

Using /tmp ran into the same problem, however, found this issue with Docker. Remounting with exec solves the problem:

sudo mount /tmp -o remount,exec

There may be other implications with this "solution", so I'll do some more verification, but everything appears to be working now.

Surprised others haven't run into this with -v option. Maybe make a note in the Usage docs?
Thanks, @bgruening !

@zph001
Copy link

zph001 commented May 13, 2019

"ImportError: /galaxy_venv/lib/python2.7/lib-dynload/_struct.so: failed to map segment from shared object: Operation not permitted"

More likely it's permission problem of your setup, and that's why others including me don't have problems you have.

@dbcraig dbcraig closed this as completed May 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants