Error initializing storage of type raft: failed to create fsm: failed to open bolt file: open /data/vault.db: ped

Heya all :wave:

Having trouble even spinning up the simplest of Vault using Docker Swarm on Docker for Mac.

Here’s my docker-stack.yml:

---
version: "3.8"

services:
  vault:
    image: vault:latest
    environment:
      VAULT_LOCAL_CONFIG: >-
        ui = true
        disable_mlock = true
        storage "raft" {
          path = "/data"
          node_id = "raft_node_1"
        }
        listener "tcp" {
          address = "vault:8200"
        }
        api_addr = "http://valt:8201"
        cluster_addr = "http://vault:8201"
    command: server
    volumes:
      - vault:/data
    networks:
      - vault
    ports:
      - 8200:8200/tcp
    deploy:
      resources:
        reservations:
          cpus: '.25'
          memory: 256M
        limits:
          cpus: '.50'
          memory: 512M
      restart_policy:
        condition: on-failure
        delay: 5s
        max_attempts: 3
        window: 120s
      update_config:
        order: stop-first

networks:
  vault:
    driver: overlay

volumes:
  vault:
    driver: local

If you google around for that error you end up with (incorrectly) references to things talking about “shared volumes”. This isn’t the case here. This is something else and the error “ped” is really unhelpful.

Anyone run into this?

Kind regards

James

Hey James,

Not much experience with Docker, but that Vault config looks a bit odd: normally your cluster address is a +1 of your api address (so, typically, your api_addr is on 8200/tcp). Also, there’s a typo in the api_addr of valt.

Not sure whether that’s your problem, though.

JJ

I’m more concerned with the Bolt error at the moment :grin:

1 Like