axil_76
(axil)
March 3, 2016, 1:41pm
1
Hello,
I have a client compilation problem dockerbeat
make
first make sure we have godep
go get github.com/tools/godep
/usr/bin/godep go build
Godeps/_workspace/src/github.com/elastic/beats/libbeat/logp/log.go:145: undefined: log.LUTC
godep: go exit status 2
make: *** [dockerbeat] Error 1
do you have an idea ?
Which version of the Go compiler are you using?
axil_76
(axil)
March 4, 2016, 7:37am
3
go version
go version go1.3.3 linux/amd64
log.LUTC was introduced in Go 1.5 (see the release notes ) so you need to upgrade your Go compiler.
axil_76
(axil)
March 7, 2016, 10:13am
5
ok i migrates "go"
go version
go version go1.5.1 linux/amd64
but I don't know how to add the missing modules
go get GitHub - tools/godep: dependency tool for go
package bufio: unrecognized import path "bufio"
package bytes: unrecognized import path "bytes"
package encoding/json: unrecognized import path "encoding/json"
package errors: unrecognized import path "errors"
package flag: unrecognized import path "flag"
package fmt: unrecognized import path "fmt"
package io/ioutil: unrecognized import path "io/ioutil"
package os: unrecognized import path "os"
package path/filepath: unrecognized import path "path/filepath"
package io: unrecognized import path "io"
package math: unrecognized import path "math"
package log: unrecognized import path "log"
package reflect: unrecognized import path "reflect"
package strconv: unrecognized import path "strconv"
package text/tabwriter: unrecognized import path "text/tabwriter"
package strings: unrecognized import path "strings"
package encoding/xml: unrecognized import path "encoding/xml"
package net/http: unrecognized import path "net/http"
package net/url: unrecognized import path "net/url"
package os/exec: unrecognized import path "os/exec"
package regexp: unrecognized import path "regexp"
package go/ast: unrecognized import path "go/ast"
package go/build: unrecognized import path "go/build"
package go/parser: unrecognized import path "go/parser"
package go/printer: unrecognized import path "go/printer"
package go/token: unrecognized import path "go/token"
package path: unrecognized import path "path"
package runtime: unrecognized import path "runtime"
package runtime/pprof: unrecognized import path "runtime/pprof"
package sort: unrecognized import path "sort"
package text/template: unrecognized import path "text/template"
package unicode: unrecognized import path "unicode"
make: *** [dockerbeat] Error 1
[root@riy10202 dockerbeat-develop]# go version
go version go1.5.1 linux/amd64
how do you offline
Those packages are part of Go's standard library. Perhaps like your GOPATH or GOROOT environment variable hasn't been properly set up?
axil_76
(axil)
March 7, 2016, 1:39pm
7
export GOROOT=/usr/lib/golang
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin
make
first make sure we have godep
go get github.com/tools/godep
package bufio: unrecognized import path "bufio"
package bytes: unrecognized import path "bytes"
package encoding/json: unrecognized import path "encoding/json"
package errors: unrecognized import path "errors"
package flag: unrecognized import path "flag"
package fmt: unrecognized import path "fmt"
package io/ioutil: unrecognized import path "io/ioutil"
package os: unrecognized import path "os"
package path/filepath: unrecognized import path "path/filepath"
package io: unrecognized import path "io"
package math: unrecognized import path "math"
package log: unrecognized import path "log"
package reflect: unrecognized import path "reflect"
package strconv: unrecognized import path "strconv"
package text/tabwriter: unrecognized import path "text/tabwriter"
package strings: unrecognized import path "strings"
package encoding/xml: unrecognized import path "encoding/xml"
package net/http: unrecognized import path "net/http"
package net/url: unrecognized import path "net/url"
package os/exec: unrecognized import path "os/exec"
package regexp: unrecognized import path "regexp"
package go/ast: unrecognized import path "go/ast"
package go/build: unrecognized import path "go/build"
package go/parser: unrecognized import path "go/parser"
package go/printer: unrecognized import path "go/printer"
package go/token: unrecognized import path "go/token"
package path: unrecognized import path "path"
package runtime: unrecognized import path "runtime"
package runtime/pprof: unrecognized import path "runtime/pprof"
package sort: unrecognized import path "sort"
package text/template: unrecognized import path "text/template"
package unicode: unrecognized import path "unicode"
make: *** [dockerbeat] Error 1
same thing
axil_76
(axil)
March 8, 2016, 1:08pm
8
Can you tell me how do you install the missing modules
I have no idea what's up here. As I said these are standard Go packages that comes with the compiler. You may have better luck asking Go folks about this since it doesn't appear to have anything to do with Dockerbeat.
You could build it inside of Docker so you don't have to worry about your environment.
$ docker run -it --rm golang:1.5.3 /bin/bash
root@89373aa6f08a:/go# mkdir -p github.com/Ingensi
root@89373aa6f08a:/go/github.com/Ingensi# git clone https://github.com/Ingensi/dockerbeat.git
Cloning into 'dockerbeat'...
remote: Counting objects: 1435, done.
remote: Total 1435 (delta 0), reused 0 (delta 0), pack-reused 1435
Receiving objects: 100% (1435/1435), 1.13 MiB | 0 bytes/s, done.
Resolving deltas: 100% (631/631), done.
Checking connectivity... done.
root@89373aa6f08a:/go/github.com/Ingensi# cd dockerbeat/
root@89373aa6f08a:/go/github.com/Ingensi/dockerbeat# go get -d ./...
root@89373aa6f08a:/go/github.com/Ingensi/dockerbeat# go build
root@89373aa6f08a:/go/github.com/Ingensi/dockerbeat# ./dockerbeat -h
Makefile provide a dockermake
target to run dockerbeat compilation into a docker container.
So you should try the make dockermake
command
andrewkroh:
go get -d ./...
Hi
i did:
docker run -it --rm golang:1.6.2 /bin/bash
mkdir -p Ingensi · GitHub
cd Ingensi · GitHub
git clone GitHub - Ingensi/dockbeat: Dockbeat - the elastic Beat for docker daemon monitoring
cd dockerbeat/
go get -d ./...
and i got an error:
package The Go Programming Language cannot find package "The Go Programming Language " in any of:
/usr/local/go/src/golang.org/x/text/cldr (from $GOROOT)
/go/src/golang.org/x/text/cldr (from $GOPATH)
package github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts: cannot find package "github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts " in any of:
/usr/local/go/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts (from $GOROOT)
/go/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/opts (from $GOPATH)
......
......
......
do you have an idea ?
ruflin
(ruflin)
June 21, 2016, 12:04pm
13
Under Golang 1.6 vendorexperiment is already enabled by default and it seems like dockerbeat is checking in its dependencies, so it seems like you don't need to fetch them. What do you get if you run go build
?
root@d80de2d3c999:/go/github.com/Ingensi/dockerbeat# go build
_/go/github.com/Ingensi/dockerbeat
./main.go:12: cannot use beater.New() (type beater.Dockerbeat) as type "github.com/elastic/beats/libbeat/beat ".Beater in argument to "github.com/elastic/beats/libbeat/beat ".Run:
beater.Dockerbeat does not implement "github.com/elastic/beats/libbeat/beat ".Beater (wrong type for Cleanup method)
have Cleanup( "github.com/ingensi/dockerbeat/vendor/github.com/elastic/beats/libbeat/beat ".Beat) error
want Cleanup( "github.com/elastic/beats/libbeat/beat ".Beat) error
I try send data from my dockerserver to logstashserver.
Topbeat, filebeat and packetbeat are running. No problems. But dockerbeat is not easy.
Can you give me any instructions about configuration, please?
andrewkroh
(Andrew Kroh)
June 21, 2016, 12:56pm
16
I had no problems building dockerbeat. Make sure you have your Go build environment setup . I was on OSX so I added GOOS=linux
to my make
command so that the resulting binary is for linux (since I want to run it in a container).
$ echo $GOPATH
/Users/akroh/go
$ mkdir -p $GOPATH/src/github.com/ingensi
$ git clone https://github.com/Ingensi/dockerbeat.git
$ cd $GOPATH/src/github.com/ingensi/dockerbeat
$ GOOS=linux make
$ file dockerbeat
dockerbeat: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped
The configuration options are described in the project's README .