[macOS 14.4.1] “node_exporter” is damaged and can’t be opened. You should move it to the Trash.
Host operating system: output of uname -a
➜ uname -a
Darwin Conrads-MacBook-Pro-2.local 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000 arm64
node_exporter version: output of node_exporter --version
When I run the above command, I'm getting the following error message:
node_exporter command line flags
NA
node_exporter log output
NA
Are you running node_exporter in Docker?
I'm running node_exporter as a standalone executable.
What did you do that produced an error?
./node_exporter
What did you expect to see?
I expected to see something similar to the following:
INFO[0000] Starting node_exporter (version=0.16.0, branch=HEAD, revision=d42bd70f4363dced6b77d8fc311ea57b63387e4f) source="node_exporter.go:82"
INFO[0000] Build context (go=go1.9.6, user=root@a67a9bc13a69, date=20180515-15:53:28) source="node_exporter.go:83"
INFO[0000] Enabled collectors: source="node_exporter.go:90"
INFO[0000] - boottime source="node_exporter.go:97"
...
INFO[0000] Listening on :9100 source="node_exporter.go:111"
What did you see instead?
It's a codesigning issue because I was able to use the following to get things working:
codesign -vvv \
--force \
--strict \
--timestamp \
--options=runtime \
--sign "Developer ID Application: <NAME> (<TEAMEID>)" ./node_exporter
After you run the executable, one will see the following message:
Then navigate to Settings -> Privacy & Security and click the 'Open Anyway' button towards the bottom of the page.
:eyeglasses: @gitperr
You should consider upgrading from v0.16.0. This version is out of date by 6 years.
We also introduced code signing in the latest v1.8.0 release,
@SuperQ Yes, the errors that I'm getting are coming from node_exporter v1.8.0. The example output is simply an example of what I expect to see when starting the executable.
@SuperQ I think #3008 did not make it into that release you mentioned, we might have forgotten to cut a new release after it was merged.
And just out of curiosity, what was the download method? Even if you download a rcodesign signed binary using Safari directly, it errors out. I try with wget or curl usually, then untar. I was able to make it work like that at least.
@gitperr I downloaded it from the releases page on GitHub using Chrome. In any case, I'm seeing the following after I use wget and tar:
./node_exporter --version
[1] 6596 killed ./node_exporter --version
I believe the codesigning and notarization should be a part of the CI workflow.
Code signing was added as SuperQ mentioned, but did not make it to the release you downloaded. Let's try again when a new release is cut including #3008
Following the steps in this thread worked - https://github.com/prometheus/node_exporter/pull/3008#issuecomment-2088507941
Yes, this codesigned binary needs to be released to make this a seamless process 👍
@conradwt Now the code signed binary is released, please retry downloading and opening node exporter following these steps:
1- get with curl instead of downloading using a browser, make sure it is the correct arch. Here I put arm
curl -L https://github.com/prometheus/node_exporter/releases/download/v1.8.1/node_exporter-1.8.1.darwin-arm64.tar.gz --output node_exporter.tar.gz
2- untar it
tar xvfz node_exporter.tar.gz
3- cd into the untarred directory and run it
cd node_exporter-1.8.1.darwin-arm64 && ./node_exporter
Downloading via a web browser does not work because we are signing with rcodesign instead of Apple's own codesign, until we get Mac build machine, this solution should work.
@gitperr I was able to download via the browser and simply click the button within Privacy & Security. Thus, it's working as expected now and please feel free to close this issue.