bgruening / docker-galaxy

:whale::bar_chart::books: Docker Images tracking the stable Galaxy releases.
http://bgruening.github.io/docker-galaxy
MIT License
226 stars 134 forks source link

Checking /export... OSError Invalid cross-device link: '/tool_deps' -> '/export/tool_deps' #579

Closed JoelPHoward closed 3 days ago

JoelPHoward commented 3 years ago

Hi, I am trying to pull/run docker-galaxy-stable via the following:

docker run -d -p 8080:80 \
    -v /Users/joelhoward/galaxy/export/:/export/ \
    -v /Users/joelhoward/galaxy/my_galaxy_tools/:/local_tools \
    bgruening/galaxy-stable

Where /Users/joelhoward/galaxy/ is a fresh directory. This seems to pull the image with no issues, but while it is creating the export volume, I run into the following error:

Enable Galaxy reports authentification Checking /export... Traceback (most recent call last): File "/tool_deps/_conda/lib/python3.7/shutil.py", line 563, in move os.rename(src, real_dst) OSError: [Errno 18] Invalid cross-device link: '/tool_deps' -> '/export/tool_deps' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/bin/export_user_files.py", line 142, in change_path( os.path.join('/tool_deps') ) File "/usr/local/bin/export_user_files.py", line 26, in change_path shutil.move( src, dest ) File "/tool_deps/_conda/lib/python3.7/shutil.py", line 574, in move symlinks=True) File "/tool_deps/_conda/lib/python3.7/shutil.py", line 365, in copytree raise Error(errors) shutil.Error: [('/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/a', '/export/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/a', "[Errno 17] File exists: '/export/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/a'"), ('/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/h/hp2621a', '/export/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/h/hp2621a', "[Errno 17] File exists: 'hp2621' -> '/export/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/h/hp2621a'"), ('/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/h/hp70092A', '/export/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/h/hp70092A', "[Errno 17] File exists: 'hp70092' -> '/export/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/h/hp70092A'"), ('/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/q', '/export/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/q', "[Errno 17] File exists: '/export/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/q'"), ('/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/p', '/export/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/p', "[Errno 17] File exists: '/export/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/p'"), ('/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/m', '/export/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/m', "[Errno 17] File exists: '/export/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/m'"), ('/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/2/2621A', '/export/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/2/2621A', "[Errno 17] File exists: '../h/hp2621' -> '/export/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/2/2621A'"), ('/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/X', '/export/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/X', "[Errno 17] File exists: '/export/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/X'"), ('/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/n', '/export/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/n', "[Errno 17] File exists: '/export/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/n'"), ('/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/e', '/export/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/e', "[Errno 17] File exists: '/export/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/e'"), ('/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/l', '/export/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/l', "[Errno 17] File exists: '/export/tool_deps/_conda/pkgs/ncurses-6.1-he6710b0_1/share/terminfo/l'"), ('/tool_deps/_conda/share/terminfo/a', '/export/tool_deps/_conda/share/terminfo/a', "[Errno 17] File exists: '/export/tool_deps/_conda/share/terminfo/a'"), ('/tool_deps/_conda/share/terminfo/h/hp2621a', '/export/tool_deps/_conda/share/terminfo/h/hp2621a', "[Errno 17] File exists: 'hp2621' -> '/export/tool_deps/_conda/share/terminfo/h/hp2621a'"), ('/tool_deps/_conda/share/terminfo/h/hp70092A', '/export/tool_deps/_conda/share/terminfo/h/hp70092A', "[Errno 17] File exists: 'hp70092' -> '/export/tool_deps/_conda/share/terminfo/h/hp70092A'"), ('/tool_deps/_conda/share/terminfo/q', '/export/tool_deps/_conda/share/terminfo/q', "[Errno 17] File exists: '/export/tool_deps/_conda/share/terminfo/q'"), ('/tool_deps/_conda/share/terminfo/p', '/export/tool_deps/_conda/share/terminfo/p', "[Errno 17] File exists: '/export/tool_deps/_conda/share/terminfo/p'"), ('/tool_deps/_conda/share/terminfo/m', '/export/tool_deps/_conda/share/terminfo/m', "[Errno 17] File exists: '/export/tool_deps/_conda/share/terminfo/m'"), ('/tool_deps/_conda/share/terminfo/2/2621A', '/export/tool_deps/_conda/share/terminfo/2/2621A', "[Errno 17] File exists: '../h/hp2621' -> '/export/tool_deps/_conda/share/terminfo/2/2621A'"), ('/tool_deps/_conda/share/terminfo/X', '/export/tool_deps/_conda/share/terminfo/X', "[Errno 17] File exists: '/export/tool_deps/_conda/share/terminfo/X'"), ('/tool_deps/_conda/share/terminfo/n', '/export/tool_deps/_conda/share/terminfo/n', "[Errno 17] File exists: '/export/tool_deps/_conda/share/terminfo/n'"), ('/tool_deps/_conda/share/terminfo/e', '/export/tool_deps/_conda/share/terminfo/e', "[Errno 17] File exists: '/export/tool_deps/_conda/share/terminfo/e'"), ('/tool_deps/_conda/share/terminfo/l', '/export/tool_deps/_conda/share/terminfo/l', "[Errno 17] File exists: '/export/tool_deps/_conda/share/terminfo/l'")] Disable Galaxy Interactive Environments. Start with --privileged to enable IE's. Starting postgres postgresql: ERROR (spawn error) Checking if database is up and running Traceback (most recent call last):

And then the following repeats:

File "/galaxy_venv/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 2285, in _wrap_pool_connect return fn() File "/galaxy_venv/lib/python3.7/site-packages/sqlalchemy/pool/base.py", line 363, in connect return _ConnectionFairy._checkout(self) File "/galaxy_venv/lib/python3.7/site-packages/sqlalchemy/pool/base.py", line 773, in _checkout fairy = _ConnectionRecord.checkout(pool) File "/galaxy_venv/lib/python3.7/site-packages/sqlalchemy/pool/base.py", line 492, in checkout rec = pool._do_get() File "/galaxy_venv/lib/python3.7/site-packages/sqlalchemy/pool/impl.py", line 139, in _do_get self._dec_overflow() File "/galaxy_venv/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py", line 69, in exit exc_value, with_traceback=exc_tb, File "/galaxyvenv/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 178, in raise raise exception File "/galaxy_venv/lib/python3.7/site-packages/sqlalchemy/pool/impl.py", line 136, in _do_get return self._create_connection() File "/galaxy_venv/lib/python3.7/site-packages/sqlalchemy/pool/base.py", line 308, in _create_connection return _ConnectionRecord(self) File "/galaxy_venv/lib/python3.7/site-packages/sqlalchemy/pool/base.py", line 437, in init self.connect(first_connect_check=True) File "/galaxy_venv/lib/python3.7/site-packages/sqlalchemy/pool/base.py", line 657, in __connect pool.logger.debug("Error on connect(): %s", e) File "/galaxy_venv/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py", line 69, in exit exc_value, with_traceback=exc_tb, File "/galaxyvenv/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 178, in raise raise exception File "/galaxy_venv/lib/python3.7/site-packages/sqlalchemy/pool/base.py", line 652, in connect connection = pool._invoke_creator(self) File "/galaxy_venv/lib/python3.7/site-packages/sqlalchemy/engine/strategies.py", line 114, in connect return dialect.connect(*cargs, *cparams) File "/galaxy_venv/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 490, in connect return self.dbapi.connect(cargs, cparams) File "/galaxy_venv/lib/python3.7/site-packages/psycopg2/init.py", line 126, in connect conn = _connect(dsn, connection_factory=connection_factory, kwasync) psycopg2.OperationalError: could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432? could not connect to server: Cannot assign requested address Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/local/bin/check_database.py", line 25, in query.count() File "/galaxy_venv/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3669, in count return self.from_self(col).scalar() File "/galaxy_venv/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3393, in scalar ret = self.one() File "/galaxy_venv/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3360, in one ret = self.one_or_none() File "/galaxy_venv/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3329, in one_or_none ret = list(self) File "/galaxy_venv/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3405, in iter return self._execute_and_instances(context) File "/galaxy_venv/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3427, in _execute_and_instances querycontext, self._connection_from_session, close_with_result=True File "/galaxy_venv/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3442, in _get_bind_args mapper=self._bind_mapper(), clause=querycontext.statement, kw File "/galaxy_venv/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3420, in _connection_from_session conn = self.session.connection(kw) File "/galaxy_venv/lib/python3.7/site-packages/sqlalchemy/orm/session.py", line 1133, in connection execution_options=execution_options, File "/galaxy_venv/lib/python3.7/site-packages/sqlalchemy/orm/session.py", line 1142, in _connection_for_bind conn = engine._contextual_connect(**kw) File "/galaxy_venv/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 2251, in _contextual_connect self._wrap_pool_connect(self.pool.connect, None), File "/galaxy_venv/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 2289, in _wrap_pool_connect e, dialect, self File "/galaxy_venv/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1555, in _handle_dbapi_exception_noconnection sqlalchemy_exception, with_traceback=excinfo[2], from=e File "/galaxyvenv/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 178, in raise raise exception

I am using Docker version 20.10.3, build 48d30b5 (Docker for Mac). If I exclude the line -v /Users/joelhoward/galaxy/export/:/export/ it works and I can open galaxy in my browser.

Any help with this would be appreciated.

bgruening commented 3 days ago

The new 24.1 image contains a lot of changes and reflects the latest developments in Galaxy. I would like to close this PR, but please feel free to reopen and rebase against the latest version.

Please give it a try:

docker run -p 8080:80 -p 8021:21 -p 4002:4002 --privileged=true -e "GALAXY_DESTINATIONS_DEFAULT=slurm_cluster_docker"   -v /tmp/galaxy-data/:/export/ quay.io/bgruening/galaxy:24.1

... or any other combination. The readme has been updated. Please add any useful tip to it.

For a list of changes, see the Changelog.