How to resolve TML Installer 5.5.0 tml-log build issue for TIBCO Cloud API Management - Local Edition

How to resolve TML Installer 5.5.0 tml-log build issue for TIBCO Cloud API Management - Local Edition

book

Article ID: KB0072630

calendar_today

Updated On:

Products Versions
TIBCO Cloud API Management - Local Edition ML 5.5.0

Description

tml-installer for CAPIM-LE 5.5 is not able to build tml-log image with the below error in the build log:
--------------
Building native extensions. This could take a while...
[91mERROR: Error installing fluent-plugin-postgres:
ERROR: Failed to build gem native extension.

current directory: /opt/td-agent/lib/ruby/gems/2.7.0/gems/pg-1.3.0/ext
/opt/td-agent/bin/ruby -I /opt/td-agent/lib/ruby/2.7.0 -r ./siteconf20220125-1311-1pdxmwy.rb extconf.rb
Calling libpq with GVL unlocked
checking for pg_config... yes
Using config values from /usr/bin/pg_config
Using libpq from /usr/lib64
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for pg_config_manual.h... yes
checking for PQconnectdb() in -lpq... yes
checking for PQconninfo()... no
Your PostgreSQL is too old. Either install an older version of this gem or upgrade your database to at least PostgreSQL-9.3.

extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Resolution

Steps to follow to mitigate log image not building
  1. find the id of the installer container using docker ps
    Sample output
{{CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES }}
8e10ec5d53dc tml-installer:v5.5.0.GA.342 "/sbin/tini – /usr/…" 3 days ago Up 3 days 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp, 0.0.0.0:50000->50000/tcp, :::50000->50000/tcp tml-installer
  1. Log in to the installer  container using docker exec -it <container id from previous step> bash
  2. navigate to /var/jenkins_home/docker-build/tmgc-log/install in the installer container
  3. edit the file log-tpcl.sh using vi log-tpcl.sh
  4. go the line td-agent-gem install fluent-plugin-postgres -v 0.1.0
  5. Replace that line with the following  lines
#Install pg-gem 1.2.3 to be compatible with postgres-devel 9.2
td-agent-gem install pg -v 1.2.3
# https://github.com/uken/fluent-plugin-postgres
td-agent-gem install fluent-plugin-postgres -v 0.1.0

Issue/Introduction

How to resolve TML Installer 5.5.0 tml-log build issue for TIBCO Cloud API Management - Local Edition