Git Product home page Git Product logo

Comments (3)

mmussett avatar mmussett commented on August 19, 2024

Defect validated with Ulf from support.

from be-tools.

umueller-de avatar umueller-de commented on August 19, 2024

Some more details to the issue:
Perl script "be_docker_run.pm" that extracts tra.java.extended.properties corrupts the value when a full path added as a reference for the java agent.

e.g.,
Input:
tra.java.extended.properties=-Xms1024m -Xmx1024m -javaagent:/opt/tibco/be/6.2/lib/cep-base.jar

Output:

grep tra.java.extended.properties beprops_all.props 
tra.java.extended.properties=/opt/tibco/be/6.2/lib/cep-base.jar -XX:MaxMetaspaceSize=256m

cat /opt/tibco/be/6.2/bin/be-engine.tra
...
tra.java.extended.properties=/opt/tibco/be/6.2/lib/cep-base.jar -XX:MaxMetaspaceSize=256m

Test (same operations as done in /home/tibco/be/run script):
- Connect to running pod

cd /home/tibco/be
CURRENT_DIR=$(pwd)
BE_PROPS_FILE=beprops_all.props
APP_HOME=/opt/tibco/be/application
# set tra.java.extended.properties if not set already
env tra.java.extended.properties="-Xms1024m -Xmx1024m -Xss2m -javaagent:/opt/tibco/be/6.2/lib/cep-base.jar -XX:MaxMetaspaceSize=256m" bash

export PERL5LIB="/home/tibco/be"
perl -Mbe_docker_run -e "be_docker_run::makeBeProps('testSupport.prop','$APP_HOME','$BE_HOME/')"

Result (extracted only values after "-javaagent:")

grep tra.java.extended.properties testSupport.prop
tra.java.extended.properties=/opt/tibco/be/6.2/lib/cep-base.jar -XX:MaxMetaspaceSize=256m

Note:
The property set correctly using %BE_HOME% instead of the full path for cep-base.jar
env tra.java.extended.properties="-Xms1024m -Xmx1024m -Xss2m -javaagent:%BE_HOME%/lib/cep-base.jar -XX:MaxMetaspaceSize=256m" bash

With above settings you able to start an agent when Telemetry not enabled, if enabled the CacheAgent will not start (NullPointer exception).

2024 Jul 23 11:42:26:720 GMT +02 cache1-fd FATAL [main] - [container.standalone] null
java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at com.tibco.cep.runtime.session.impl.RuleServiceProviderImpl.initOpenTelemetry(RuleServiceProviderImpl.java:1180)
	at com.tibco.cep.runtime.session.impl.RuleServiceProviderImpl.initCluster(RuleServiceProviderImpl.java:829)
	at com.tibco.cep.runtime.session.impl.RuleServiceProviderImpl.configure(RuleServiceProviderImpl.java:306)
	at com.tibco.cep.container.standalone.BEMain.jumpStart(SourceFile:167)
	at com.tibco.cep.container.standalone.BEMain.main(SourceFile:71)
Caused by: java.lang.NullPointerException
	at net.bytebuddy.agent.builder.AgentBuilder$Default.doInstall(AgentBuilder.java:10254)
	at net.bytebuddy.agent.builder.AgentBuilder$Default.installOn(AgentBuilder.java:10156)
	at net.bytebuddy.agent.builder.AgentBuilder$Default$Delegator.installOn(AgentBuilder.java:11790)
	at com.tibco.cep.telemetry.trace.DefaultIntrumentLoader.load(DefaultIntrumentLoader.java:39)
	at com.tibco.cep.telemetry.TelemetryService.lambda$instrument$1(TelemetryService.java:90)
	at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
	at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
	at com.tibco.cep.telemetry.TelemetryService.instrument(TelemetryService.java:90)
	at com.tibco.cep.telemetry.TelemetryService.init(TelemetryService.java:52)
	... 9 more

from be-tools.

mmussett avatar mmussett commented on August 19, 2024

;tldr

Setting this:

tra.java.extended.properties="-Xms1024m -Xmx1024m -Xss2m -javaagent:/opt/tibco/be/6.2/lib/cep-base.jar -XX:MaxMetaspaceSize=256m"

Results in this being written to the props file:

tra.java.extended.properties=/opt/tibco/be/6.2/lib/cep-base.jar -XX:MaxMetaspaceSize=256m

Whereas, setting:

tra.java.extended.properties="-Xms1024m -Xmx1024m -Xss2m -javaagent:%BE_HOME%/lib/cep-base.jar -XX:MaxMetaspaceSize=256m

Results in this being written to the props file:

tra.java.extended.properties=-Xms1024m -Xmx1024m -javaagent:/opt/tibco/be/6.2/lib/cep-base.jar

from be-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.