Beats for Solaris Platform

(Shah) #1

I am trying to install beats for Solaris and some ARM platforms so I am compiling from source code.

As first step I tried to compile from source code for Solaris platform . Following are the steps I followed.

  1. Installed Go (1.4) BootStrap -
  2. Compiled GO (1.6) and generated GO binaries -
  3. Compile Beats using GO 1.6 as suggested here -

Step 1 and 2 went through fine but while trying to compile beats I am getting following error

My Environment Variable

GOPATH is /export/home/shamoham/go/go1_6/go/ 
GOROOT is /export/home/shamoham/go/go1_6/go 
PATH is /softwares/jdk/jdk1.8.0_45/:/opt/csw/bin:/opt/solarisstudio12.3/bin:/softwares/jdk/jdk1.8.0_45//bin:/usr/bin:/usr/sbin:/export/home/shamoham/go/go1_6/go/bin

STEP I used for compiling Beat (TopBeat)

shamoham@shamohamsolaris:/export/home/shamoham/go/go1_6/go/src/$ gmake
go build
../vendor/ cpuUsage.Get undefined (type Cpu has no field or method Get)
../vendor/ cpuUsage.Get undefined (type Cpu has no field or method Get)
../vendor/ l.Get undefined (type LoadAverage has no field or method Get)
../vendor/ m.Get undefined (type Mem has no field or method Get)
../vendor/ s.Get undefined (type Swap has no field or method Get)
../vendor/ f.Get undefined (type FileSystemUsage has no field or method Get)

I am not sure what is wrong in here. I am new to GO. Do I need to Use any specific Glide command before installation for pulling in dependency?

Note : I tried using make and i got an error so I used gmake above. Any help is appreciated

FileBeats on Solaris 11.3
(Andrew Kroh) #2

Topbeat isn't supported on Solaris which is why it won't compile. This is a limitation of the gosigar library.

And FYI, we do have a vagrant box for Solaris that we use for testing purposes. It has the Golang dev environment setup. We test libbeat, Filebeat, and Packetbeat on Solaris. We boot the vagrant box then Jenkins runs this script inside the box to build and test.

(Shah) #3

Hi @andrewkroh Thanks alot for your reply.

As suggested I tried to compile packet beat on solaris which went through fine and while executing packet beat on Solaris I am getting following error. Does this has some thing to do with GO?

Note: I thought of pulling the binary from elastic jenkins workspace, but looks like the build is in failed state.

sudo ./packetbeat -d '*' -e
2016/03/22 12:30:42.266559 beat.go:221: DBG  Initializing output plugins
2016/03/22 12:30:42.266669 geolite.go:24: INFO GeoIP disabled: No paths were set under shipper.geoip.paths
2016/03/22 12:30:42.266813 client.go:431: DBG  ES Ping(url=, timeout=1m30s)
2016/03/22 12:30:42.786221 client.go:440: DBG  Ping status code: 200
2016/03/22 12:30:42.786341 outputs.go:89: INFO Activated elasticsearch as output plugin.
2016/03/22 12:30:42.786362 publish.go:235: DBG  Create output worker
2016/03/22 12:30:42.786459 publish.go:277: DBG  No output is defined to store the topology. The server fields might not be filled.
2016/03/22 12:30:42.786539 publish.go:291: INFO Publisher name: sthjprtsol51
2016/03/22 12:30:42.786591 async.go:70: INFO Flush Interval set to: 1s
2016/03/22 12:30:42.786618 async.go:71: INFO Max Bulk Size set to: 50
2016/03/22 12:30:42.786635 async.go:79: DBG  create bulk processing worker (interval=1s, bulk size=50)
2016/03/22 12:30:42.786744 beat.go:238: INFO Init Beat: packetbeat; Version: 5.0.0-SNAPSHOT
panic: reflect: call of reflect.Value.Type on zero Value
goroutine 15 [running]:
panic(0xbf2b20, 0xc821232ca0)
		/export/home/shamoh/go/go1_6/go/src/runtime/panic.go:464 +0x3ef
reflect.Value.Type(0x0, 0x0, 0x0, 0x0, 0x0)
		/export/home/shamoh/go/go1_6/go/src/reflect/value.go:1671 +0x7b, 0xcf4380, 0xffff80ffbf3130a8, 0xc0dc60, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
		/export/home/shamoh/go/go1_6/go/src/ +0x143, 0x6, 0xd1afe8, 0x1, 0xffff80ffbf3130a8, 0xcf4380, 0xffff80ffbf346500, 0x16c75a8, 0x0, 0x0, ...)
		/export/home/shamoh/go/go1_6/go/src/ +0x370, 0x6, 0xd1afe8, 0x1, 0xae7f20, 0xc821282228, 0x195, 0xc821236068, 0x0, 0x0)
		/export/home/shamoh/go/go1_6/go/src/ +0x49d, 0x6, 0xd1afe8, 0x1, 0xae7f20, 0xc821282228, 0x195, 0xffff80ffbf346498, 0xc821236068, 0x0, ...)
		/export/home/shamoh/go/go1_6/go/src/ +0x807, 0xd216e0, 0x6, 0xd1afe8, 0x1, 0xc821247450, 0x9, 0xae7f20, 0xc821282228, 0x195, ...)
		/export/home/shamoh/go/go1_6/go/src/ +0x1c9, 0x6, 0xd1afe8, 0x1, 0xcbcc40, 0xc8211da200, 0x199, 0xc821236050, 0x0, 0x0)
		/export/home/shamoh/go/go1_6/go/src/ +0x6ee, 0x6, 0xd1afe8, 0x1, 0xcbcc40, 0xc8211da200, 0x199, 0xc821236050, 0x0, 0x0)
		/export/home/shamoh/go/go1_6/go/src/ +0x306*Config).Unpack(0xc821236050, 0xaae9e0, 0xc8211da200, 0xc8211c3db0, 0x1, 0x1, 0x0, 0x0)
		/export/home/shamoh/go/go1_6/go/src/ +0x204, 0xc8211da200, 0xc8211ca450, 0x27, 0x0, 0x0)
		/export/home/shamoh/go/go1_6/go/src/ +0x5bd*Packetbeat).Config(0xc8211da200, 0xc8211de480, 0x0, 0x0)
		/export/home/shamoh/go/go1_6/go/src/ +0x5d*Beat).Start(0xc8211de480, 0x0, 0x0)
		/export/home/shamoh/go/go1_6/go/src/ +0xdc
		/export/home/shamoh/go/go1_6/go/src/ +0x42
created by
		/export/home/shamoh/go/go1_6/go/src/ +0x8d

(Andrew Kroh) #4

I do not think this is a Solaris specific issue. It looks more like a config parsing issue/bug. Can you please post your configuration file.

(Shah) #5

@andrewkroh Please find my devices output. Also the packetbeat config file.

sudo ./packetbeat -devices
0: net0 (No description available)
1: lo0 (No description available)

(Andrew Kroh) #6

Thanks, I can reproduce the issue on OSX. We are investigating.

(Andrew Kroh) #7

I should have also mentioned the work-around. If you remove the empty config options (like mysql:) this should allow it to start.

(Shah) #8

Thanks @andrewkroh that indeed worked for packetbeats.

FYI.. Also the same config with out removing empty config worked on other platforms like linux. Is this a candidate bug for Solaris ?

(system) #9