Nomad .net Core 8 service and Exit Code: 134, Signal: 6

I am trying to setup very simple .net core 8 console app running under nomad. Here is my job specification:

job "my-service" {
  datacenters = ["dc1"]
  type = "batch"

  group "group1" {
     scaling {
      min     = 1
      max     = 10
      enabled = true
}

constraint {
    attribute = "10.168.30.45"
    operator  = "set_contains"
    value     = "${attr.unique.network.ip-address}"
  }


   task "raw" {
      driver = "exec"

      artifact {
        source      = "https://my-registry.com/my-service.zip"
        destination = "local"
      }

      config {
        command = "/local/my-service/My.Linux.Service"
        args = ["arg1"]
      }

    }

    }
  }

I am trying to setup very simple .net core 8 console app running under nomad. Here is my job specification:

job "my-service" {
  datacenters = ["dc1"]
  type = "batch"

  group "group1" {
     scaling {
      min     = 1
      max     = 10
      enabled = true
}

constraint {
    attribute = "10.168.30.45"
    operator  = "set_contains"
    value     = "${attr.unique.network.ip-address}"
  }


   task "raw" {
      driver = "exec"

      artifact {
        source      = "https://my-registry.com/my-service.zip"
        destination = "local"
      }

      config {
        command = "/local/my-service/My.Linux.Service"
        args = ["arg1"]
      }
resources {
        memory = 64
      }
    }

    }
  }

My nomad client is RHEL 8. I installed .net 8 on my RHEL box and also run my service executing the command My.Linux.Service arg1 and it works just fine as seen below:


When I run my nomad job, I get the following error:

Exit Code: 134, Signal: 6

and job just terminates

I also enabled raw_exec plugin on my Nomad client and tried that as well with no avail. Any help in this regards is appreciated.

Any help… please. I really want my .net core services provisioned through Nomad.

Hi @andy222 I know nothing of .NET development, however some curosry googling suggests the SIGABRT could be due to running out of memory - which would not be surprising considering your job is only allocating 64 megabytes for the task.

Hi @seth.hoenig ,
I removed memory restrictions and still get the same error.
Since it is a long running process (.net core service), should I be running it as exec or row_exec?

I was also looking at systemd-nspawn and looks like my RHEL8 doesn’t have it installed?

If you remove the resources.memory altogether then Nomad defaults the value to 300 megabytes. How much memory does the application consume when running outside of Nomad?

The choice of task driver (exec vs. raw_exec) is irrelevant to whether the process is long running or short lived. What you need to choose is the correct job type - a service job is for long-running tasks that are expected to be restarted automatically if they ever stop. And a batch job is for short-lived tasks that are expected to complete at some point.

Duplicate of hashicorp - Nomad .net Core 8 service and Exit Code: 134, Signal: 6 - Stack Overflow