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

Metricbeats panics in kvm dommemstat metricset #7792

Closed
adriansr opened this issue Jul 30, 2018 · 0 comments · Fixed by #7793
Closed

Metricbeats panics in kvm dommemstat metricset #7792

adriansr opened this issue Jul 30, 2018 · 0 comments · Fixed by #7793

Comments

@adriansr
Copy link
Contributor

For confirmed bugs, please report:

Enable kvm module:

metricbeat modules enable kvm

Run metricbeat

metricbeat run -N -e -d publish

Results:

2018-07-30T08:32:47.448Z	INFO	pipeline/module.go:98	Beat name: ubuntu-bionic
2018-07-30T08:32:47.451Z	INFO	instance/beat.go:367	metricbeat start running.
2018-07-30T08:32:47.451Z	INFO	[monitoring]	log/log.go:114	Starting metrics logging every 30s
2018-07-30T08:32:47.456Z	WARN	[cfgwarn]	dommemstat/dommemstat.go:67	EXPERIMENTAL: The kvm dommemstat metricset is experimental.
2018-07-30T08:32:47.470Z	INFO	cfgfile/reload.go:140	Config reloader started
2018-07-30T08:32:47.476Z	WARN	[cfgwarn]	dommemstat/dommemstat.go:67	EXPERIMENTAL: The kvm dommemstat metricset is experimental.
2018-07-30T08:32:47.476Z	INFO	cfgfile/reload.go:195	Loading of config files completed.
2018-07-30T08:32:47.481Z	ERROR	runtime/panic.go:63	recovered from panic while fetching 'kvm/dommemstat' for host 'localhost'. Recovering, but please report this.	{"panic": "runtime error: invalid memory address or nil pointer dereference", "stack": "github.com/elastic/beats/libbeat/logp.Recover\n\t/home/vagrant/go/src/github.com/elastic/beats/libbeat/logp/global.go:105\nruntime.call32\n\t/home/vagrant/.gvm/versions/go1.10.3.linux.amd64/src/runtime/asm_amd64.s:573\nruntime.gopanic\n\t/home/vagrant/.gvm/versions/go1.10.3.linux.amd64/src/runtime/panic.go:502\nruntime.panicmem\n\t/home/vagrant/.gvm/versions/go1.10.3.linux.amd64/src/runtime/panic.go:63\nruntime.sigpanic\n\t/home/vagrant/.gvm/versions/go1.10.3.linux.amd64/src/runtime/signal_unix.go:388\ngh.neting.cc/elastic/beats/metricbeat/module/kvm/dommemstat.(*MetricSet).Fetch\n\t/home/vagrant/go/src/github.com/elastic/beats/metricbeat/module/kvm/dommemstat/dommemstat.go:108\ngh.neting.cc/elastic/beats/metricbeat/mb/module.(*metricSetWrapper).fetch\n\t/home/vagrant/go/src/github.com/elastic/beats/metricbeat/mb/module/wrapper.go:238\ngh.neting.cc/elastic/beats/metricbeat/mb/module.(*metricSetWrapper).startPeriodicFetching\n\t/home/vagrant/go/src/github.com/elastic/beats/metricbeat/mb/module/wrapper.go:209\ngh.neting.cc/elastic/beats/metricbeat/mb/module.(*metricSetWrapper).run\n\t/home/vagrant/go/src/github.com/elastic/beats/metricbeat/mb/module/wrapper.go:196\ngh.neting.cc/elastic/beats/metricbeat/mb/module.(*Wrapper).Start.func1\n\t/home/vagrant/go/src/github.com/elastic/beats/metricbeat/mb/module/wrapper.go:137"}
2018-07-30T08:32:47.486Z	DEBUG	[publish]	pipeline/processor.go:308	Publish event: {
  "@timestamp": "2018-07-30T08:32:47.477Z",
  "@metadata": {
    "beat": "metricbeat",
    "type": "doc",
    "version": "6.5.0"
  },
  "metricset": {
    "name": "dommemstat",
    "module": "kvm",
    "host": "localhost",
    "rtt": 1355
  },
  "error": {
    "message": "dial: unknown network "
  },
  "beat": {
    "name": "ubuntu-bionic",
    "hostname": "ubuntu-bionic",
    "version": "6.5.0"
  },
  "host": {
    "name": "ubuntu-bionic"
  }
}

Stacktrace:

thub.com/elastic/beats/libbeat/logp.Recover
	/home/vagrant/go/src/github.com/elastic/beats/libbeat/logp/global.go:105
