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

Marathon discovery - panic: runtime error: index out of range #1722

Closed
rohit01 opened this Issue Jun 10, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@rohit01
Copy link
Contributor

rohit01 commented Jun 10, 2016

Stacktrace:

panic: runtime error: index out of range

goroutine 219 [running]:
panic(0xd864c0, 0xc820010030)
    /usr/local/go/src/runtime/panic.go:481 +0x3e6
github.com/prometheus/prometheus/retrieval/discovery/marathon.targetForTask(0xc83e5e38e0, 0x0, 0x0)
    /go/src/github.com/prometheus/prometheus/retrieval/discovery/marathon/marathon.go:229 +0x1cf
github.com/prometheus/prometheus/retrieval/discovery/marathon.targetsForApp(0xc83e5e3b48, 0x0, 0x0, 0x0)
    /go/src/github.com/prometheus/prometheus/retrieval/discovery/marathon/marathon.go:219 +0x18b
github.com/prometheus/prometheus/retrieval/discovery/marathon.createTargetGroup(0xc83e5e3b48, 0xc83b2d9aa0)
    /go/src/github.com/prometheus/prometheus/retrieval/discovery/marathon/marathon.go:195 +0x33
github.com/prometheus/prometheus/retrieval/discovery/marathon.AppsToTargetGroups(0xc826630640, 0x56)
    /go/src/github.com/prometheus/prometheus/retrieval/discovery/marathon/marathon.go:187 +0xe0
github.com/prometheus/prometheus/retrieval/discovery/marathon.(*Discovery).fetchTargetGroups(0xc8393e00c0, 0xc8393ce3b8, 0x0, 0x0)
    /go/src/github.com/prometheus/prometheus/retrieval/discovery/marathon/marathon.go:113 +0xb1
github.com/prometheus/prometheus/retrieval/discovery/marathon.(*Discovery).updateServices(0xc8393e00c0, 0x7f0857028650, 0xc8393a7480, 0xc8393ce3c0, 0x0, 0x0)
    /go/src/github.com/prometheus/prometheus/retrieval/discovery/marathon/marathon.go:73 +0x50
github.com/prometheus/prometheus/retrieval/discovery/marathon.(*Discovery).Run(0xc8393e00c0, 0x7f0857028650, 0xc8393a7480, 0xc8393ce3c0)
    /go/src/github.com/prometheus/prometheus/retrieval/discovery/marathon/marathon.go:64 +0x177
created by github.com/prometheus/prometheus/retrieval.(*targetSet).runProviders
    /go/src/github.com/prometheus/prometheus/retrieval/targetmanager.go:328 +0x308

What did you do?
Using service discovery with marathon.

What did you expect to see?
Services running under marathon in targets.

What did you see instead? Under which circumstances?
Exception in logs. Index out of range.

Environment
OS: ubuntu 14.04 64bit server.

  • System information:
    Linux 4.2.0-36-generic x86_64
  • Prometheus version:
    Tested with prometheus 16.2, 19.2 and master branch.
@rohit01

This comment has been minimized.

Copy link
Contributor Author

rohit01 commented Jun 10, 2016

marathon service discovery calls URL: /v2/apps/?embed=apps.tasks

There can be valid applications in marathon with zero tasks.

beorn7 added a commit that referenced this issue Jun 14, 2016

Merge pull request #1729 from rohit01/release-0.19
discovery/marathon: #1722 - ignore apps with zero ports
@fabxc

This comment has been minimized.

Copy link
Member

fabxc commented Jun 14, 2016

@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.