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

make: *** [init] Error 2 #4

Open
berrytchaks opened this issue Feb 23, 2017 · 8 comments
Open

make: *** [init] Error 2 #4

berrytchaks opened this issue Feb 23, 2017 · 8 comments

Comments

@berrytchaks
Copy link

berrytchaks commented Feb 23, 2017

Hi,

Nice job for the beat. I built this beat and I got the following

beatuser@wouritech:~/goworkspace/src/github.com/consulthys/springbeat$ make
glide update --no-recursive
[INFO]	Downloading dependencies. Please wait...
[INFO]	--> Fetching updates for github.com/elastic/beats.
[INFO]	Exporting resolved dependencies...
[INFO]	--> Exporting github.com/elastic/beats
[INFO]	Replacing existing vendor dependencies
[WARN]	Skipping lockfile generation because full dependency tree is not being calculated
make update
make[1]: Entering directory `/home/beatuser/goworkspace/src/github.com/consulthys/springbeat'
bash ./vendor/github.com/elastic/beats/libbeat/scripts/update.sh springbeat github.com/consulthys/springbeat ./vendor/github.com/elastic/beats/libbeat
Beat name: springbeat
Beat path: ../springbeat
Start modifying beat
Update config file
Update fields
Traceback (most recent call last):
  File "./vendor/github.com/elastic/beats/libbeat/scripts/generate_template.py", line 174, in <module>
    fields_to_es_template(input, output, beat_name + "-*")
  File "./vendor/github.com/elastic/beats/libbeat/scripts/generate_template.py", line 64, in fields_to_es_template
    "doc_values": defaults["doc_values"],
KeyError: 'doc_values'
make[1]: *** [update] Error 1
make[1]: Leaving directory `/home/beatuser/goworkspace/src/github.com/consulthys/springbeat'
make: *** [init] Error 2

Any clue?
Thanks.

@consulthys
Copy link
Owner

Thanks for reporting this. Which version of Go are you running?

@berrytchaks
Copy link
Author

Thanks for the reply, I'm using

go version go1.8 linux/amd64

@consulthys
Copy link
Owner

Hmm, Beats is still working with Go 1.7.1 if memory serves. Spring beat should work with that version.

@berrytchaks
Copy link
Author

I just gave it another try and here is what I get now

beatuser@host:~/goworkspace/src/github.com/consulthys/springbeat$ make
go build
# github.com/consulthys/springbeat/beater
beater/springbeat.go:29: undefined: common.Config
beater/springbeat.go:80: cannot use bt (type *Springbeat) as type beat.Beater in return argument:
    *Springbeat does not implement beat.Beater (missing Cleanup method)
beater/springbeat.go:86: b.Publisher.Connect undefined (type *publisher.PublisherType has no field or method Connect)
beater/springbeat.go:163: bt.client.Close undefined (type publisher.Client has no field or method Close)
make: *** [build] Error 2

@consulthys
Copy link
Owner

Are you using the latest Beats version? If yes, that's probably the reason as I haven't yet upgraded springbeat to use the latest Beats.

@berrytchaks
Copy link
Author

berrytchaks commented Feb 24, 2017

Are you using the latest Beats version? 

Yes

If I have to downgrade the beat version, which version will be the most adequate?
Thanks.

@consulthys
Copy link
Owner

I think it was Beats 5.0.1 at the time. You can give it a shot, but I'll have to update all my Beats very soon anyway

@c0dingarchit3ct
Copy link

The instructions assumed a fully functioning GO environment and even then the build breaks as others indicate.
I wonder what is the difference between this and other beats products where you just download the package (instead of making it) and execute it?. I have been using filebeat and heartbeat with no issue on Mac OSX, this somehow seemed impossible!.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants