Skip to content

Fixed rabbitmq docker deprecated environment variables#863

Merged
f4str merged 2 commits intomainfrom
docker-fix
Jul 29, 2021
Merged

Fixed rabbitmq docker deprecated environment variables#863
f4str merged 2 commits intomainfrom
docker-fix

Conversation

@f4str
Copy link

@f4str f4str commented Jul 28, 2021

Rabbitmq deprecated environment variables in release 3.9 (current latest) which causes the docker instances for web to no longer work. The quick fix for now is to pin version 3.8 to the rabbitmq image.

Furthermore, girder docker requires the pysnooper dependency to be run in dev mode, so added this to the dev requirements.

Finally, pinned the mc docker dev container to use mongo:latest to match the image in the mongo docker container. This does not change anything, but since all other images pin a version, this should follow the same convention.

@f4str f4str requested review from BryonLewis and subdavis July 28, 2021 14:14
@subdavis
Copy link
Contributor

Furthermore, girder docker requires the pysnooper dependency to be run in dev mode

Cannot reproduce

git checkout main
ldc build girder
ldc dev up girder

All working as intended. How do I produce an error that requires pysnooper?

@f4str
Copy link
Author

f4str commented Jul 28, 2021

@subdavis I followed the exact same sequence of commands. Trying ldc dev up girder gives the following error message

girder_1 | Traceback (most recent call last):
girder_1 | File "/opt/venv/bin/girder", line 33, in
girder_1 | sys.exit(load_entry_point('girder==3.1.5.dev8', 'console_scripts', 'girder')())
girder_1 | File "/opt/venv/lib/python3.7/site-packages/click/core.py", line 1137, in call
girder_1 | return self.main(*args, **kwargs)
girder_1 | File "/opt/venv/lib/python3.7/site-packages/click/core.py", line 1062, in main
girder_1 | rv = self.invoke(ctx)
girder_1 | File "/opt/venv/lib/python3.7/site-packages/click/core.py", line 1668, in invoke
girder_1 | return _process_result(sub_ctx.command.invoke(sub_ctx))
girder_1 | File "/opt/venv/lib/python3.7/site-packages/click/core.py", line 1404, in invoke
girder_1 | return ctx.invoke(self.callback, **ctx.params)
girder_1 | File "/opt/venv/lib/python3.7/site-packages/click/core.py", line 763, in invoke
girder_1 | return __callback(*args, **kwargs)
girder_1 | File "/opt/venv/lib/python3.7/site-packages/girder/cli/serve.py", line 35, in main
girder_1 | server.setup(mode)
girder_1 | File "/opt/venv/lib/python3.7/site-packages/girder/utility/server.py", line 153, in setup
girder_1 | girderWebroot, appconf = configureServer(mode, plugins, curConfig)
girder_1 | File "/opt/venv/lib/python3.7/site-packages/girder/utility/server.py", line 94, in configureServer
girder_1 | plugin._loadPlugins(info, plugins)
girder_1 | File "/opt/venv/lib/python3.7/site-packages/girder/plugin.py", line 198, in _loadPlugins
girder_1 | names = allPlugins()
girder_1 | File "/opt/venv/lib/python3.7/site-packages/girder/plugin.py", line 211, in allPlugins
girder_1 | return list(_getPluginRegistry().keys())
girder_1 | File "/opt/venv/lib/python3.7/site-packages/girder/plugin.py", line 179, in _getPluginRegistry
girder_1 | pluginClass = entryPoint.load()
girder_1 | File "/opt/venv/lib/python3.7/site-packages/pkg_resources/init.py", line 2449, in load
girder_1 | self.require(*args, **kwargs)
girder_1 | File "/opt/venv/lib/python3.7/site-packages/pkg_resources/init.py", line 2472, in require
girder_1 | items = working_set.resolve(reqs, env, installer, extras=self.extras)
girder_1 | File "/opt/venv/lib/python3.7/site-packages/pkg_resources/init.py", line 772, in resolve
girder_1 | raise DistributionNotFound(req, requirers)
girder_1 | pkg_resources.DistributionNotFound: The 'pysnooper' distribution was not found and is required by the application
girder_1 | [INFO tini (1)] Spawned child process 'girder' with pid '40'
girder_1 | [INFO tini (1)] Main child exited normally (with status '1')

The error log pretty much shows a missing pysnooper dependency. I should also note that I also did ldc pull to grab the newest instances of all images.

@BryonLewis
Copy link
Collaborator

docker-compose -f ./docker-compose.yml pull
docker-compose -f ./docker-compose.yml build --no-cache
ldc up

result in rabbit container giving an error:

error: RABBITMQ_DEFAULT_PASS is set but deprecated
error: RABBITMQ_DEFAULT_USER is set but deprecated
error: RABBITMQ_DEFAULT_VHOST is set but deprecated

error: deprecated environment variables detected

Please use a configuration file instead; visit https://www.rabbitmq.com/configure.html to learn more
could see in the output from the workers:
girder_worker_training_1 | [2021-07-28 18:00:10,808: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@rabbit:5672/default: failed to resolve broker hostname.

switch to rabbit:3.8-management fixes this issue

I can't confirm the pysnooper error either.

@f4str f4str changed the title Fixed rabbitmq deprecated variables and girder dev requirements Fixed rabbitmq docker deprecated environment variables Jul 29, 2021
@f4str
Copy link
Author

f4str commented Jul 29, 2021

Since the girder dev pysnooper error is not reproducible by others, I will assume it's an issue on my end. Reverted the girder dev requirements changes while only keeping the rabbitmq and mongo version pinning.

This should be noted for later that the mongo command is being deprecated in favor of mongosh. The mc docker container uses the mongo command and will be affected sometime down the line.

@f4str f4str merged commit 4128aba into main Jul 29, 2021
@f4str f4str deleted the docker-fix branch July 29, 2021 14:33
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

Successfully merging this pull request may close these issues.

3 participants