# Raw\_Exec Nomad Job Syntax

**URL:** <https://discuss.hashicorp.com/t/raw-exec-nomad-job-syntax/31296>\
**Category:** Nomad\
**Tags:** consul-nomad\
**Created:** [October 29, 2021, 3:59pm UTC](https://discuss.hashicorp.com/t/raw-exec-nomad-job-syntax/31296 "2021-10-29T15:59:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![arunkchow](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/arunkchow/32/20739_2.png) [@arunkchow](https://discuss.hashicorp.com/u/arunkchow)\
**Post date:** [October 29, 2021, 3:59pm UTC](https://discuss.hashicorp.com/t/raw-exec-nomad-job-syntax/31296/1 "2021-10-29T15:59:24Z")

</div>

I’m trying to kick off a Nomad job using **raw\_exec**. I modeled this job based on one of the Springboot **Java\_Driver** job. I don’t get any errors however the job and tasks fail.

This is app is written in **Go Lang** and it is compiled as executable file ( **main** ) and it takes argument to use a **port**. I’m using the **label http** and **NOMAD\_PORT** so that the ports can be dynamically assigned by Nomad so that this can be picked up by **Consul** and advertised into **Fabio**.

Also if I were to launch this app outside Nomad as standalone, by default this runs in foreground and had to kill by using **Ctrl+c**. Not sure if this is one of the problem.

```auto
job "some-job" {
  datacenters = ["some-dc"]
  type = "service"

  group "dev-poc" {
    count = 2
    task "dit-ui" {
      driver = "raw_exec"
      config {
        command = "/opt/app-dir-nomad/backend/main"
		args = ["-port=${NOMAD_PORT_http}"]
      }
      resources {
        cpu = 500
        memory = 300
                network {
                  port "http" {}
                }
      }
      service {
        port = "http"
        name = "dit-ui"
        tags = [
          "urlprefix-/idt-ui/ strip=/idt-ui",
          ]
        check {
          type = "http"
          path = "/"
          interval = "2s"
          timeout = "2s"
        }
      }
    }
  }
}

```

How can I fix this? Thanks in advance for help!
