This discussion is archived
14 Replies Latest reply: Jun 10, 2010 8:01 AM by Hirt RSS

Jrockit and Coldfusion

brian.mcginity Newbie
Currently Being Moderated
Is it possible to use Oracle Jrockit to see what’s going on with a ColdFusion JVM? I've installed Mission Control 3.1.2 and am trying to connect to the localhost's ColdFusion JVM? Is this even still possible? Any help with making the connection is greatly appreciated.
  • 1. Re: Jrockit and Coldfusion
    652777 Explorer
    Currently Being Moderated
    I'm not sure what you mean by Cold Fusion JVM, but you should be able to for instance inspect the heap if you run Cold Fusion on a JRockit JVM.

    You can connect to the JVM by right-clicking on discovered JVM:s in the JVM Browser and select for instance the Memleak Detector. If you want to connect to a JRockit JVM that runs as a windows service you might have to start it up with something like this:

    java -Xmanagement:ssl=false,authenticate=false,port=7777,autodiscovery=true ..

    and it should pop up automatically in the JVM Browser.

    Best Regards
    Erik
  • 2. Re: Jrockit and Coldfusion
    brian.mcginity Newbie
    Currently Being Moderated
    I want to be able to inspect the ColdFusion JVM in realtime. I really need to be able to open the leak detector and view the information.

    For some reason CF does not show up in the discovered nodes. The only thing that shows up jrockit. The port that cf/apache serve web pages is 80. I guessing this is not the port that jrocket needs to discover the cf jvm????
  • 3. Re: Jrockit and Coldfusion
    652777 Explorer
    Currently Being Moderated
    I think I understand now. The reason you see "JRockit" instead "Cold Fusion" in the browser is because there is no default naming rule for Cold Fusion, like it is for WebLogic, JBoss, Tomcat etc.

    If you go into Window -> Preferences->Browser Preferences -> Local Preferences you can create your own naming rule for Cold Fusion. We should try to add a default rule for Cold Fusion too.

    But if you don't care how the application name is formatted you can just connect to the JRockit JVM you see in the browser. If Cold Fusion runs on top of the JRockit JVM you should be able to use the Memory Leak Detector to view information inside Cold Fusion.
  • 4. Re: Jrockit and Coldfusion
    brian.mcginity Newbie
    Currently Being Moderated
    Thank you for helping. I was not at my desk when I posted last, so i wasn’t 100% accurate.

    In the JVM Browser, under Discovered -> Local it says “This Mission Control”. I am able to right click and “Start Memleak”. What comes up does not look like the local Coldfusion JVM.

    I’m not sure if JRockit discovered CF. I there something I need to do to the CF JDBC driver string to allow JRockit to interact with it?
  • 5. Re: Jrockit and Coldfusion
    652777 Explorer
    Currently Being Moderated
    What version(JDK) of the JVM are you running Cold Fusion on and have you tried to starting it up as a described above?
  • 6. Re: Jrockit and Coldfusion
    brian.mcginity Newbie
    Currently Being Moderated
    I made a little progress this afternoon.

    I downloaded and installed jdk1.6.0_18 and then had CF use this as the JVM. I then set CF to use it by changing setting the java.home in cf8home/runtime/bin/jvm.config to:
    java.home=C:/Program Files/Java/jdk1.6.0_18/jre

    The in the same file I then added this to end of the java.args: -Djrockit.managementserver.port=9010

    After restarting the CF service and opening jrockit I now see another entry in the JVM Browser/discovered/local it says:
    [Non JRockit] Local (5,928)

    Then when I right click on it and do Start Memleak it says:
    "The selected JRockit(s) are not suitable for opening Memory Leak Detector!"


    Right clicking and trying to Start any of the tools fails with some error or another.
  • 7. Re: Jrockit and Coldfusion
    brian.mcginity Newbie
    Currently Being Moderated
    I removed this: Djrockit.managementserver.port=9010 from the jvm.config file and it has no impact whatsoever. JRockit does discover CF, it can't do anything with it though.
  • 8. Re: Jrockit and Coldfusion
    652777 Explorer
    Currently Being Moderated
    You should use the JVM that comes with your Mission Control download. E.g.

    java.home=C:\Program Files (x86)\Java\jrmc-3.1.2-1.6.0\jre
  • 9. Re: Jrockit and Coldfusion
    brian.mcginity Newbie
    Currently Being Moderated
    Looks like it's working now. Here are the changes to cf jvm.config file:

    java.home=C:/Program Files/Java/jrmc-3.1.2-1.6.0/jre

    and add this to the end of java.arg:

    -Xmanagement:ssl=false,authenticate=false,autodiscovery=true

    Then it shows up under Discovered - > JDP
  • 10. Re: Jrockit and Coldfusion
    765736 Newbie
    Currently Being Moderated
    I have made the same changes and I am able to start the "Macromedia JRun CFusion Server", however when I go to start the "Macromedia JRun Admin Server" I get the following error because the port is already in use.

    Is there any way to have both the "Macromedia JRun CFusion Server" and "Macromedia JRun Admin Server" started at the same time both using JRockit?
    --------------------------

    Error: Exception thrown by the agent : java.rmi.server.ExportException: Listen f
    ailed on port: 7091; nested exception is:
    java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bin
    d
    [JRockit] Failed to start the management agent. Note that the management agent r
    equires that you either explicitly disable security or that you configure and en
    able security. Please see the documentation for details.
    java.lang.RuntimeException: Exception thrown by the agent
    at sun.management.Agent.error(Agent.java:303)
    at sun.management.Agent.error(Agent.java:294)
    at sun.management.Agent.startAgent(Agent.java:151)
    at sun.management.Agent.startAgent(Agent.java:239)
    at bea.jrockit.management.server.Main.start0(Main.java:297)
    at bea.jrockit.management.server.Main.access$000(Main.java:51)
    at bea.jrockit.management.server.Main$2.run(Main.java:387)
    at bea.jrockit.management.server.Main.start(Main.java:385)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at jrockit.management.AgentStarter.startAgent(AgentStarter.java:135)

    Could not create the Java virtual machine.
  • 11. Re: Jrockit and Coldfusion
    Hirt Guru Moderator
    Currently Being Moderated
    Sure thing - just specify different ports to use for the two JVMs.

    For example (with ssl and authentication turned off):
    -Xmanagement:ssl=false,authenticate=false,port=7091
    -Xmanagement:ssl=false,authenticate=false,port=7092

    Kind regards,
    Marcus
  • 12. Re: Jrockit and Coldfusion
    778548 Newbie
    Currently Being Moderated
    Hello -

    I'm stuck on this error since yesterday. I've tried both version 4 and version 3.1.2.

    -----
    D:\dev\bin\ColdFusion8\runtime\bin>jrun -start
    [JRockit] Management server started on port 7091, ssl=false, authenticate=false.
    [JRockit] JDP server up. Broadcasting target 10.1.0.91:7091 every 5000 ms.
    Erreur: Exception envoyΘe par l'agent : java.rmi.server.ExportException: Port already in use: 7091; nested exception is:

    java.net.BindException: Address already in use: JVM_Bind
    [JRockit] Failed to start the management agent. Note that the management agent requires that you either explicitly disab
    le security or that you configure and enable security. Please see the documentation for details.
    java.lang.RuntimeException: Exception envoyΘe par l'agent
    at sun.management.Agent.error(Agent.java:303)
    at sun.management.Agent.error(Agent.java:294)
    at sun.management.Agent.startAgent(Agent.java:151)
    at sun.management.Agent.startAgent(Agent.java:239)
    at bea.jrockit.management.server.Main.start0(Main.java:297)
    at bea.jrockit.management.server.Main.access$000(Main.java:51)
    at bea.jrockit.management.server.Main$2.run(Main.java:387)
    at bea.jrockit.management.server.Main.start(Main.java:385)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at jrockit.management.AgentStarter.startAgent(AgentStarter.java:135)

    Could not create the Java virtual machine.
    -----

    My jvm.config file :
    java.home=D:/dev/bin/JRockit3/jre
    java.args=-server -Xmx512m -Xmanagement:ssl=false,authenticate=false,autodiscovery=true,port=7091 -Dsun.io.useCanonCaches=false -Dcoldfusion.rootDir={application.home}/
    -----

    Where can I configure the JVM for the admin, if this is the problem?

    Thanks for your help -
    Aurelien
  • 13. Re: Jrockit and Coldfusion
    Hirt Guru Moderator
    Currently Being Moderated
    You already have a JRockit JVM with the management agent started on that port.
  • 14. Re: Jrockit and Coldfusion
    Hirt Guru Moderator
    Currently Being Moderated
    To be more precise:

    You say that you have some sort of settings file where you have specified -Xmanagement:ssl=false,authenticate=false,autodiscovery=true,port=7091. This tells JRockit to start the external management agent on port 7091.

    Since I have no clue as to how Coldfusion works, the rest will be pure speculation.

    It seems like the different instances you are starting are using the same jvm settings. What you need to do now, is to figure out how to have different settings for whatever you start up first, and whatever you are starting up after that. Since this forum is for JRockit specific questions, I don't think you will have much luck getting that particular question answered here. ;)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points