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

Fail to start when a system hostname contains _ #1407

Closed
roman-vynar opened this Issue Feb 19, 2016 · 4 comments

Comments

Projects
None yet
3 participants
@roman-vynar
Copy link
Contributor

roman-vynar commented Feb 19, 2016

Prometheus fails to start silently when a system hostname contains _:

[root@centos6 ~]# hostname my_server
[root@centos6 ~]# /var/lib/prometheus/prometheus 
[root@centos6 ~]# strace /var/lib/prometheus/prometheus 
...
...
...
openat(AT_FDCWD, "/proc/sys/kernel/hostname", O_RDONLY|O_CLOEXEC) = 3
read(3, "my_server\n", 512)             = 10
close(3)                                = 0
mmap(0xc820200000, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc820200000
mmap(0xc81ffe8000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc81ffe8000
exit_group(2)                           = ?
+++ exited with 2 +++
[root@centos6 ~]# 

@fabxc

This comment has been minimized.

Copy link
Member

fabxc commented Feb 19, 2016

Thanks for reporting – this shouldn't fail silently. We simply missed to log the error (underscores in hostnames are not valid).

fabxc added a commit that referenced this issue Feb 19, 2016

@fabxc fabxc closed this in #1408 Feb 19, 2016

@roman-vynar

This comment has been minimized.

Copy link
Contributor Author

roman-vynar commented Feb 19, 2016

Thanks for quick reaction 👍

@pondix

This comment has been minimized.

Copy link

pondix commented Feb 19, 2016

Awesome!

fabxc added a commit that referenced this issue Mar 2, 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.