Your message dated Thu, 28 Jan 2021 23:19:19 +0000 with message-id <[email protected]> and subject line Bug#942871: fixed in prometheus-mongodb-exporter 1.0.0+git20180522.e755a44-3 has caused the Debian Bug report #942871, regarding prometheus-mongodb-exporter: segfaults with mongodb 4.2 to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 942871: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=942871 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: prometheus-mongodb-exporter Version: 1.0.0+git20180522.e755a44-1 Severity: important Tags: patch Dear maintainer: On a replica set where mongodb 4.0 and prometheus-mongodb-exporter used to work ok, an upgrade to mongodb 4.2 makes prometheus-mongodb-exporter to crash as soon as a request from prometheus is received: prometheus-mongodb-exporter.service: Main process exited, code=exited, status=2/INVALIDARGUMENT prometheus-mongodb-exporter.service: Unit entered failed state. prometheus-mongodb-exporter.service: Failed with result 'exit-code'. prometheus-mongodb-exporter.service: Service hold-off time over, scheduling restart. My /etc/default/prometheus-mongodb-exporter is like this: ARGS='-mongodb.uri="mongodb://user:password@localhost:27017" -log_dir /var/log/prometheus -web.listen-address :9201' And this is what I do to trigger a segfault: curl localhost:9201/metrics I found a solution here: https://www.bountysource.com/issues/65886524-nil-pointer-panic-when-monitoring-a-mongodb-with-no-username-and-password-set The attached patch, based on the post above, solves the problem for me, and I believe it is otherwise harmless for anybody who does not have the problem. I tested it by applying the patch to the package in stretch-backports. Maybe another option would be to switch to this upstream which is said to be more up-to-date: https://github.com/percona/mongodb_exporter but I have not tested it. Thanks.--- a/collector/metrics.go +++ b/collector/metrics.go @@ -349,7 +349,9 @@ func (replStats *ReplStats) Export(ch chan<- prometheus.Metric) { replStats.Apply.Export(ch) replStats.Buffer.Export(ch) replStats.Network.Export(ch) - replStats.PreloadStats.Export(ch) + if replStats.PreloadStats != nil { + replStats.PreloadStats.Export(ch) + } } // PreloadStats are the stats associated with preload operation.
--- End Message ---
--- Begin Message ---Source: prometheus-mongodb-exporter Source-Version: 1.0.0+git20180522.e755a44-3 Done: Martina Ferrari <[email protected]> We believe that the bug you reported is fixed in the latest version of prometheus-mongodb-exporter, which is due to be installed in the Debian FTP archive. A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to [email protected], and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Martina Ferrari <[email protected]> (supplier of updated prometheus-mongodb-exporter package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing [email protected]) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Format: 1.8 Date: Thu, 28 Jan 2021 22:56:24 +0000 Source: prometheus-mongodb-exporter Architecture: source Version: 1.0.0+git20180522.e755a44-3 Distribution: unstable Urgency: medium Maintainer: Debian Go Packaging Team <[email protected]> Changed-By: Martina Ferrari <[email protected]> Closes: 942871 Changes: prometheus-mongodb-exporter (1.0.0+git20180522.e755a44-3) unstable; urgency=medium . * Add patch to avoid a panic with newer versions of MongoDB. Closes: #942871 * debian/control: Update S-V to 4.5.1 with no changes. Checksums-Sha1: 42ee658a9ab2397c3601536c7bc42da67ec64a32 2477 prometheus-mongodb-exporter_1.0.0+git20180522.e755a44-3.dsc 8ba57177ad4dcd07b03662f133cc5f89d71c3637 12004 prometheus-mongodb-exporter_1.0.0+git20180522.e755a44-3.debian.tar.xz 1a9b8842e8a189bb9fde0fe46cb4af1ed65cab26 9094 prometheus-mongodb-exporter_1.0.0+git20180522.e755a44-3_amd64.buildinfo Checksums-Sha256: c16514a391a0b75e5fc0e8b29815e22c527af453b4544ab1464be9edb7eb5121 2477 prometheus-mongodb-exporter_1.0.0+git20180522.e755a44-3.dsc 78c9cd4e9e29472e240cb120e1b43de4a35b3106004aff33ce163d8e5efff7e3 12004 prometheus-mongodb-exporter_1.0.0+git20180522.e755a44-3.debian.tar.xz c43b7317978ad4051c053fc50a002bbda99eab15337465b7f54f9db33ea5428b 9094 prometheus-mongodb-exporter_1.0.0+git20180522.e755a44-3_amd64.buildinfo Files: 8686fa0709d84055b5448681e639c76a 2477 net optional prometheus-mongodb-exporter_1.0.0+git20180522.e755a44-3.dsc c73b1236f04f601624a18627e934263f 12004 net optional prometheus-mongodb-exporter_1.0.0+git20180522.e755a44-3.debian.tar.xz 42f2df7f9d4d89275c2dc74d4088def5 9094 net optional prometheus-mongodb-exporter_1.0.0+git20180522.e755a44-3_amd64.buildinfo -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE2qbv8cYn6hwmsaaSqiMPxF+MJ7EFAmATQi0ACgkQqiMPxF+M J7FViw//Q4CG5u1kgytpp0Uak8FWYHxeUTBSagauJFgdYoiSaFqcGUJJ+Fc+oeWf 5XNaqT8rWKLOXH+PycuG73wJ1SHaUG6/sxujY3jLwEOW5NXMBP7IIOA+2CrTxkrc 9slhHz3/b40k/ieKM399E2e0qE+cX1kqGsAyqVM1DlcjX/Ek+FCLFU4sh0c3lfoZ KEOwNFA/CI3sVHpxAD/jqBb58lqFzJPtXgMAJrpYmr6sExnCf1UcBvdpXcP1A1HZ OA5DLSow2vII3vOJDOb5qJ66YpBZfTYHCr8tBnHhTaNyMzOZAEtwfZAVm0O+laTa nw7AlB4r7oauddPpWZTAVRbYH0miWON/ccXaIaJmcxbDd2/R4ULgtdSSFHjAk8d6 n1NTraviJF58JD+WFrrNKgxHmwDWyab0cW+9bmv1WcxkX+jDUM8qNVxiRsfthO+Z 8R4cq6PNFRDnAPgNNpudRLgr/6KYGHj5KKE49TPbM6nkYER2UDbsLUGPrxfhn9Zv BY9vvYbLwQ7bKgjD0lrBg371l+t/YNjhsxBbk/vTvzziRNbcaQSik70StDTHLaLD cYcyyNe3lbUrx8kddhcWSHccYAQ+FpTu+gMAxpFoBWUkqS3ukcdFW64Of6icc0Dd w5Dqyc8MNUI5+fgtxeak5Zpq56p6S0sgrFXONuI+l3xj/R207Mo= =+MPZ -----END PGP SIGNATURE-----
--- End Message ---
_______________________________________________ Pkg-go-maintainers mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-go-maintainers
