0

I am following to install cuckoo sandbox with docker: https://github.com/blacktop/docker-cuckoo

I did docker-compose up -d.

Mongo start but web service does not start it tryes to connect mongo.

I got:

CuckooCriticalError: Unable to connect to MongoDB: command SON([('listCollections', 1), ('cursor', {})]) on namespace cuckoo.$cmd failed: Unsupported OP_QUERY command: listCollections. The client driver may require an upgrade. For more details see https://dochub.mongodb.org/core/legacy-opcode-removal. In order to operate Cuckoo as per your configuration, a running MongoDB server is required.

Mongo is running in a container I am able to access mongosh and show all the databases.

this is my docker-compose.yml

version: "2"

services:
  cuckoo:
    image: blacktop/cuckoo:2.0
    command: daemon
    ports:
      - "2042:2042"
    volumes:
      - ./cuckoo-tmp/:/tmp/cuckoo-tmp/
      - ./storage/:/cuckoo/storage/
    networks:
      - cuckoo
    env_file:
      - ./2.0/config-file.env

  web:
    image: blacktop/cuckoo:2.0
    ports:
      - "80:31337"
    links:
      - mongo
      - elasticsearch
      - postgres
    command: web
    volumes:
      - ./cuckoo-tmp/:/tmp/cuckoo-tmp/
      - ./storage/:/cuckoo/storage/
    networks:
      - cuckoo
    env_file:
      - ./2.0/config-file.env

  api:
    depends_on:
      - postgres
    image: blacktop/cuckoo:2.0
    ports:
      - "8000:1337"
    links:
      - postgres
    command: api
    volumes:
      - ./cuckoo-tmp/:/tmp/cuckoo-tmp/
      - ./storage/:/cuckoo/storage/
    networks:
      - cuckoo
    env_file:
      - ./2.0/config-file.env

  # nginx:
  #   build: nginx/.
  #   depends_on:
  #     - mongo
  #   ports:
  #     - "80:80"
  #   links:
  #     - mongo
  #   networks:
  #     - cuckoo

  mongo:
    image: mongo:latest
    ports:
      - 27017
    volumes:
      - mongo-data:/data/db
    networks:
      - cuckoo

  elasticsearch:
    image: blacktop/elasticsearch:5.6
    ports:
      - 9200
    volumes:
      - es-data:/usr/share/elasticsearch/data
    networks:
      - cuckoo
    environment:
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms1g -Xmx1g"
    ulimits:
      memlock:
        soft: -1
        hard: -1
      nofile:
        soft: 65536
        hard: 65536
#    mem_limit: 1g

  postgres:
    image: postgres
    ports:
      - 5432
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: cuckoo
      PGDATA: /var/lib/postgresql/data/pgdata
      # POSTGRES_INITDB_ARGS: --data-checksums
    volumes:
      - postgres-data:/var/lib/postgresql/data/pgdata
    networks:
      - cuckoo

networks:
  cuckoo:
    driver: bridge

volumes:
  cuckoo-data:
  mongo-data:
  es-data:
  postgres-data:

SOLVED: I used mongodb version 3.6.8 and for elasticsearch I had to setup: sudo sysctl -w vm.max_map_count=262144

Thank

Raul Cejas
  • 399
  • 4
  • 13
  • Did you read the error message and the link? That repo is read only and the last commits were years ago. Sounds like it is using an old driver. Might need to run an older version of MongoDB or upgrade the drivers that cuckoo uses – user20042973 Jun 02 '23 at 04:09
  • Yes I know it is a readonly repo. I went back with mongodb version but in this case it did not start the container. – Raul Cejas Jun 02 '23 at 13:18
  • The point is that the repository seems to be old and unmaintained. Therefore, if you want to use it, you're going to have to do some legwork to bring it up to working order again. As far as I can tell that initial legwork involves either downgrading MongoDB or upgrading the drivers. You may face other challenges after that, but there's no way of knowing at this point. – user20042973 Jun 02 '23 at 14:04
  • Well someone recommend me cuckoo and it is the only one option to understand how to virtualize with docker. Do you know a freeware sandbox to recommend me ? – Raul Cejas Jun 02 '23 at 21:30
  • I solved using and old version. Cuckoo v2 is the last one but it is not updated. – Raul Cejas Jun 02 '23 at 21:32

0 Answers0