Renew the Docker Certificate

If Docker-based Plant Applications Universal Client machine is shut down during the 90-day interval period, Docker swarm stops working due to certificate expiry. This is a workaround to renew the expired swarm certificates.

Procedure

  1. Stop the Docker service using the following command: sudo service docker stop
  2. Modify the system date to a previous date (that is, a date before the certificate expired) using the following command: sudo date -s “04 Feb 2020 11:00:00”
  3. Start the Docker service using the following command: sudo service docker start
  4. Generate new certificates using the following command: sudo docker swarm ca –rotate
  5. Stop the Docker service using the following command: sudo service docker stop
  6. Set the system date to current time using the following command: sudo date -s “04 Feb 2020 11:00:00”
  7. Start the Docker service using the following command: sudo service docker start