define java agent?

125 views
Skip to first unread message

Bob Dronski

unread,
Mar 31, 2014, 3:55:53 PM3/31/14
to ra...@googlegroups.com
I just was going through some settings in my server admin, and noticed this:

There is no Java Agent defined in this enviroment. The Java Agent is needed to improve memory (PermGen Space) consumption for templates. To enable the Java Agent follow this instructions:
  • Add the "-javaagent" JVM argument and set it to point to the railo-inst.jar in your lib directory 
    in this environment that would be: -javaagent=/opt/railo/lib/railo-inst.jar
I hate to be stupid, but where would I put the argument?

Thanks,
bob

Jordan Michaels

unread,
Mar 31, 2014, 4:22:01 PM3/31/14
to ra...@googlegroups.com
If you're using the Windows Installer, then the java parameters are
defined in the Railo/Tomcat Service Control (in the Java tab).

On Linux you'd add it (if it's not already there) to the
/opt/railo/tomcat/bin/setenv.sh file.

Warm Regards,
Jordan Michaels

On 03/31/2014 12:55 PM, Bob Dronski wrote:
> I just was going through some settings in my server admin, and noticed this:
>
> There is no Java Agent defined in this enviroment. The Java Agent is
> needed to improve memory (PermGen Space) consumption for templates. To
> enable the Java Agent follow this instructions:
>
> * Add the "-javaagent" JVM argument and set it to point to the
> railo-inst.jar in your lib directory
> in this environment that would be:
> /-javaagent=/opt/railo/lib/railo-inst.jar/
>
> I hate to be stupid, but where would I put the argument?
>
> Thanks,
> bob
>
> --
> Did you find this reply useful? Help the Railo community and add it to
> the Railo Server wiki at https://github.com/getrailo/railo/wiki
> ---
> You received this message because you are subscribed to the Google
> Groups "Railo" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/railo/1787AADC-81C1-4868-BBAA-1C60565677C9%40gmail.com
> <https://groups.google.com/d/msgid/railo/1787AADC-81C1-4868-BBAA-1C60565677C9%40gmail.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Bob Dronski

unread,
Mar 31, 2014, 4:51:11 PM3/31/14
to ra...@googlegroups.com
Jordan,

Thanks for coming to the rescue again! But obviously I'm denser than I thought… I added the line to the JAVA_OPTS list. But when I did that, I got the tomcat capacity error.

Let me pull back a bit. I never knew about Paul's log analyzer plugin, so I decided to try it. That seems to be what is triggering the notice.

Here's the contents of my /opt/railo/tomcat/bin/setenv.sh

------------------------------------
# Tomcat memory settings
# -Xms<size> set initial Java heap size
# -Xmx<size> set maximum Java heap size
# -Xss<size> set java thread stack size
# -XX:MaxPermSize sets the java PermGen size
JAVA_OPTS="-Xms256m -Xmx640m -XX:MaxPermSize=192m -javaagent=/opt/railo/lib/railo-inst.jar "; # memory settings


# needed by FR
# LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/railo/fusionreactor/etc/lib

export JAVA_OPTS;
------------------------------------


I'm presuming the tomcat error that is triggering this is
SEVERE: Error deploying web application directory /opt/railo/tomcat/webapps/host-manager
java.lang.IllegalArgumentException: addChild: Child name '/host-manager' is not unique
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:887)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1673)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)


Can you clarify for me?

Thanks,
bob
> To view this discussion on the web visit https://groups.google.com/d/msgid/railo/5339CE69.1050103%40viviotech.net.

Jordan Michaels

unread,
Mar 31, 2014, 4:59:13 PM3/31/14
to ra...@googlegroups.com
Hi Bob,

That error is benign. It's just saying there's more then one and it's
categorised as "severe" only because the duplicated instance isn't
coming up. Chances are the first instance (which is all you need) came
up just fine.

The Tomcat host-manager is disabled altogether in the most recent
installer builds.

Warm Regards,
Jordan Michaels

On 03/31/2014 01:51 PM, Bob Dronski wrote:
> Jordan,
>
> Thanks for coming to the rescue again! But obviously I'm denser than I thought... I added the line to the JAVA_OPTS list. But when I did that, I got the tomcat capacity error.

Jason101

unread,
Aug 17, 2014, 11:08:34 PM8/17/14
to ra...@googlegroups.com
My Railo install also notes the "There is no Java Agent defined in this environment." I am running FusionReactor, and that is defined as the java agent in my java config: -javaagent:C:/FusionReactor/instance/instancename/fusionreactor.jar=name=instancename,address=8088

Should I still be defining " -javaagent:C:\Railo\lib\railo-inst.jar" as well?

Thanks

Michael Offner

unread,
Aug 18, 2014, 11:18:27 AM8/18/14
to ra...@googlegroups.com
The javaagent's are used to manipulate bytecode, Railo use it to update compiled cfml template when they change (otherwise Railo has to throw them away and start with a new classloader). Fusionreactor does use it to rewrite jdbc driver (as far as I know). So this 2 has no relation at all. So defining the FR agent does not help Railo at all. you can define as many agents you like. 

Micha

P.s. With Railo 5 this agent will no longer be necessary, Railo 5 is able to load it dynamically after startup. 
--
Did you find this reply useful? Help the Railo community and add it to the Railo Server wiki at https://github.com/getrailo/railo/wiki
---
You received this message because you are subscribed to the Google Groups "Railo" group.

For more options, visit https://groups.google.com/d/optout.


--
/micha

Michael Offner CTO Railo Technologies GmbH
Reply all
Reply to author
Forward
0 new messages