runtime.call32
	/home/vagrant/.gvm/versions/go1.10.3.linux.amd64/src/runtime/asm_amd64.s:573
runtime.gopanic
	/home/vagrant/.gvm/versions/go1.10.3.linux.amd64/src/runtime/panic.go:502
runtime.panicmem
	/home/vagrant/.gvm/versions/go1.10.3.linux.amd64/src/runtime/panic.go:63
runtime.sigpanic
	/home/vagrant/.gvm/versions/go1.10.3.linux.amd64/src/runtime/signal_unix.go:388
github.com/elastic/beats/metricbeat/module/kvm/dommemstat.(*MetricSet).Fetch
	/home/vagrant/go/src/github.com/elastic/beats/metricbeat/module/kvm/dommemstat/dommemstat.go:108
github.com/elastic/beats/metricbeat/mb/module.(*metricSetWrapper).fetch
	/home/vagrant/go/src/github.com/elastic/beats/metricbeat/mb/module/wrapper.go:238
github.com/elastic/beats/metricbeat/mb/module.(*metricSetWrapper).startPeriodicFetching
	/home/vagrant/go/src/github.com/elastic/beats/metricbeat/mb/module/wrapper.go:209
github.com/elastic/beats/metricbeat/mb/module.(*metricSetWrapper).run
	/home/vagrant/go/src/github.com/elastic/beats/metricbeat/mb/module/wrapper.go:196
github.com/elastic/beats/metricbeat/mb/module.(*Wrapper).Start.func1
	/home/vagrant/go/src/github.com/elastic/beats/metricbeat/mb/module/wrapper.go:137
@adriansr adriansr added bug Metricbeat Metricbeat labels Jul 30, 2018
@ruflin ruflin added the module label Jul 30, 2018
adriansr added a commit to adriansr/beats that referenced this issue Jul 31, 2018
Improper error handling caused a panic when connection to libvirtd
couldn't be stablished.

Cleaned up error handling a little bit.

Fixes elastic#7792
jsoriano pushed a commit that referenced this issue Jul 31, 2018
Improper error handling caused a panic when connection to libvirtd
couldn't be stablished.

Cleaned up error handling a little bit.

Fixes #7792

The default settings for the kvm module didn't work.

Updated to connect to the unix socket by default, and provide a hint on
how to setup access to libvirtd running on remote hosts.
jsoriano pushed a commit to jsoriano/beats that referenced this issue Oct 23, 2018
Improper error handling caused a panic when connection to libvirtd
couldn't be stablished.

Cleaned up error handling a little bit.

Fixes elastic#7792

The default settings for the kvm module didn't work.

Updated to connect to the unix socket by default, and provide a hint on
how to setup access to libvirtd running on remote hosts.

(cherry picked from commit 76d3949)
jsoriano pushed a commit to jsoriano/beats that referenced this issue Oct 23, 2018
Improper error handling caused a panic when connection to libvirtd
couldn't be stablished.

Cleaned up error handling a little bit.

Fixes elastic#7792

The default settings for the kvm module didn't work.

Updated to connect to the unix socket by default, and provide a hint on
how to setup access to libvirtd running on remote hosts.

(cherry picked from commit 76d3949)
jsoriano added a commit that referenced this issue Oct 24, 2018
Improper error handling caused a panic when connection to libvirtd
couldn't be stablished.

Cleaned up error handling a little bit.

Fixes #7792

The default settings for the kvm module didn't work.

Updated to connect to the unix socket by default, and provide a hint on
how to setup access to libvirtd running on remote hosts.

Co-authored-by: Adrian Serrano <adrisr83@gmail.com>

(cherry picked from commit 76d3949)
jsoriano added a commit that referenced this issue Oct 24, 2018
Improper error handling caused a panic when connection to libvirtd
couldn't be stablished.

Cleaned up error handling a little bit.

Fixes #7792

The default settings for the kvm module didn't work.

Updated to connect to the unix socket by default, and provide a hint on
how to setup access to libvirtd running on remote hosts.

Co-authored-by: Adrian Serrano <adrisr83@gmail.com>

(cherry picked from commit 76d3949)
leweafan pushed a commit to leweafan/beats that referenced this issue Apr 28, 2023
Improper error handling caused a panic when connection to libvirtd
couldn't be stablished.

Cleaned up error handling a little bit.

Fixes elastic#7792

The default settings for the kvm module didn't work.

Updated to connect to the unix socket by default, and provide a hint on
how to setup access to libvirtd running on remote hosts.

Co-authored-by: Adrian Serrano <adrisr83@gmail.com>

(cherry picked from commit 6de03f7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants