The WebSphereMQ service file is unable to read the environments file

book

Article ID: 100062201

calendar_today

Updated On:

Description

Error Message

The following is written in the WebSphereMQ_A.log

2023/12/07 10:24:42 VCS WARNING V-16-55012-20402 WebSphereMQ:Webshere_mqm_resource:online: EnvFile[/var/mqm/qmgrs/env/setEnv.sh] is specified, but SystemD-compliant environment file is not specified in attribute SystemDEnvFile. The agent will use [/var/mqm/qmgrs/env/setEnv.sh] as the value for directive EnvironmentFile in the service file. 

Cause

SystemD requires the contents of the environments file to be in the “key=value” format. The EnvironmentFile directive does not accept any other shell command. The contents of the file specified in the EnvFile attribute of the agent are based on the UNIX shell. Therefore, they do not match the expected format, and will not be accepted by the EnvironmentFile directive.

Resolution

A new attribute, SystemDEnvFile, is added in which the absolute path of the SystemD-compliant environment file can be provided (example: /var/mqm/mq_sysd.env). On SystemD-enabled platforms, the agent uses this attribute value for the EnvironmentFile directive in the service file. If value of this attribute is not specified, the agent uses the value of EnvFile attribute in the service file. Modify the VCS configuration as follows:

haconf -makerw

hares -modify Webshere_mqm_resource SystemDEnvFile "/var/mqm/qmgrs/env/setEnv.sh"

haconf -dump -makero

 

Issue/Introduction

Variables set in the WebSphereMQ VCS environment file are not read. i.e. WebSphereMQ Webshere_mqm_resource (
Critical = 0
QueueManager = Webshere_mqm
MQVer = "9.0"
StopOptions = "-i"
EnvFile = "/var/mqm/qmgrs/env/setEnv.sh" <===
MonitorListener = 1
MQInstallationPath = "/opt/IBM/mqm"
) If the variables had been successfully read they would appear in the process environment. i.e. In this example the environment variable LOOPY_LOG is set in the resource environment file. cat /proc/8593/environ
VCSAG_MONITOR_INFO=3
VCSAG_RES_CONF_LEVEL=0
CLUSTER_LOGDBG=DBG_4 DBG_AGDEBUG DBG_AGINFO
VCSONE_HOSTS=
LOOPY_LOG=/root/loopy.log <=====