Replicated containers exit with exit code 125 (NATIVE scheduler)


#1

My Replicated containers are exiting with exit code 125. What does this mean? This is the Native scheduler.

[email protected]:~$ sudo systemctl status replicated
● replicated.service - Replicated Service
   Loaded: loaded (/etc/systemd/system/replicated.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Thu 2020-09-24 16:07:58 UTC; 6s ago
  Process: 10365 ExecStop=/usr/bin/docker stop replicated (code=exited, status=0/SUCCESS)
  Process: 11000 ExecStart=/usr/bin/docker run --name=replicated -p 9874-9879:9874-9879/tcp -u 1031:999 -v /var/lib/replicated:/var/lib/replicated -v /var/run/docker.sock:/host/var/run/docker.sock -v /proc:/host/proc:ro -v /etc:/host/etc:ro -v /etc/os-release:/host/etc/os-release:ro -v
  Process: 10999 ExecStartPre=/bin/chmod -R 755 /var/lib/replicated/tmp (code=exited, status=0/SUCCESS)
  Process: 10994 ExecStartPre=/bin/chown -R 1031:999 /var/run/replicated /var/lib/replicated (code=exited, status=0/SUCCESS)
  Process: 10993 ExecStartPre=/bin/mkdir -p /var/run/replicated /var/lib/replicated /var/lib/replicated/statsd (code=exited, status=0/SUCCESS)
  Process: 10937 ExecStartPre=/usr/bin/docker rm -f replicated (code=exited, status=0/SUCCESS)
 Main PID: 11000 (code=exited, status=125)

#2

When replicated is installed the images are pulled and retagged with tag “current”. It is likely that these images are missing.

Rerunning the install script can typically resolve this.

Airgapped Installations

For an airgapped server, documentation can be found here.

cat ./install.sh | sudo bash -s airgap

Online Installations

First find the Replicated version that was running, replacing <version> with the correct version.

export REPLICATED_VERSION=<version>

Re-run the installation scripts specifying the correct Replicated version.

curl -sSL -o install.sh https://get.replicated.com/docker?replicated_tag=${REPLICATED_VERSION}
sudo bash ./install.sh

When re-running the installation scripts is not an option it is possible to pull (if the images do not already exist) and re-tag the Replicated images as “current”.

For Replicated version >= 2.45.0

sudo docker pull replicated/replicated:stable-${REPLICATED_VERSION}
sudo docker pull replicated/replicated-ui:stable-${REPLICATED_VERSION}
sudo docker pull replicated/replicated-operator:stable-${REPLICATED_VERSION}
sudo docker tag replicated/replicated:stable-${REPLICATED_VERSION} replicated/replicated:current
sudo docker tag replicated/replicated-ui:stable-${REPLICATED_VERSION} replicated/replicated-ui:current
sudo docker tag replicated/replicated-operator:stable-${REPLICATED_VERSION} replicated/replicated-operator:current
sudo docker tag replicated/replicated:stable-${REPLICATED_VERSION} quay.io/replicated/replicated:current
sudo docker tag replicated/replicated-ui:stable-${REPLICATED_VERSION} quay.io/replicated/replicated-ui:current
sudo docker tag replicated/replicated-operator:stable-${REPLICATED_VERSION} quay.io/replicated/replicated-operator:current

For Replicated version < 2.45.0

sudo docker pull quay.io/replicated/replicated:stable-${REPLICATED_VERSION}
sudo docker pull quay.io/replicated/replicated-ui:stable-${REPLICATED_VERSION}
sudo docker pull quay.io/replicated/replicated-operator:stable-${REPLICATED_VERSION}
sudo docker tag quay.io/replicated/replicated:stable-${REPLICATED_VERSION} quay.io/replicated/replicated:current
sudo docker tag quay.io/replicated/replicated-ui:stable-${REPLICATED_VERSION} quay.io/replicated/replicated-ui:current
sudo docker tag quay.io/replicated/replicated-operator:stable-${REPLICATED_VERSION} quay.io/replicated/replicated-operator:current