skip to Main Content

I’m using RabbitMQ in a docker swarm which has multiple services, all the other services are starting up fine, but the RabbitMQ container doesn’t, and the logs show the following error:

Failed to create thread: Operation not permitted (1)
Aborted (core dumped)

My docker-compose.yml file looks like this:

version: "3.6"

networks:
  rabbitmq:
    driver: overlay
    attachable: true

x-logging: &default-logging
  driver: json-file
  options:
    max-size: "10m"
    max-file: "5"

services:
 rabbitmq:
    image: rabbitmq:3
    hostname: rabbitmq
    logging: *default-logging
    deploy:
      mode: replicated
      replicas: 1
      labels:
        - "traefik.enable=false"
    networks:
      - rabbitmq

I tried passing this environment variable:

  enviroment:
    - RABBITMQ_IO_THREAD_POOL_SIZE=10 # Decreasing the number of threads

This was meant to decrease the number of threads in case that was the issue, but there was no difference.

What could be causing this error, and how could I go about fixing it?

Thanks in advance

2

Answers


  1. adding root permissions to the container can solve it

    privileged: true
    
    Login or Signup to reply.
  2. I had the same issue with the offical RabbitMQ docker image running on Azure Pipelines:

    Failed to create thread: Operation not permitted (1)
    Aborted (core dumped)
    

    With the following docker-compose file:

      rabbit:
        image: rabbitmq:3.10
        container_name: "rabbit_run_${IMAGE_TAG}"
    
        volumes:
          - ./config/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf
    

    I tried switching to bitnami/rabbitmq:3.11 in the same environment and this worked for me. This is however a workaround, and NOT a solution to fixing your problem with the official image:

      rabbit:
        image: bitnami/rabbitmq:3.11
        container_name: "rabbit_run_${IMAGE_TAG}"
        volumes:
          - ./config/rabbitmq.conf:/bitnami/rabbitmq/conf/custom.conf:ro
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search