Deployment of OneAgent fails inside Docker

Hello.

Having created the deloyment ‘package’ through the “deploy dynatrace” steps on our portal, I proceed to select ‘Kubernetes’, fill out the necessary details an dtokens, download the dynakube.yaml file, verified its content, then running the 4 script steps that use kubectl.

This results in getting 5 pods in the dynatrace namespace, with 4 of them running ok (webhook, operator, activegate) with the 5th (oneagent) running an endless crash-restart.

Checking the log files the first error we saw was related to missing “/OPT” which was easily remedied.

The next error is printed out as

“XZ compressed archive is corrupted or memory allocation failed. Installation aborted.”

checking the oneagent install log, I see that the line above this error prints out

/opt/dynatrace/oneagent/Dynatrace-OneAgent-Linux.sh: line 3023: /opt/dynatrace/oneagent/xzdec: not found

when inspecting the installation script Dynatrace-OneAgent-Linux.sh I see it contains the instalation files as base64, and after having extracted the .tar file, I see that this contains the xzdec file in question so I am guessing it is the extraction that fails?

--

2023-04-18 08:31:01 UTC [INFO] Unpacking. This may take a while…
2023-04-18 08:31:01 UTC [INFO] /opt/dynatrace/oneagent/agent_install_75237 does not exist, skipping removal
2023-04-18 08:31:01 UTC [INFO] Creating temporary unpack folder /opt/dynatrace/oneagent/agent_install_75237
2023-04-18 08:31:01 UTC [INFO] Creating directory /opt/dynatrace/oneagent/agent_install_75237 with rights 755
2023-04-18 08:31:01 UTC [INFO] Unpacking without cache
2023-04-18 08:31:01 UTC [INFO] Determining begin of tar archive…
2023-04-18 08:31:01 UTC [INFO] tarBegin=4947 tarEnd=3501054
2023-04-18 08:31:01 UTC [INFO] tarLength=3496107
/opt/dynatrace/oneagent/Dynatrace-OneAgent-Linux.sh: line 3023: /opt/dynatrace/oneagent/xzdec: not found
tar: short read
2023-04-18 08:31:03 UTC [ERROR] XZ compressed archive is corrupted or memory allocation failed. Installation aborted.

--

Looking into the container as the installation is ongoing I see there is a targile_xxxxx.base64 file, but this is only 5.1M which is far from the size of the original which should be around 217M

From what I read, tar short read is regarding a corrupted tar file, but since this is reading from the large text file is this why getting the out of memory error then the tar error pointing to a corrupt file is because it didn’t extract the whole installation tarball?

Is there a Dynatrace docker install where the script and the .tar file are separate entities?

Hi @tb01,

For Kubernetes-based environments, I recommend using Dynatrace Operator. You can find full instructions in the link below.

or

You can also try to install OA directly on Docker based on this instruction.

Here’s how to change OA installation paths in case you don’t have a standard file system on your system:

Radek

Please see @Julius_Loman’s answer in another topic, as you may have a situation where your setup is not supported.

https://community.dynatrace.com/t5/Container-platforms/Docker-for-Mac-OneAgent-fails-with-quot-Archive-is-corrupted/m-p/30662

Thanks for reply.

Yea, I was kinda hoping that there had been some updates since 2017 to this situation.

From the scenario portrayed there and what I see I got a sense that this situation was different, as it talks about missing GNU coreutils. It is using Base64 and being told a parameter is incorrect. In my case, Base64 does not report an error, but the outfile has the incorrect size and doesn’t extract.

I assumed if you get docker running and install the docker oneagent, it would work in docker.

Anyway, I haven’t given up.

I see your other answer now. Thanks, i’ll check it out.