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

Error: "ERRO[0000] Invalid Prometheus URL" - URL actually valid #1471

Closed
jurij opened this Issue Mar 8, 2016 · 5 comments

Comments

Projects
None yet
3 participants
@jurij
Copy link

jurij commented Mar 8, 2016

Hi,

I have problems starting a fresh downloaded binary of prometheus.
I think there is an Issue with govalidator.IsURL(cfg.prometheusURL). Which is returning false on a valid URL http://juRiii-NB:9090/. For now, Im starting prometheus with ./prometheus -web.external-url=localhost:9090. See below.

juriii@juRiii-NB ~/dev/prometheus $ ls
console_libraries  consoles  data  prometheus  prometheus.yml  promtool
juriii@juRiii-NB ~/dev/prometheus $ cat prometheus.yml 
global:
  scrape_interval:     15s # By default, scrape targets every 15 seconds.

  # Attach these labels to any time series or alerts when communicating with
  # external systems (federation, remote storage, Alertmanager).
  external_labels:
    monitor: 'codelab-monitor'

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: 'prometheus'

    # Override the global default and scrape targets from this job every 5 seconds.
    scrape_interval: 5s

    target_groups:
      - targets: ['localhost:9090']
juriii@juRiii-NB ~/dev/prometheus $ ./prometheus
ERRO[0000] Invalid Prometheus URL: http://juRiii-NB:9090/  source=main.go:65
juriii@juRiii-NB ~/dev/prometheus $ ping juRiii-NB
PING juRiii-NB (127.0.1.1) 56(84) bytes of data.
64 bytes from juRiii-NB (127.0.1.1): icmp_seq=1 ttl=64 time=0.072 ms
64 bytes from juRiii-NB (127.0.1.1): icmp_seq=2 ttl=64 time=0.056 ms
64 bytes from juRiii-NB (127.0.1.1): icmp_seq=3 ttl=64 time=0.063 ms
^C
--- juRiii-NB ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.056/0.063/0.072/0.011 ms
juriii@juRiii-NB ~/dev/prometheus $ ./prometheus -web.external-url=localhost:9090
prometheus, version 0.17.0 (branch: release-0.17, revision: e11fab3)
  build user:       fabianreinartz@macpro
  build date:       20160302-17:48:43
  go version:       1.5.3
INFO[0000] Loading configuration file prometheus.yml     source=main.go:202
INFO[0000] Loading series map and head chunks...         source=storage.go:299
INFO[0000] 351 series loaded.                            source=storage.go:304
WARN[0000] No AlertManager configured, not dispatching any alerts  source=notification.go:165
INFO[0000] Starting target manager...                    source=targetmanager.go:114
INFO[0000] Target manager started.                       source=targetmanager.go:168
INFO[0000] Listening on :9090                            source=web.go:239
@grobie

This comment has been minimized.

Copy link
Member

grobie commented Mar 8, 2016

Hostnames are case insensitive. What is the requirement to set juRiii-NB instead of juriii-nb?

@jurij

This comment has been minimized.

Copy link
Author

jurij commented Mar 8, 2016

juRiii-NB is my hostname. so the behavior is expected?

@grobie

This comment has been minimized.

Copy link
Member

grobie commented Mar 8, 2016

No, but it seems to be an edge case. I think your problem is already reported in govalidator in asaskevich/govalidator#117.

I'd suggest to let them know that this affects you as well and lowercase your hostname until then. Something like ./prometheus -web.external-url=http://$(hostname | tr A-Z a-z):9090.

@grobie grobie added the bug label Mar 8, 2016

@beorn7 beorn7 added the duplicate label Mar 8, 2016

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented Mar 8, 2016

I'll declare this a dup of asaskevich/govalidator#117 then. Thanks for reporting and investigating.

@beorn7 beorn7 closed this Mar 9, 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.