automation-api-community-solutions icon indicating copy to clipboard operation
automation-api-community-solutions copied to clipboard

Java 11.0.12 minimum version required for Agent 9.0.21.000+

Open globalpayments-pburns opened this issue 1 year ago • 3 comments

The Control M Agent 9.0.21.000+ require a minimum Java version of 11.0.12+. https://github.com/controlm/automation-api-community-solutions/blob/7ce4242ae7457e6b1b0b04898d6ca29793d0a4ca/3-infrastructure-as-code-examples/tutorial-docker-image-with-embedded-controlm-agent/Dockerfile#L27

I have tried to replace openjdk package with Amazon Corretto Headed/Headless package and getting issues with using the automation api to provision the Agent 9.0.21.000 image. RUN yum install -y java-11-amazon-corretto-headless changing the package java-1.8.0-openjdk to java-11-amazon-corretto-headless or java-11-amazon-corretto results in the error below.

Cannot find Java. The Java major version must be 11. The minor version must be 11.0.12 or higher. Set the BMC_INST_JAVA_HOME environment variable to the Java home path and then rerun the installation. Refer to Control-M Documentation for more information.

[32minfo[39m:    Failed to deploy new image
[91m[31merror[39m:   org.apache.commons.exec.ExecuteException: return error for product DRFZ4.9.0.21.000_Linux-x86_64.tar.z-DEPLOY: using command /home/tomcat/.ctmTemp/DRFZ4.9.0.21.000_Linux-x86_64.tar/setup.sh -silent /home/tomcat/.ctmTemp/agent.linux.xml. rc=1 (Exit value: 1)

[0m[32minfo[39m:    exiting provision process with exit code (0-ok):6
[91m[31merror[39m:   provision image failed
[0mThe command '/bin/sh -c cd     && ctm provision image $AGENT_DEPLOY_FILE' returned a non-zero code: 1

Do you have a solution for this, or a workaround?

globalpayments-pburns avatar May 03 '23 18:05 globalpayments-pburns

I added the environment variable after the java package install, and now getting a new error about amazon not being a valid java vendor. I cannot find anything in the Agent install documentation about java vendors, but the OS is listed as a supported OS which is Amazon Linux which is RHEL/CentOS based which is also listed as supported by this agent version.

# install java for Control M Agent
RUN yum install -y java-11-amazon-corretto-headless
# set the new java home
ENV BMC_INST_JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto
# provision controlm agent image
RUN cd \
    && ctm provision image $AGENT_DEPLOY_FILE
[32minfo[39m:    The Java vendor Amazon.com is not supported on this operating system Linux-x86_64. Refer to Control-M Documentation for a list of supported Java vendors.

[32minfo[39m:    Failed to deploy new image
[91m[31merror[39m:   org.apache.commons.exec.ExecuteException: return error for product DRFZ4.9.0.21.000_Linux-x86_64.tar.z-DEPLOY: using command /home/tomcat/.ctmTemp/DRFZ4.9.0.21.000_Linux-x86_64.tar/setup.sh -silent /home/tomcat/.ctmTemp/agent.linux.xml. rc=1 (Exit value: 1)

[0m[32minfo[39m:    exiting provision process with exit code (0-ok):6
[91m[31merror[39m:   provision image failed
[0mThe command '/bin/sh -c cd     && ctm provision image $AGENT_DEPLOY_FILE' returned a non-zero code: 1

globalpayments-pburns avatar May 04 '23 14:05 globalpayments-pburns

After searching BMC Community, I found this article which explains the issue above exactly. https://community.bmc.com/s/article/What-Java-vendors-are-supported-as-external-JDK-with-Control-M-9-0-21

Amazon is being validated as a Java Vendor, and is targeted for a later 9.0.21 agent release.

globalpayments-pburns avatar May 04 '23 15:05 globalpayments-pburns

Hi @globalpayments-pburns, Thank you for reaching out. Unfortunately, the Java vendor Amazon.com is not supported. We recommend using the OS AlmaLinux and installing java-11-openjdk. Here's an example Dockerfile snippet:

FROM almalinux:8.7
..
..
# Install Java for Control-M Agent
RUN yum install -y java-11-openjdk
 
# Set the new Java home
ENV BMC_INST_JAVA_HOME=<PATH>
 
# Provision Control-M Agent image
RUN cd \
&& ctm provision image $AGENT_DEPLOY_FILE
Replace <PATH> with the appropriate Java home path.

Thank you for your understanding and cooperation.

rbeker-BMC avatar Mar 21 '24 07:03 rbeker-BMC