TIBCO BusinessEvents (BE) Docker Container - Failed to load global variables (GV) from Consul server

TIBCO BusinessEvents (BE) Docker Container - Failed to load global variables (GV) from Consul server

book

Article ID: KB0075511

calendar_today

Updated On:

Products Versions
TIBCO BusinessEvents Enterprise Edition 5.6.1

Description

The BE application container was created to support Consul server and started with required parameters
(-e CONSUL_SERVER_URL=<URL> -e APP_CONFIG_PROFILE=<profile> -e BE_APP_NAME=<appname>).

On startup, below error was reported and Global Variables(GVs) were not loaded:
INFO: Reading GV values from Consul.. (<appname>/<profile>/)
./gvproviders/consul/run.sh: line 33: /home/tibco/be/gvproviders/consul/jq: No such file or directory
./gvproviders/consul/run.sh: line 33: /home/tibco/be/gvproviders/consul/consul: No such file or directory

 

Issue/Introduction

TIBCO BusinessEvents (BE) Docker Container - Failed to load global variables (GV) from Consul server

Environment

All Operating Systems (Docker container - Linux version)

Resolution

For the Linux build, the binaries are loaded with a wget command, when building the application image.
https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
https://releases.hashicorp.com/consul/1.6.1/consul_1.6.1_linux_amd64.zip

The error was reported when required binaries were not loaded.

This can be caused by:
=================

1. Internet connection was not available, when build the image.

2. wget package was not installed during build process.

3.Missed to add parameter "--gv-providers consul" during image creation

Sample command to create the image (Windows):
set WORKHOME=D:\BE\dockerBE561\dockerscripts
cd %WORKHOME%\bin
build_app_image.bat -l %WORKHOME%\installfiles -a %WORKHOME%\FDAppFiles -r fd:latest --gv-providers consul


Solution:
========

- Download files
https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
https://releases.hashicorp.com/consul/1.6.1/consul_1.6.1_linux_amd64.zip

- Unzip consul_1.6.1_linux_amd64.zip
- Rename "jq-linux64" to "jq"
- Copy both files to <TIBCO_dockerscripts_home>/gvproviders/consul
- Recreate the image (build_app_image)

Note:
To validate that binaries are added to the BE container, start the container with "bash", cd to gvproviders/consul and check if binaries jq and consul are available.
e.g.:
set DOCKIMAGE=fd:latest
docker run -it %DOCKIMAGE% bash

User-added image

 

Additional Information

Docker, consul