cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Docker for Mac: OneAgent fails with "Archive is corrupted"

rene_panzar
Newcomer

Hi,

I'm trying to start the dynatrace/oneagent as a Docker container with this command:

docker run --privileged=true --pid=host --net=host --ipc=host -v /:/mnt/root dynatrace/oneagent TENANT=hzj58979 TENANT_TOKEN=... SERVER=https://hzj58979.live.dynatrace.com

But I get the same error again and again:

19:04:33 Started agent deployment as docker image, PID 19094.
19:04:33 Container version: 1.119.211.20170707-062951
19:04:33 Deploying to: /mnt/root
19:04:33 Checking root privileges...
19:04:33 OK
19:04:36 Warning: Configuration params section of the installer package is missing. The installation will proceed but the agent will have to be configured manually.
19:04:36 Installation started, version 1.119.211.66038, build date: 07.07.2017, PID 19094.
19:04:36 Detected: Platform: LINUX Arch: X86
19:04:36 Detected bitness: 64
19:04:36 /opt is on /
19:04:36 Extracting...
19:04:39 Unpacking. This may take a few minutes
19:04:39 Error: Archive is corrupted. Installation aborted.
19:04:39 Error: Tar error message: /bin/base64: unrecognized option: i
BusyBox v1.25.1 (2016-10-26 16:15:20 GMT) multi-call binary.

Usage: base64 [-d] [FILE]

Base64 encode or decode FILE to standard output
-d Decode data
tar: short read

Is there anything I'm doing wrong?

3 REPLIES 3

Julius_Loman
DynaMight Guru
DynaMight Guru

When you look at the entrypoint.sh script in the docker image, you can see how the installation is perfomed:

deployAgentToHost() {
toConsoleInfo "Deploying to: ${DOCKER_HOST_ROOT_PREFIX}"
copyInstallerFileToHost
toLogInfo "Creating ${DOCKER_HOST_ROOT_PREFIX}/${DOCKER_DEPLOYMENT_CONF_FILE}"
createDirIfNotExistAndSetRights "${DOCKER_HOST_ROOT_PREFIX}/${AGENTCONF_PATH}" 755
echo "DeployedInsideDockerContainer=true" >"${DOCKER_HOST_ROOT_PREFIX}/${DOCKER_DEPLOYMENT_CONF_FILE}"
toLogInfo "Executing: exec chroot ${DOCKER_HOST_ROOT_PREFIX} ${INSTALLER_PATH_ON_HOST} $* DOCKER_ENABLED=1 PROCESSHOOKING=0"
exec chroot "${DOCKER_HOST_ROOT_PREFIX}" "${INSTALLER_PATH_ON_HOST}" "$@" DOCKER_ENABLED=1 PROCESSHOOKING=0
toConsoleError "Cannot execute: exec chroot ${DOCKER_HOST_ROOT_PREFIX} ${INSTALLER_PATH_ON_HOST} $* DOCKER_DEPLOY_TO_HOST=1. Setup won't continue."
finishWithExitCode "${EXIT_CODE_ERROR}"
}

Actually the docker entrypoint script copies the oneagent installer file to the docker host itself and then executes the installation using chroot in the host operating system.

I don't have any Mac running Docker for Mac nearby, but I think the Linux virtual machine in Docker for Mac is based on alpine linux or other Linux distribution just using busybox (you can see that in your error log). Dynatrace oneagent installation expects GNU coreuitils and not a busybox system.

TEMPEST a.s., Slovakia, Dynatrace Master Partner

Thanks for the clarification, @Julius L.!

Tomasz_Gajger
Dynatrace Pro
Dynatrace Pro

Hi Rene,

what Julius said is right, OneAgent docker image deploys the agent directly on the host, which in case of Docker for Mac would be the linux virtual machine running docker daemon.
This setup is currently not supported, you can find the list of supported platforms here: https://help.dynatrace.com/get-started/reference/...

Regards,
Tomek