# Nomad-Consul Semver Issue

**URL:** <https://discuss.hashicorp.com/t/nomad-consul-semver-issue/69551>\
**Category:** Nomad\
**Created:** [August 26, 2024, 6:25pm UTC](https://discuss.hashicorp.com/t/nomad-consul-semver-issue/69551 "2024-08-26T18:25:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pipethedev](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/pipethedev/32/42714_2.png) [@pipethedev](https://discuss.hashicorp.com/u/pipethedev)\
**Post date:** [August 26, 2024, 6:25pm UTC](https://discuss.hashicorp.com/t/nomad-consul-semver-issue/69551/1 "2024-08-26T18:25:36Z")

</div>

```auto
job "mongodb-db" {
  datacenters = ["dc1"]
  type = "service"

  group "mongodb" {
    count = 1

    network {
      port "mongodb" {
        static = 27017
        to = 27017
      }
    }
    
      service {
        name = "mongodb"
        port = "mongodb"

        check {
          type = "tcp"
          port = "mongodb"
          interval = "10s"
          timeout = "2s"
        }
      }

    task "mongodb" {
      driver = "docker"
      
       env = {
          MONGO_INITDB_ROOT_USERNAME = "admin"
          MONGO_INITDB_ROOT_PASSWORD = "adminpass"
          MONGO_INITDB_DATABASE = "mydatabase"
          MONGO_INITDB_USERNAME = "myuser"
          MONGO_INITDB_PASSWORD = "mypassword"
       }

      config {
        image = "mongo:latest"
        ports = ["mongodb"]

        volumes = [
          "local/mongodb_data:/data/db"
        ]
      }

      resources {
        cpu = 500
        memory = 1024
      }
    }
  }
}

```

I keep getting this error when i include the service block in my nomad job file:

Scheduler dry-run

### mongodb

1 unplaced

- Constraint `${attr.consul.version} semver >= 1.8.0` filtered 3 nodes

how can i fix this issue

---

<div class="post-metadata">

**Author:** ![Kamilcuk](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@Kamilcuk](https://discuss.hashicorp.com/u/Kamilcuk)\
**Post date:** [August 27, 2024, 3:48am UTC](https://discuss.hashicorp.com/t/nomad-consul-semver-issue/69551/2 "2024-08-27T03:48:24Z")

</div>

Hi. Install and run and configure consul, or remove `service {` consul service definition from your job.

The `Constraint ${attr.consul.version} semver >= 1.8.0 filtered 3 nodes` means that none of the 3 nomad clients have consul installed with version greater or equal to 1.8.0.
