How to fix the failure of tml-log image build in ML 5.3.x

How to fix the failure of tml-log image build in ML 5.3.x

book

Article ID: KB0074478

calendar_today

Updated On:

Products Versions
TIBCO Cloud API Management - Local Edition ML 5.3.x

Description

In ML 5.3.x the tml-log image build fails since fluent-plugin-mysql has a dependency on another plugin- jsonpath of which a new version 1.0.6 was released on November 18th 2020. This new version broke dependency on ruby. Earlier version of jsonpath was okay with any version of ruby but jsonpath-1.0.6 declared minimum ruby version of 2.5 which is not present in the tml-log image. This is a transitive dependency of fluent-plugin-mysql and was not installed directly. So let's follow the steps provided in the resolution section to mitigate this issue. 

The sample error log that you might encounter is shown below: 
10:38:20 1 gem installed

10:38:21 [91mERROR: Error installing fluent-plugin-mysql:

10:38:21 jsonpath requires Ruby version >= 2.5.

10:38:21 [0m"td-agent-gem install fluent-plugin-mysql -v 0.3.4" command filed with exit code 1.

10:38:21 The command '/bin/sh -c /home/builder/docker-build/log-install.sh' returned a non-zero code: 1

10:38:21 ~/jobs/build_docker/workspace

10:38:21 Finished: SUCCESS

Issue/Introduction

When building tml-log image in ML5.3.x, the image build script fails when downloading and installing fluent-plugin-mysql plugin . Let's learn in this article on the root cause of why it fails and the workaround to fix this issue.

Environment

ANY

Resolution

Please follow the below steps in order to fix the issue : 

1. Download attached file (log-install.sh) to a known directory (locate full path) 
2. docker ps
3. copy to clipboard the id of the tml-installer container
4. docker cp <path-to-source-directory>/log-install.sh <tml-installer-containerid>:/tmp/.
5. docker exec -it <tml-installer-container-id> bash
6. cd /var/jenkins_home/docker-build/tmgc-log/install/
7. cp log-install.sh log-install.sh.orig
8. cp /tmp/log-install.sh .
9. chmod +x log-install.sh

Please follow the steps in order carefully and you should be able to build the image successfully thereafter. 

Attachments

How to fix the failure of tml-log image build in ML 5.3.x get_app