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

Cannot create Kubernetes discovery: open : no such file or directory #1236

Closed
calvinmorrow opened this Issue Nov 24, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@calvinmorrow
Copy link

calvinmorrow commented Nov 24, 2015

Prometheus 0.16.1, tested with linux-amd64 release as well as docker image:

Receiving the following error on startup: ERRO[0000] Cannot create Kubernetes discovery: open : no such file or directory source=targetmanager.go:424

I've tried multiple variations of configuration with no success. Strangely, changing the master address doesn't seem to affect the error at all. It doesn't seem like any tcp communication is happening; My perception is that the error is occurring due to absence of some configuration item and not from any actual Kubernetes API communication.

bash-4.2# ./prometheus -log.level debug -config.file=/etc/prometheus/prometheus.yml
prometheus, version 0.16.1 (branch: release-0.16.1, revision: 968ee35)
  build user:       fabianreinartz@macpro
  build date:       20151016-13:19:57
  go version:       1.5
INFO[0000] Loading configuration file /etc/prometheus/prometheus.yml  source=main.go:196
ERRO[0000] Cannot create Kubernetes discovery: open : no such file or directory  source=targetmanager.go:424
INFO[0000] Loading series map and head chunks...         source=storage.go:262
INFO[0000] 0 series loaded.                              source=storage.go:267
INFO[0000] Starting target manager...                    source=targetmanager.go:114
INFO[0000] Listening on :9090                            source=web.go:223

prometheus.yml:

global:
  scrape_interval:     60s # By default, scrape targets every 15 seconds.
  evaluation_interval: 60s # By default, scrape targets every 15 seconds.
  # scrape_timeout is set to the global default (10s).

scrape_configs:
- job_name: kubernetes

  bearer_token: <snip>

  kubernetes_sd_configs:
  - masters:
    - 'https://kubernetes.mydomain.com:6443'
@jimmidyson

This comment has been minimized.

Copy link
Member

jimmidyson commented Nov 24, 2015

So we need to improve that error message...

Think I've spotted the error (logic in https://github.com/prometheus/prometheus/blob/master/retrieval/discovery/kubernetes/discovery.go#L615-L618) - will fix tomorrow if noone else gets there first.

Edit: fixed already in master in 7ff5cc6#diff-2e9ac990890e333b554703c0c0eb7ebdR629 ff.

@jimmidyson jimmidyson closed this Nov 24, 2015

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