ligato / vpp-agent

⚡️ Control plane management agent for FD.io's VPP
https://docs.ligato.io/
Apache License 2.0
252 stars 125 forks source link

localclient_linux example failure #102

Closed fgschwan closed 7 years ago

fgschwan commented 7 years ago

Hi, I was trying to run example github.com/ligato/vpp-agent/examples/localclient_linux/main.go, but console gave me this error:

INFO[0000] Starting the agent...                         BuildDate= BuildVersion= loc="core/agent_core.go(68)" tag=00000000
DEBU[0000] Microservice label is set to vpp1             loc="servicelabel/plugin_impl_servicelabel.go(49)" tag=00000000
INFO[0000] Plugin ServiceLabel: init success             loc="core/agent_core.go(148)" tag=00000000
INFO[0000] Plugin StatusCheck: init success              loc="core/agent_core.go(148)" tag=00000000
INFO[0000] Plugin LinuxLocalClient: init success         loc="core/agent_core.go(148)" tag=00000000
INFO[0000] Connected to VPP.                            
INFO[0000] Plugin govpp: status check probe registered   loc="statuscheck/plugin_impl_statuscheck.go(135)" tag=00000000
INFO[0000] Agent plugin state update.                    lastErr=<nil> loc="statuscheck/plugin_impl_statuscheck.go(163)" plugin=govpp state=ok tag=00000000
INFO[0000] Plugin GoVPP: init success                    loc="core/agent_core.go(148)" tag=00000000
DEBU[0000] Initializing Linux interface plugin           loc="linuxplugin/linuxplugin_init.go(66)" tag=00000000
DEBU[0000] Initializing LinuxInterfaceConfigurator       loc="linuxplugin/interface_config.go(101)" tag=00000000
INFO[0000] Plugin Linux: init success                    loc="core/agent_core.go(148)" tag=00000000
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x58 pc=0x97a271]

goroutine 8 [running]:
pantheon.tech/ligato-bgp/bgp-vpp-agent/vendor/github.com/ligato/vpp-agent/plugins/defaultplugins.(*Plugin).Init(0xc4200e1c88, 0xc42018b4f0, 0x1)
    /root/go/src/pantheon.tech/ligato-bgp/bgp-vpp-agent/vendor/github.com/ligato/vpp-agent/plugins/defaultplugins/defaultplugins_init.go:128 +0xd1
pantheon.tech/ligato-bgp/bgp-vpp-agent/vendor/github.com/ligato/cn-infra/core.(*Agent).initPlugins(0xc42019c030, 0x0, 0x0)
    /root/go/src/pantheon.tech/ligato-bgp/bgp-vpp-agent/vendor/github.com/ligato/cn-infra/core/agent_core.go:136 +0x76
pantheon.tech/ligato-bgp/bgp-vpp-agent/vendor/github.com/ligato/cn-infra/core.(*Agent).Start.func1(0xc42019c030, 0xc420019860, 0xc420019800)
    /root/go/src/pantheon.tech/ligato-bgp/bgp-vpp-agent/vendor/github.com/ligato/cn-infra/core/agent_core.go:78 +0x2f
created by pantheon.tech/ligato-bgp/bgp-vpp-agent/vendor/github.com/ligato/cn-infra/core.(*Agent).Start
    /root/go/src/pantheon.tech/ligato-bgp/bgp-vpp-agent/vendor/github.com/ligato/cn-infra/core/agent_core.go:89 +0x308
exit status 2

I was running your example inside your development docker image published on docker hub (https://hub.docker.com/r/ligato/vpp-agent/, label latest, build ~14:30 on 5.9.2017). I used similar setup like you described in https://github.com/ligato/vpp-agent/tree/master/docker/dev_vpp_agent#example-using-the-development-environment-on-a-macbook-with-gogland , just without using Kafka and Etcd. I was using master branch of vpp-agent (commit 600f99a121274aa6a936a160c0cf97a3112ad931).

I looked also inside your code and it looks like something Kafka related. Can someone help me with this?

lukasmacko commented 7 years ago

Hi,

it's a bug the flavor doesn't contain kafka plugin however the defaultplugins expect it. I'll fix that - kafka will be optional in the default plugins.

Regards, Lukas

fgschwan commented 7 years ago

It seems to be resolved. Thank you.