ConSol-Monitoring / mod-gearman-worker-go

Mod-Gearman Worker rewrite in Golang
GNU General Public License v3.0
7 stars 10 forks source link

Windows Gearman does not work? #12

Open Slimaure opened 4 years ago

Slimaure commented 4 years ago

Please help me, i need to use modgearman on windows and no work Does mod_gearman need the file structure of linux even while in linux? Sorry for my bad english

I attach a part of the log [2019-09-28 10:05:23.841][Info][mod_gearman_worker.go:130] mod_gearman_worker - version 1.1.1 (Build: e6c4a4f) starting with 5 workers (max 50), pid: 2172 [2019-09-28 10:05:24.246][Warn][readAndExecute.go:274] system error: exec: "/usr/local/nagios/libexec/check_ping": file does not exist [2019-09-28 10:05:24.336][Warn][readAndExecute.go:274] system error: exec: "/bin/sh": file does not exist [2019-09-28 10:05:26.437][Warn][readAndExecute.go:274] system error: exec: "/bin/sh": file does not exist [2019-09-28 10:05:29.485][Info][mod_gearman_worker_windows.go:21] got sigint, quitting [2019-09-28 10:05:29.486][Info][mod_gearman_worker.go:95] mod-gearman-worker-go shutdown complete [2019-09-28 10:05:34.981][Info][mod_gearman_worker.go:130] mod_gearman_worker - version 1.1.1 (Build: e6c4a4f) starting with 5 workers (max 50), pid: 8496 [2019-09-28 10:05:36.432][Warn][readAndExecute.go:274] system error: exec: "/bin/sh": file does not exist [2019-09-28 10:05:46.437][Warn][readAndExecute.go:274] system error: exec: "/bin/sh": file does not exist [2019-09-28 10:05:56.440][Warn][readAndExecute.go:274] system error: exec: "/bin/sh": file does not exist [2019-09-28 10:06:06.503][Warn][readAndExecute.go:274] system error: exec: "/bin/sh": file does not exist [2019-09-28 10:06:16.437][Warn][readAndExecute.go:274] system error: exec: "/bin/sh": file does not exist

sni commented 4 years ago

to be honest, i never tried the worker on windows. It just that go allows easy cross compiling, so i created it for windows as well. The plugins are executed from the local disk, so of course you need to use a plugin path that exists on your window host. The /bin/sh thing could be fixed, the executeInShell() should probably simply return false on windows.