[go: nahoru, domu]

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

Issue with 0.13.0 #148

Closed
swiffer opened this issue Feb 17, 2023 · 12 comments · Fixed by #149
Closed

Issue with 0.13.0 #148

swiffer opened this issue Feb 17, 2023 · 12 comments · Fixed by #149

Comments

@swiffer
Copy link
swiffer commented Feb 17, 2023

After upgrading to 0.13.0 I'm getting these errors on startup

ts=2023-02-17T06:23:32.653Z caller=apache_exporter.go:68 level=info msg="Starting apache_exporter" version="(version=0.13.0, branch=HEAD, revision=da7af963624c7495c77ed451d095bbeae2c3c5b8)"
ts=2023-02-17T06:23:32.653Z caller=apache_exporter.go:69 level=info msg="Build context" build="(go=go1.19.6, platform=linux/amd64, user=root@356287e981e1, date=20230217-04:05:35)"
ts=2023-02-17T06:23:32.653Z caller=apache_exporter.go:70 level=info msg="Starting Server: " listen_address=127.0.0.1:9117
ts=2023-02-17T06:23:32.653Z caller=apache_exporter.go:71 level=info msg="Collect from: " scrape_uri=http://localhost/server-status/?auto
ts=2023-02-17T06:23:32.653Z caller=apache_exporter.go:75 level=info msg="listening and wait for graceful stop"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x8b82b5]

goroutine 1 [running]:
github.com/prometheus/exporter-toolkit/web.ListenAndServe(0xe06100?, 0xc000011050, {0xa8f400, 0xc00010f780})
/go/pkg/mod/github.com/prometheus/exporter-toolkit@v0.8.2/web/tls_config.go:206 +0x55
main.main()
/app/apache_exporter.go:97 +0xb05

@Lusitaniae
Copy link
Owner

Apologies, looks like we need more automated testing!

I'll set the release back to pre release

@swiffer
Copy link
Author
swiffer commented Feb 17, 2023

no worries - looking for the next version then. thanks!

@corporate-gadfly
Copy link

Another report, just to give you some variety of platforms:

    Virtualization: vmware
  Operating System: CentOS Stream 8
       CPE OS Name: cpe:/o:centos:centos:8
            Kernel: Linux 4.18.0-448.el8.x86_64
      Architecture: x86-64

@ethan-gallant
Copy link
Contributor

Found the issue, this PR upstream should resolve it prometheus/exporter-toolkit#127

It can be locally fixed as well by specifying the new parameters.

blkperl added a commit to blkperl/apache_exporter that referenced this issue Feb 17, 2023
fixes Lusitaniae#148

Co-authored-by: Ethan Gallant <ethan.gallant@acquia.com>
Co-authored-by: Stephanie Palis <stephanie.palis@acquia.com>
@blkperl
Copy link
Collaborator
blkperl commented Feb 17, 2023

@Lusitaniae, We opened a PR #149 feel free to add changes. We will still need a follow up PR to improve tests.

@dswarbrick
Copy link
Contributor
dswarbrick commented Feb 18, 2023

The real issue is that the newer exporter-toolkit version is not really being used in an optimal way by apache_exporter.

A kingpinflag.AddFlags helper function adds the web.listen-address, web.config.file and web.systemd-socket (if GOOS = linux), and will populate a web.FlagConfig struct to be passed to web.ListenAndServe.

Admittedly, this would mean breaking / renaming the existing telemetry.address and web.config flags which are explicitly added by apache_exporter.

Lusitaniae added a commit that referenced this issue Feb 19, 2023
fix: panic caused by missing flagConfig options
@Lusitaniae
Copy link
Owner

Re released 0.13.0 if you'd like to try it @swiffer @corporate-gadfly

Any suggestions for the proper fix @dswarbrick ?

@Lusitaniae Lusitaniae reopened this Feb 19, 2023
@swiffer
Copy link
Author
swiffer commented Feb 19, 2023

@Lusitaniae thanks - for now working fine!

@dswarbrick
Copy link
Contributor

@Lusitaniae Take a look at how node_exporter uses it - but as I say, beware that some flag names will change. I can submit a PR if you're ok with that.

@blkperl
Copy link
Collaborator
blkperl commented Mar 7, 2023

@dswarbrick A PR would be great. Thanks!

@Lusitaniae
Copy link
Owner

Released 0.13.1 with #149

if anyone would like to test would be appreciated

@blkperl
Copy link
Collaborator
blkperl commented Apr 5, 2023

We tested and released this to prod. It's working. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants