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

panic: runtime error: invalid memory address or nil pointer dereference #2149

Closed
maratkalibek opened this Issue Nov 3, 2016 · 4 comments

Comments

Projects
None yet
3 participants
@maratkalibek
Copy link

maratkalibek commented Nov 3, 2016

What did you do?
Restarted prometheus

What did you expect to see?
Started prometheus
What did you see instead? Under which circumstances?

Environment

Linux

  • System information:
Linux 4.4.0-38-generic x86_64
  • Prometheus version:
prometheus, version 1.3.0 (branch: master, revision: 18254a172b1e981ed593442b2259bd63617d6aca)
  build user:       root@d363f050a0e0
  build date:       20161101-17:06:27
  go version:       go1.7.3
  • Prometheus configuration file:
insert configuration here
  • Logs:
INFO[0726] All requests for rebuilding the label indexes queued. (Actual processing may lag behind.)  source=crashrecovery.go:528
INFO[0726] Checkpointing fingerprint mappings...         source=persistence.go:1372
INFO[0726] Done checkpointing fingerprint mappings in 99.016883ms.  source=persistence.go:1395
WARN[0726] Crash recovery complete.                      source=crashrecovery.go:151
INFO[0726] 98806 series loaded.                          source=storage.go:359
INFO[0726] Starting target manager...                    source=targetmanager.go:76
INFO[0726] Listening on :9090                            source=web.go:240
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x637b3a]

goroutine 275 [running]:
panic(0x1764a00, 0xc4200140a0)
	/usr/local/go/src/runtime/panic.go:500 +0x1a1
regexp.(*Regexp).FindStringSubmatchIndex(0x0, 0x0, 0x0, 0x7, 0x1, 0x0)
	/usr/local/go/src/regexp/regexp.go:922 +0x7a
github.com/prometheus/prometheus/relabel.relabel(0xc44612d440, 0xc420037a80, 0xc44612d440)
	/go/src/github.com/prometheus/prometheus/relabel/relabel.go:59 +0x6e3
github.com/prometheus/prometheus/relabel.Process(0xc420064e40, 0xc420483620, 0x3, 0x3, 0x6)
	/go/src/github.com/prometheus/prometheus/relabel/relabel.go:35 +0x158
github.com/prometheus/prometheus/retrieval.populateLabels(0xc420064e40, 0xc4204d4480, 0xc481be8c70, 0xc476d043a8, 0x0, 0x1)
	/go/src/github.com/prometheus/prometheus/retrieval/targetmanager.go:461 +0x39e
github.com/prometheus/prometheus/retrieval.targetsFromGroup(0xc420064c60, 0xc4204d4480, 0x0, 0xc4204e6d00, 0x1, 0x0, 0xc495381130)
	/go/src/github.com/prometheus/prometheus/retrieval/targetmanager.go:523 +0x1b1
github.com/prometheus/prometheus/retrieval.(*targetSet).runProviders.func1(0xc452d13510, 0xc498ebbec0, 0xc495381a40, 0xc452d13520, 0xc452d13508, 0x8, 0x2426580, 0xc45741ece0)
	/go/src/github.com/prometheus/prometheus/retrieval/targetmanager.go:298 +0x4d6
created by github.com/prometheus/prometheus/retrieval.(*targetSet).runProviders
	/go/src/github.com/prometheus/prometheus/retrieval/targetmanager.go:330 +0x2dc
@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Nov 3, 2016

Can you include your config file please, in particular all relabel stanzas?

@maratkalibek

This comment has been minimized.

Copy link
Author

maratkalibek commented Nov 3, 2016

all relabel_configs of such type

  relabel_configs:
    - source_labels: [__address__]
      regex: (.*)(:80)?
      target_label: __param_target
      replacement: ${1}
    - source_labels: [__param_target]
      regex: (.*)
      target_label: instance
      replacement: ${1}
    - source_labels: []
      regex: .*
      target_label: __address__
      replacement: <blackbox1>:9115
  relabel_configs:
    - source_labels: []
      regex: .*
      target_label: __address__
      replacement: <address>
    - source_labels: []
      regex: 
      target_label: instance
      replacement: <needed value>
    - source_labels: []
      regex: 
      target_label: job
      replacement: <needed value>

after asking for relabel_configs I suppose that the problem with latest one. I will also try redefine these parts.

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Nov 3, 2016

Hmm, I think your problem is the empty regexes in the last two actions. Try removing those.

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.