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

[question] Use driver/raw_exec run a node server job on windows server 2012 R2, job always pending #2354

Closed
ArthurJiang opened this issue Feb 24, 2017 · 4 comments

Comments

@ArthurJiang
Copy link

If you have a question, prepend your issue with [question] or preferably use the nomad mailing list.

If filing a bug please include the following:

Nomad version

Nomad v0.5.0

Operating system and Environment details

Microsoft Windows Server 2012 R2 Datacenter

Issue

Job always pending.

Reproduction steps

  1. nomad run job_file
  2. nomad status job

Nomad Server logs (if appropriate)

Error querying allocation: Unexpected response code: 500 (rpc error: alloc lookup failed: index error: Invalid UUID: encoding/hex: invalid byte: U+006E 'n')

Nomad Client logs (if appropriate)

Job file (if appropriate)

job "simple_http" {
region = "japan"
datacenters = ["japaneast"]
type = "service"

constraint {
attribute = "${attr.kernel.name}"
value = "windows"
}

group "winml01" {
count = 1

task "server" {
  driver = "raw_exec"

  config {
command = "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
args	= [ "cd c:\\simple_node", "node.exe index.js"]
  }

  service {
    name = "simple_http"
    tags = ["simple_http", "winml01"]
    port = "http"
    check {
      name     = "alive"
      type     = "tcp"
      interval = "10s"
      timeout  = "2s"
    }
  }

  resources {
    cpu    = 300
    memory = 300
    network {
      mbits = 10
      port "http" {}
    }
  }
}

}
}

@ArthurJiang
Copy link
Author

{"Type":"Restarting","Time":1487903145262566000,"FailsTas
k":false,"RestartReason":"Exceeded allowed attempts, applying a delay","SetupError":"","DriverError
":"","ExitCode":0,"Signal":0,"Message":"","KillTimeout":0,"KillError":"","KillReason":"","StartDela
y":7293893700,"DownloadError":"","ValidationError":"","DiskLimit":0,"FailedSibling":"","VaultError"
:"","TaskSignalReason":"","TaskSignal":"","DriverMessage":""}

@ArthurJiang
Copy link
Author

My client side try restarting again and again
2017/02/24 02:40:41.604061 [INFO] client: Restarting task "server" for alloc "ed4f8454-2fbb-219f
-ca07-b486c8d7cda1" in 16.389039998s
2017/02/24 02:40:59.488404 [INFO] client: task "server" for alloc "ed4f8454-2fbb-219f-ca07-b486c
8d7cda1" completed successfully
2017/02/24 02:40:59.488404 [INFO] client: Restarting task "server" for alloc "ed4f8454-2fbb-219f
-ca07-b486c8d7cda1" in 23.4069825s

@dadgar
Copy link
Contributor

dadgar commented Feb 25, 2017

@ArthurJiang Hey can you show the output of nomad alloc-status <alloc-id>. It seems like the application may just be exiting with a non-zero exit code and nomad is restarting the job.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants