Skip to content

Docker Issues

Troubleshoot Docker storage, network, and service startup problems on HEAL servers.

2 min read Updated SS MR

Docker Issues#

Below are the troubleshooting of docker issues:

  • Issue with Corrupted Storage Driver
  • Docker Network Driver Issue
  • Docker Service Startup Issue on Heal Server
  • Relocating the Docker Root Directory

For reference:

The following section contains basic Linux commands: Basic Commands


Issue with Corrupted Storage Driver#

The storage driver in the Docker configuration is corrupted.

Solution:

  1. Daemon Configuration File Creation:

    1. Create a daemon.json file in the below directory

      /etc/docker
      
    2. Change the storage driver from overlay2 to devicemapper.

      {
      "data-root": "/apmt/data/docker_lib_new",
      "storage-driver": "devicemapper"
      }
      
  2. Docker Service File Modification: Edit the docker.service file to remove the old device directory specification (from -g to -H).

  3. Daemon Reload and Docker Restart:

    1. Reloaded system daemons,

      systemctl daemon-reload
      
    2. Restarted the Docker service,

      systemctl restart docker
      
  4. Service Restart and Verification: Restart all the services and verify that they are up and running.


Docker Network Driver Issue#

Suspected Docker network glitch causing services to go down, with the default network being "docker0" bridge network.

Solution:

  1. Network Deletion and Recreation: Delete the existing "docker0" network and created a new "zdocker0" network:

    ip link del docker0
    docker network create --driver=bridge -o "com.docker.network.bridge.name=zdocker0" zdocker0
    
  2. Directory Deletion and Service Restart:

    1. Delete the "nomad" directory to prevent the service from accessing old allocation IDs.
    2. Restart the Docker, Nomad, and Consul services.

Docker Service Startup Issue on Heal Server#

Unable to start the Docker service on the Heal server. The service fails and stops repeatedly, as shown in the journalctl logs.

Error Log:

Mar 14 18:13:58 healdb systemd[1]: docker.service failed.
Mar 14 18:14:00 healdb systemd[1]: docker.service holdoff time over, scheduling restart.
Mar 14 18:14:00 healdb systemd[1]: Stopped Docker Application Container Engine.

Solution:

  1. Disk Mounting Issue Resolution:
    1. The issue was caused by a non-permanently mounted disk on the Heal server.
    2. The mount point was permanently added and restarted the server to implement this change.
  2. Service Restart: After the server restart, the HEAL services were started, restoring UI functionality and data visibility.
  3. SELinux Status Adjustment: The SELinux status was set to 'permissive' on both the HEAL App and DB servers to facilitate smoother operation.

Relocating the Docker Root Directory#

When the Docker root directory lacks adequate file space, relocation is necessary.

Procedure:

  1. Stop Docker Services: Execute the following commands to stop Docker and related services:

    sudo systemctl stop docker
    sudo systemctl stop docker.socket
    sudo systemctl stop containerd
    
  2. Create New Directory Structure: Ensure the new directory has at least 50 GB of free disk space. More may be required based on ingestion volumes and retention policy:

    sudo mkdir -p /new_dir_structure
    
  3. Move Docker Root: Relocate the Docker root to the newly created directory:

    sudo mv
    
  4. Edit Daemon Configuration:

    1. Modify or create the /etc/docker/daemon.json file,

      sudo vim /etc/docker/daemon.json
      
    2. Add the following content:

      { "data-root": "/new_dir_structure/docker" }
      
  5. Restart Docker Services: Restart the Docker to apply the changes:

    sudo systemctl start docker
    
  6. Validation: Confirm the new Docker root location:

    docker info -f '{{ .DockerRootDir}}'