rabbitmq - Command "rabbitmq-plugins enable rabbitmq_management" fails with "Error: noproc"
问题描述
My team has a continuous integration script running in Bitbucket Pipelines that includes some RabbitMQ tests. Our bitbucket-pipelines.yml file looks like this:
image: python:3.6.8
pipelines:
default:
- step:
name: Run Tests
caches:
- pip
script:
- pip install -r requirements.txt
- apt-get update
- apt-get install -y rabbitmq-server
- rabbitmq-server -detached
- sleep 2
- rabbitmq-plugins enable rabbitmq_management
- sleep 2
- rabbitmqctl stop
- sleep 2
- rabbitmq-server -detached
- python tests.py
Around 50% of the time we get the following error:
+ rabbitmq-plugins enable rabbitmq_management
The following plugins have been enabled:
mochiweb
webmachine
rabbitmq_web_dispatch
amqp_client
rabbitmq_management_agent
rabbitmq_management
Applying plugin configuration to rabbit@90a65858-035c-4b74-be6b-a0e43bb508d1... failed.
Error: noproc
Re-running the pipeline generally "fixes" the problem. But this is eating away at our build minutes, and is quite frustrating to constantly re-run failed pipelines.
We added some sleep
commands in there to try and slow things down, but thats obviously not working as intended, because we keep getting the "Error: noproc"
I'm hopeful that we are just "holding it wrong" but after lots of research and experimentation, it's not clear to me what were doing wrong.
解决方案
推荐阅读
- javascript - RequireJs 不适用于 mysql 变量
- excel - excel vba发送带有嵌入图像的电子邮件
- swift - 如何显示和隐藏标签?
- python - python flask app.run 如何在所有测试完成后在 python 代码中自动停止烧瓶
- python - 在 django 映射中如何获得完整的选择数
- javascript - 如何使用Vue快速将多行附加到div(一次一行)并滚动到底部?
- javascript - 切换后重置 div 值
- javascript - 使用来自服务器的数据实现树列表
- javascript - 如何在每次按键时将输入屏蔽为 html 输入字段中预定义字符串中的字符?
- python - 为什么 matplotlib 不能在 VSCode 上工作