I ran this code:
job "zookeeper" {
constraint {
attribute = "${attr.unique.network.ip-address}"
value = "130.250.58.163"
}
datacenters = ["nosql_dc"]
type = "service"
group "zookeeper" {
count = 1
restart {
attempts = 0
}
task "instance" {
driver = "raw_exec"
kill_timeout = "60s"
resources {
network {
port "zookeeper_port" {
static = 2181
}
}
}
config {
command = "/nosql/zookeeper/bin/zkServer.sh"
args = ["start"]
}
service {
name = "zookeeper"
port = "zookeeper_port"
check {
name = "Zookeeper Check"
type = "tcp"
interval = "30s"
timeout = "10s"
port = "zookeeper_port"
}
}
}
}
}
Everything looks good, but it seems that nomad kills the process
Result after running:
Still error:
When I'm check with ps -ef | grep zoo
the process is not there.