Open vpriyada opened 7 years ago
try to use "GODEBUG=cgocheck=0 hekad -config xx.toml "
Thanks for the response SeeWei1986 I am getting this error 'GODEBUG' is not recognized as an internal or external command, operable program or batch file. Should I install GODEBUG? I have only GO installed in my machine and have created a environement variable GOPATH and its value as C:\Go\bin and also include path of Go in PATH variable.
[xxx@ip-172-31-12-225 tomls]$ /usr/local/bin/hekad -config hekad.toml 2016/07/29 07:52:53 Pre-loading: [LogOutput] 2016/07/29 07:52:53 Pre-loading: [LogstreamerInput] 2016/07/29 07:52:53 Pre-loading: [es_payload] 2016/07/29 07:52:53 Pre-loading: [NullSplitter] 2016/07/29 07:52:53 Loading: [NullSplitter] 2016/07/29 07:52:53 Pre-loading: [ProtobufDecoder] 2016/07/29 07:52:53 Loading: [ProtobufDecoder] 2016/07/29 07:52:53 Pre-loading: [ProtobufEncoder] 2016/07/29 07:52:53 Loading: [ProtobufEncoder] 2016/07/29 07:52:53 Pre-loading: [TokenSplitter] 2016/07/29 07:52:53 Loading: [TokenSplitter] 2016/07/29 07:52:53 Pre-loading: [PatternGroupingSplitter] 2016/07/29 07:52:53 Loading: [PatternGroupingSplitter] 2016/07/29 07:52:53 Pre-loading: [HekaFramingSplitter] 2016/07/29 07:52:53 Loading: [HekaFramingSplitter] 2016/07/29 07:52:53 Loading: [es_payload] 2016/07/29 07:52:53 Loading: [LogstreamerInput] 2016/07/29 07:52:53 Loading: [LogOutput] 2016/07/29 07:52:53 Starting hekad...
Here, that is the output message when I execute your codes in my linux environment. It presents the same results like yours.
Thus, When I add prefix "GODEBUG=cgocheck=0 ", it works well.
2016/07/29 07:56:05 Pre-loading: [LogstreamerInput] 2016/07/29 07:56:05 Pre-loading: [es_payload] 2016/07/29 07:56:05 Pre-loading: [LogOutput] 2016/07/29 07:56:05 Pre-loading: [HekaFramingSplitter] 2016/07/29 07:56:05 Loading: [HekaFramingSplitter] 2016/07/29 07:56:05 Pre-loading: [NullSplitter] 2016/07/29 07:56:05 Loading: [NullSplitter] 2016/07/29 07:56:05 Pre-loading: [ProtobufDecoder] 2016/07/29 07:56:05 Loading: [ProtobufDecoder] 2016/07/29 07:56:05 Pre-loading: [ProtobufEncoder] 2016/07/29 07:56:05 Loading: [ProtobufEncoder] 2016/07/29 07:56:05 Pre-loading: [TokenSplitter] 2016/07/29 07:56:05 Loading: [TokenSplitter] 2016/07/29 07:56:05 Pre-loading: [PatternGroupingSplitter] 2016/07/29 07:56:05 Loading: [PatternGroupingSplitter] 2016/07/29 07:56:05 Loading: [es_payload] 2016/07/29 07:56:05 Loading: [LogstreamerInput] 2016/07/29 07:56:05 Loading: [LogOutput] 2016/07/29 07:56:05 Starting hekad... 2016/07/29 07:56:05 Output started: LogOutput 2016/07/29 07:56:05 MessageRouter started. 2016/07/29 07:56:05 Input started: LogstreamerInput 2016/07/29 07:56:05 {"index":{"_index":"LogstreamerInput-2016.07.29","_type":"logfile-xxxx"}}
The same issue about "GODEBUG=cgocheck=0" can be found https://github.com/mozilla-services/heka/issues/1881.
That can give some suggestions to you and you can explore the solutions for window environment.
The checks can be disabled by setting the environment variable GODEBUG=cgocheck=0, but note that the vast majority of code identified by the checks is subtly incompatible with garbage collection in one way or another. https://golang.org/doc/go1.6
" GODEBUG=cgocheck=0 " it is a environment variable.
Hi, Could you tell me how to set this environment variable GODEBUG=cgocheck=0 I had Go installed in my windows not GODEBUG. So I did a git pull from "go get github.com/mailgun/godebug" Now godebug is present in my windows machine. After that if I give the command GODEBUG=cgocheck=0 -config=hekad.toml I get the following output:
**C:\etc>GODEBUG=cgocheck=0 hekad -config=hekad.toml godebug is a tool for debugging Go programs.
Usage:
godebug command [arguments]
The commands are:
build compile a debug-ready Go program
run compile, run, and debug a Go program
test compile, run, and debug Go package tests
Use "godebug help [command]" for more information about a command.**
I did not get the output like yours. Could you help me in this if you are aware of what I am missing.
Thanks.
I think it has nothing to do with the godebug command.... since it has not been installed in my linux. In your window cmd shell and try like this as follow.
set GODEBUG=cgocheck=0 hekad -config xx.toml
Hi SeeWei1986, It just worked :-) Thanks for your timely help and immediate response. You just made my day :-):-):-) It is working fine now after setting the environment variable.
:-)
Hi heka members, I am trying to make heka work with windows server 2012 R2 version. I downloaded heka source code from github and built it for windows.(followed the steps in https://hekad.readthedocs.io/en/v0.10.0/installing.html) Now I try to run a toml file with sandbox encoders that was generated as a part of heka build for windows.(for eg : lua_encoders/es_payload.lua)
And when I try to run hekad heka does not start. It exits in the state “starting hekad” Could you please suggest options if there is any specific way to build heka for windows to make it work with sandbox plugins? Should it be built with plugin_loader.cmake even though I have the default sandbox encoders and decoders.
Sample toml file: [LogstreamerInput] log_directory = "C:/" file_match = 'sample.txt'
[es_payload] type = "SandboxEncoder" filename = "lua_encoders/es_payload.lua" [es_payload.config] es_index_from_timestamp = true index = "%{Logger}-%{%Y.%m.%d}" type_name = "%{Type}-%{Hostname}"
[LogOutput] message_matcher = "TRUE" encoder = "es_payload"
Heka output screenshot: