title: How to solve "Couldn't start vault with IPC_LOCK. Disabling IPC_LOCK" and "Cluster address must be set when using raft storage" errors?
body: <p>I use this following stack file to deploy the vault service in docker swarm mode.</p>
  <p>The stack file:</p>
  <pre><code>version: '3.8'
  services:
  
    faume-vault:
      image: vault:1.6.0
      environment:
        TZ: UTC
        VAULT_ADDR: 'http://0.0.0.0:8200'
        VAULT_LOCAL_CONFIG: |-
          {
            &quot;disable_cache&quot;: true,
            &quot;disable_mlock&quot;: true,
            &quot;ui&quot;: true,
            &quot;backend&quot;: {
              &quot;raft&quot;: {
                &quot;node_id&quot;: &quot;vault&quot;,
                &quot;path&quot;: &quot;/vault&quot;
              }
            },
            &quot;default_lease_ttl&quot;: &quot;168h&quot;,
            &quot;max_lease_ttl&quot;: &quot;720h&quot;,
            &quot;seal&quot;: {
              &quot;awskms&quot;: {
                &quot;access_key&quot;: &quot;xxxxxxxxxxxxxxxxxxxxxxx&quot;
                &quot;secret_key&quot;: &quot;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&quot;
                &quot;kms_key_id&quot;: &quot;xxxxxxxxxxxxxxxxxxxxxxx&quot;
              }
            },
            &quot;listener&quot;: {
              &quot;tcp&quot;: {
                &quot;address&quot;: &quot;0.0.0.0:8200&quot;,
                &quot;cluster_address&quot;: &quot;0.0.0.0:8201&quot;,
                &quot;tls_disable&quot;: true
              }
            },
            &quot;cluster_addr&quot;: &quot;http://vault.faume.local:8201&quot;,
            &quot;api_addr&quot;: &quot;http://vault.faume.local:8200&quot;
          }
      command: server
      volumes:
        - 'faume-vault:/vault'
      ports:
        - '8200:8200'
      networks:
        faume:
          aliases:
            - vault.faume.local
      deploy:
        mode: replicated
        replicas: 1
        restart_policy:
          condition: on-failure
        placement:
          constraints:
            - node.role==manager
  
  
  volumes:
    faume-vault:
  
  networks:
    faume:
  </code></pre>
  <p>When deploy the stack file, the service is created without errors, but service does not run.</p>
  <p>Service logs are as following:</p>
  <pre><code>faume-vault_faume-vault.1.xztddsvjaa2c@DevOps-Dhanushka    | Couldn't start vault with IPC_LOCK. Disabling IPC_LOCK, please use --privileged or --cap-add IPC_LOCK
  faume-vault_faume-vault.1.xkh8abjlzyel@DevOps-Dhanushka    | Couldn't start vault with IPC_LOCK. Disabling IPC_LOCK, please use --privileged or --cap-add IPC_LOCK
  faume-vault_faume-vault.1.xkh8abjlzyel@DevOps-Dhanushka    | 2021-07-26T08:20:15.705Z [INFO]  proxy environment: http_proxy= https_proxy= no_proxy=
  faume-vault_faume-vault.1.xztddsvjaa2c@DevOps-Dhanushka    | 2021-07-26T08:20:31.553Z [INFO]  proxy environment: http_proxy= https_proxy= no_proxy=
  faume-vault_faume-vault.1.xkh8abjlzyel@DevOps-Dhanushka    | Cluster address must be set when using raft storage
  faume-vault_faume-vault.1.xztddsvjaa2c@DevOps-Dhanushka    | Cluster address must be set when using raft storage
  faume-vault_faume-vault.1.5g7wzqm7fn0f@DevOps-Dhanushka    | Couldn't start vault with IPC_LOCK. Disabling IPC_LOCK, please use --privileged or --cap-add IPC_LOCK
  faume-vault_faume-vault.1.5g7wzqm7fn0f@DevOps-Dhanushka    | 2021-07-26T08:20:23.070Z [INFO]  proxy environment: http_proxy= https_proxy= no_proxy=
  faume-vault_faume-vault.1.5g7wzqm7fn0f@DevOps-Dhanushka    | Cluster address must be set when using raft storage
  faume-vault_faume-vault.1.kf0k9eoou749@DevOps-Dhanushka    | Couldn't start vault with IPC_LOCK. Disabling IPC_LOCK, please use --privileged or --cap-add IPC_LOCK
  faume-vault_faume-vault.1.kf0k9eoou749@DevOps-Dhanushka    | Cluster address must be set when using raft storage
  faume-vault_faume-vault.1.kf0k9eoou749@DevOps-Dhanushka    | 2021-07-26T08:20:39.894Z [INFO]  proxy environment: http_proxy= https_proxy= no_proxy=
  </code></pre>
  <p>It seems error is &quot;mlock&quot;. But I have configure &quot;mlock&quot; variable successfully. Can you please, make some suggestions?</p>