Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mkdir /host_mnt/private/tmp/NomadClient942020698: permission denied #9

Open
Parmanand0712 opened this issue Apr 4, 2024 · 1 comment

Comments

@Parmanand0712
Copy link

when i am executing nomad job run pytechco-redis.nomad.hcl on macos then job is creating but status is dead and i am able to see logs :
Driver Failure: Failed to start container 1dad59d46811ddbf97eff6c7639ce52d5c2d56da282db83a1fd9efd8a6da9845: API error (500): error while creating mount source path '/host_mnt/private/tmp/NomadClient942020698/7349dde5-a58f-4ee3-4f07-48a022277c6b/alloc': mkdir /host_mnt/private/tmp/NomadClient942020698: permission denied

how to solve it.

@bshefflette-faire
Copy link

bshefflette-faire commented Oct 14, 2024

@Parmanand0712 I battled the same issue.

Follow these steps:
Create a custom nomad.hcl file:

client {
  enabled = true
  options {
    "driver.raw_exec.enable"    = "1"
    "docker.privileged.enabled" = "true"
  }
  alloc_dir = "/tmp/nomad"  # Directory for allocation data
}

plugin "docker" {
  config {
    allow_privileged = true
  }
}

^some config in here may be uneccessary but it worked for me!

Create the subdir /tmp/nomad

When you run your nomad agent command, point point to it with the config parameter:
nomad agent -dev -config=/Users/yourProfileName/nomad/learn-nomad-getting-started/shared/config/nomad2.hcl \\n -bind 0.0.0.0 \\n -network-interface='{{ GetDefaultInterfaces | attr "name" }}'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants