首页 > 解决方案 > 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.

标签: rabbitmqbitbucket-pipelines

解决方案


推荐阅读