Datadog failing (Return non-zero code 1)

Can’t quite figure out what is going wrong. I’ve been using the same code for over a year now and suddenly this stopped working. I’m getting that irritating non-zero code error which I tried fixing by swapping %%BALENA_MACHINE_NAME%% for %%BALENA_ARCH%%.
Oddly, this is also the same install code in the Datadog/Kerberos example repo which worked in the past as well.

FROM balenalib/%%BALENA_MACHINE_NAME%%-ubuntu
RUN apt update && apt install -y nano wget curl sudo apt-transport-https sudo gnupg2 net-tools
RUN sudo sh -c "echo 'deb stable 7' > /etc/apt/sources.list.d/datadog.list"
RUN sudo apt-key adv --recv-keys --keyserver hkp:// A2923DFF56EDA6E76E55E492D3A80E30382E94DE
RUN sudo apt-get update && sudo apt-get install datadog-iot-agent


[datadog-iot] The command '/bin/sh -c sudo apt-get update && sudo apt-get install datadog-iot-agent' returned a non-zero code: 1

I thought I read somewhere that it might be an issue with the CLI so I also tested running both 12.50.2 and 12.50.1. Using an M1 Macbook which has caused some strange behaviors in other apps before so perhaps that is related?

fwiw, I also tested with the full flavored datadog agent by swapping apt-get install datadog-iot-agent with apt-get install datadog-agent to the same result, so it doesnt appear to be the odd datadog side issue.

Also relevant I suppose, this is on a Fin

Interesting…let me check the repo and try to run a build myself @barryjump.

Actually wait @barryjump – looks like they have significantly refactored the install, according to their Docs here:

I’ll have to rework my Dockerfile to accommodate those changes, but unfortunately with our Virtual Hackathon coming up and 3 more events next week, it might be a while before I get to it.

Or hey, if you tackle it, PR’s welcome! :stuck_out_tongue:

1 Like

Good eye! Fixed and PR is in the datadog-kerberos repo.


:partying_face: Thanks @barryjump - that’s a huge time-saver for me!