Setting up JConsole

as per J@SE 1.5 to before using JConsole
===
Start the application with the -Dcom.sun.management.jmxremote option. This option sets the com.sun.management.jmxremote system property which enabled the JMX agent.
===
how do i set this propery at application level?
in application.xml?
or where else?

as per J@SE 1.5 to before using JConsole
===
Start the application with the -Dcom.sun.management.jmxremote option. This option sets the com.sun.management.jmxremote system property which enabled the JMX agent.
===
how do i set this propery at application level?
in application.xml?
or where else?

Similar Messages

  • Set Xms/Xmx based on Jconsole memory monitoring

    I used jconsole to monitor memory usage of a java server program running with JDK 1.5.0.3 in Linux, in order to set the Xms/Xmx option for the program. I found that memory usage of the process is no more than 4MB. But somehow after setting the Xms/Xmx to be 4MB, the server program could not run (its client programs could not connect to it). So I tuned the Xms/Xmx value and when I raised them to 512MB, then the server worked again.
    I don't understand why this happens. Is Jconsole reading not a good reflection of the heap memory usage? Or something else might be wrong?
    Thanks for any idea on this.

    <Jos van der Velden> wrote in message news:[email protected]..
    Hi,
    We are using weblogic 8.1 sp3 with the jdk1.4.2_05 (we do not use jrocket) for the implementation of some of our solutions.
    We are trying to optimize performance generally on servers with 2 processors and 4-8Gb of RAM, and some exceptions such as forinstance a test-machine we have at the moment with 4 processors and 20 Gb of RAM.
    >
    Although we seem to be able to improve performance by raising the settings for Xms and Xmx to 1024m ( even though our developmenttests done in the labs in Cary, NC - USA have resulted in recommendations that show lower values ) we would like to have some more
    info because not all info we have points to the same directions. For instance
    1. What are theoretically the maximum values for these settings (in particular Xms and Xmx)?Theoretically the maximum is a memory space addressable by a process.
    2. Should Xms and Xmx be set to the same value (as mentioned in info from your website - see below), or are there situations wheredifferent values could improve performance ?
    For a production environment Xms and Xmx should be equal so that JVM doesn't
    spend time shrinking and expanding heap.
    3. Is there other general advice you can give for improving performance using these settings ?Generally it is a good idea to keep heap under 1G. Bigger heap means longer GC-s.
    You may consider co-locating cluster nodes running in separate JVMs if you have
    enough CPUs and extensive RAM. Generally 2 CPUs per weblogic instance is enough.
    Regards,
    Slava Imeshev

  • Setting long property  using jconsole

    On my jmx bean I am able to invoke methods whose parameters are of type string , I added a new set method whihc takes Long as a paramter exposed it through jmx , I tried updating its value and I am getting java.lang.illegalArgument:argument type mismatch
    please advice me how to call set operations on methods whose parameter type is Long ?

    there isn't really anything more you need to do. can you show some code? also, did you make the parameter Long or long? that might make a difference.

  • Jconsole no longer works with Java 6.0, it did with 5.0

    Hello,
    We are having a very important issue. We have reproduced the situation in 10 out of 10 computers, all with the same result, even in fresh installations.
    Using jconsole, we are connecting to the following service (BEA weblogic 10): service:jmx:rmi:///jndi/iiop://host:7001/weblogic.management.mbeanservers.runtime
    In the jconsole provided in any revision of Java 5.0 (1.5) it works, that is to say, it is able to connect to the service.
    On the other hand, there is no way to accomplish this using Java 6.0. The connection fails with the following error:
    Nov 6, 2007 10:27:56 AM com.sun.corba.se.impl.orb.ORBImpl checkShutdownState
    WARNING: "IOP01210228: (BAD_OPERATION) This ORB instance has been destroyed, so no operations can be performed on it"
    org.omg.CORBA.BAD_OPERATION: vmcid: SUN minor code: 228 completed: No
         at com.sun.corba.se.impl.logging.ORBUtilSystemException.orbDestroyed(ORBUtilSystemException.java:586)
         at com.sun.corba.se.impl.logging.ORBUtilSystemException.orbDestroyed(ORBUtilSystemException.java:608)
         at com.sun.corba.se.impl.orb.ORBImpl.checkShutdownState(ORBImpl.java:1289)
         at com.sun.corba.se.impl.orb.ORBImpl.create_any(ORBImpl.java:1078)
         at com.sun.corba.se.impl.javax.rmi.CORBA.Util.writeAny(Util.java:296)
         at javax.rmi.CORBA.Util.writeAny(Util.java:80)
         at org.omg.stub.javax.management.remote.rmi._RMIServer_Stub.newClient(Unknown Source)
         at javax.management.remote.rmi.RMIConnector.getConnection(RMIConnector.java:2309)
         at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:277)
         at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248)
         at sun.tools.jconsole.ProxyClient.tryConnect(ProxyClient.java:361)
         at sun.tools.jconsole.ProxyClient.connect(ProxyClient.java:297)
         at sun.tools.jconsole.VMPanel$2.run(VMPanel.java:279)
    We have also create our own application to do this and although the same piece of code compiles under both JDKs, it fails to run with exactly the same error under Java 6.0.
    Does anyone know why this is happening and if there is a way to work around it?
    TIA.

    Hi, I faced similar problems access MBeans to Weblogic Server 10 from client under JDK(JRE) 6.0
    , but my way of workaround may be helpful:
    Do not use jmx support jar files from Weblogic Server10, use that from 9 instead. Here I use
    weblogic.jar & webservices.jar
    and it works fine.
    the following is my test program (looks ugly, but only for test)
    public class MyConnection {
        private static MBeanServerConnection connection;
        private static JMXConnector connector;
        public static void initConnection(String hostname, String portString,
                String username, String password) throws IOException,
                MalformedURLException {
            String protocol = "t3";
            Integer portInteger = Integer.valueOf(portString);
            int port = portInteger.intValue();
            String jndiroot = "/jndi/";
            String mserver = "weblogic.management.mbeanservers.domainruntime";
            JMXServiceURL serviceURL = new JMXServiceURL(protocol, hostname, port,
                    jndiroot + mserver);
            Hashtable h = new Hashtable();
            h.put(Context.SECURITY_PRINCIPAL, username);
            h.put(Context.SECURITY_CREDENTIALS, password);
            h.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES,
                "weblogic.management.remote");
            connector = JMXConnectorFactory.connect(serviceURL, h);
            connection = connector.getMBeanServerConnection();
        public static void getComplidatedObject() throws Exception {
            //String name = "com.bea:Location=examplesServer,Name=examplesServer,ServerRuntime=examplesServer,Type=JDBCServiceRuntime";\
            String name = "com.bea:Name=DomainRuntimeService,Type=weblogic.management.mbeanservers.domainruntime.DomainRuntimeServiceMBean";
            String attribute = "ServerRuntimes";
            ObjectName on = new ObjectName(name);
            Object obj = connection.getAttribute(on, attribute);
            //Method m = obj.getClass().getMethod("getState", new Class[] {});
            //Object result = m.invoke(obj, null);
            //System.out.println(result);
            System.out.println(obj.getClass().isArray());
            System.out.println(obj);
        public static void discovery() throws Exception {
            String mbeanType = "*:*";
            ObjectName patialObjectName = new ObjectName(mbeanType);
            Set mbeans = connection.queryNames(patialObjectName, null);
            long overallTime = System.currentTimeMillis();
            for (Iterator itr = mbeans.iterator(); itr.hasNext();) {
                ObjectName mbean = (ObjectName) itr.next();
                String sMBeanFullName = mbean.getCanonicalName();
                MBeanInfo mbeanInfo = connection.getMBeanInfo(mbean);
                MBeanAttributeInfo mbeanAttrInfoArray[] = mbeanInfo.getAttributes();
                if (mbeanAttrInfoArray == null) {
                    continue;
                String sMBeanDescription = mbeanInfo.getDescription();
                String s = mbeanInfo.getClassName();
                System.out.println("====================");
                System.out.println(sMBeanFullName);
                for (int i = 0; i < mbeanAttrInfoArray.length; i++) {
                    MBeanAttributeInfo attrInfo = mbeanAttrInfoArray;
    if (attrInfo.isReadable()) {
    //If attribute datatype is supported, add it to the list for this mbean
    String sAttrDataType = attrInfo.getType();
    String sAttrName = attrInfo.getName();
    String sAttrDescription = attrInfo.getDescription();
    System.out.println("Name:" + sAttrName + "\nType:" + sAttrDataType + "\nDesc:" + sAttrDescription);
    } //end if
    public static void main(String[] args) throws Exception {
    String hostname = "192.168.1.24";
    String portString = "7001";
    String username = "weblogic";
    String password = "weblogic";
    MyConnection c = new MyConnection();
    initConnection(hostname, portString, username, password);
    c.printNameAndState();
    c.discovery();
    c.getComplidatedObject();
    c.printNameAndState();
    connector.close();
    public static ObjectName[] getServerRuntimes() throws Exception {
    ObjectName service = new ObjectName(
    "com.bea:Name=DomainRuntimeService,Type=weblogic.management.mbeanservers.domainruntime.DomainRuntimeServiceMBean");
    return (ObjectName[]) connection.getAttribute(service, "ServerRuntimes");
    public void printNameAndState() throws Exception {
    ObjectName[] serverRT = getServerRuntimes();
    System.out.println("got server runtimes");
    int length = (int) serverRT.length;
    for (int i = 0; i < length; i++) {
    MBeanInfo mb = connection.getMBeanInfo(serverRT[i]);
    System.out.println(mb.getClassName());
    String name = (String) connection.getAttribute(serverRT[i], "Name");
    String state = (String) connection.getAttribute(serverRT[i],
    "State");
    System.out.println("Server name: " + name + ". Server state: " + state);

  • JConsole not picking up local Java processes

    Hi,
    Using JDK 1.5.0_06 JConsole is not picking up my local Java processes. I have set the -Dcom.sun.management.jmxremote as an arg to the JVM startup. My Windows username does not have an underscore in it and my default temporary directory is on NTFS. When I run the jps command I see my java processes but I get process information unavailable for each one except the jps command.
    Anybody have any ideas as to what else I should look at.

    Found the answer I was looking for - What a pain - http://forum.java.sun.com/thread.jspa?threadID=730397&messageID=4308804

  • JMXConnector connect fails but JConsole connects

    I have been using JMXConnectorFactory.connect for several months with no problem on different servers until I tested it on a new server. The remote server is 1.5 and this statement:
    connector = JMXConnectorFactory.connect(address,env);
    produces this error:
    Oct 23, 2007 10:43:26 AM com.sun.corba.se.impl.orb.ORBImpl checkShutdownState
    WARNING: "IOP01210228: (BAD_OPERATION) This ORB instance has been destroyed, so no operations can be performed on it"
    org.omg.CORBA.BAD_OPERATION: vmcid: SUN minor code: 228 completed: No
    at com.sun.corba.se.impl.logging.ORBUtilSystemException.orbDestroyed(Unknown Source)
    at com.sun.corba.se.impl.logging.ORBUtilSystemException.orbDestroyed(Unknown Source)
    at com.sun.corba.se.impl.orb.ORBImpl.checkShutdownState(Unknown Source)
    at com.sun.corba.se.impl.orb.ORBImpl.create_any(Unknown Source)
    at com.sun.corba.se.impl.javax.rmi.CORBA.Util.writeAny(Unknown Source)
    at javax.rmi.CORBA.Util.writeAny(Unknown Source)
    at org.omg.stub.javax.management.remote.rmi._RMIServer_Stub.newClient(Unknown Source)
    at javax.management.remote.rmi.RMIConnector.getConnection(Unknown Source)
    at javax.management.remote.rmi.RMIConnector.connect(Unknown Source)
    at javax.management.remote.JMXConnectorFactory.connect(Unknown Source)
    at MyJMXServer.listenSocket(MyJMXServer.java:199)
    at MyJMXServer.main(MyJMXServer.java:63)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
    at java.lang.Thread.run(Unknown Source)
    [ERROR] Error connecting to JMXConnector : CORBA BAD_OPERATION 1398079716 No; nested exception is:
    org.omg.CORBA.BAD_OPERATION: vmcid: SUN minor code: 228 completed: No
    However using JConsole (jdk1.5.0_11) I do get a connection. I did a trace for JConsole with
    javax.management.level=FINEST
    javax.management.remote.level=FINEST
    but could not see if it was calling com.sun.corba.se.impl.orb.ORBImpl.checkShutdownState which is where I think the problem is.
    I could not find anything related to IOP01210228 or CORBA BAD_OPERATION 1398079716.
    I also tested the connect without the env parameter:
    connector = JMXConnectorFactory.connect(address); hoping to get an authentication error but I still received the same error described above.

    This is the jconsole trace output set to FINEST during the connect. I just copied enough to show that it connects.
    Oct 29, 2007 12:30:02 PM RMIConnector connect
    FINER: [javax.management.remote.rmi.RMIConnector: jmxServiceURL=service:jmx:rmi:
    ///jndi/iiop://D6-DMS-001:8489/dms] connecting...
    Oct 29, 2007 12:30:02 PM RMIConnector connect
    FINER: [javax.management.remote.rmi.RMIConnector: jmxServiceURL=service:jmx:rmi:
    ///jndi/iiop://D6-DMS-001:8489/dms] finding stub...
    Oct 29, 2007 12:30:03 PM RMIConnector connect
    FINER: [javax.management.remote.rmi.RMIConnector: jmxServiceURL=service:jmx:rmi:
    ///jndi/iiop://D6-DMS-001:8489/dms] connecting stub...
    Oct 29, 2007 12:30:03 PM RMIConnector connect
    FINER: [javax.management.remote.rmi.RMIConnector: jmxServiceURL=service:jmx:rmi:
    ///jndi/iiop://D6-DMS-001:8489/dms] getting connection...
    Oct 29, 2007 12:30:03 PM RMIConnector connect
    FINER: [javax.management.remote.rmi.RMIConnector: jmxServiceURL=service:jmx:rmi:
    ///jndi/iiop://D6-DMS-001:8489/dms] getting class loader...
    Oct 29, 2007 12:30:03 PM RMIConnector connect
    FINER: [javax.management.remote.rmi.RMIConnector: jmxServiceURL=service:jmx:rmi:
    ///jndi/iiop://D6-DMS-001:8489/dms] done...
    Oct 29, 2007 12:30:04 PM RMIConnector queryNames
    FINEST: name=java.lang:*, query=null
    Oct 29, 2007 12:30:04 PM RMIConnector isInstanceOf
    FINEST: name=java.lang:type=Runtime, className=java.lang.management.RuntimeMXBea
    n
    Oct 29, 2007 12:30:04 PM RMIConnector addNotificationListener(ObjectName,Notific
    ationListener,NotificationFilter,Object)
    FINEST: name=JMImplementation:type=MBeanServerDelegate, listener=sun.tools.jcons
    ole.MBeansTab[,2,25,887x655,invalid,hidden,layout=sun.tools.jconsole.VariableGri
    dLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=16777225,maximumSize=,minimu
    mSize=,preferredSize=], filter=null, handback=null
    Oct 29, 2007 12:30:04 PM RMIConnector addListenerWithSubject

  • JConsole.main(s);

    hey,
    i tried to start the jconsole from my program, that works without problems and the jconsole appears.
    now i want to secure the connection with ssl, but it doesn't work.
    String[] s = new String[5];
    s[0] = "xxx.xxx.xxx.xxx:7000"
    s[1] = "-J-Djavax.net.ssl.keyStore=res/clientkeystore.jks";
    s[2] = "-J-Djavax.net.ssl.keyStorePassword=XXX";
    s[3] = "-J-Djavax.net.ssl.trustStore=res/clienttruststore";
    s[4] = "-J-Djavax.net.ssl.trustStorePassword=XXX";
    JConsole.main(s);the default help text occur:
    Usage: jconsole [ -interval=n ] [ -notile ] [ -pluginpath <path> ] [ -version ] [ connection ... ]
      -interval   Set the update interval to n seconds (default is 4 seconds)
      -notile     Do not tile windows initially (for two or more connections)
      -pluginpath Specify the path that jconsole uses to look up the plugins
      -version    Print program version
      connection = pid || host:port || JMX URL (service:jmx:<protocol>://...)
      pid         The process id of a target process
      host        A remote host name or IP address
      port        The port number for the remote connection
      -J          Specify the input arguments to the Java virtual machine
                  on which jconsole is runningdoes somebody know, how i must pass the params?
    greets and thanks
    kaffeemann

    i solved the problem with System.setProperty:
    System.setProperty("javax.net.ssl.keyStore", serverConfiguration
                        .getKeyStore());
    System.setProperty("javax.net.ssl.keyStorePassword",
                        serverConfiguration.getEncKeyStorePassword());
    System.setProperty("javax.net.ssl.trustStore", serverConfiguration
                        .getTrustStore());
    System.setProperty("javax.net.ssl.trustStorePassword",
                        serverConfiguration.getEncTrustStorePassword());Edited by: kaffeemann on Jul 27, 2009 2:57 AM

  • Jconsole - remote connection thru ssh-tunnel

    Hi all,
    I need to start jconsole on my windows-box and connect to a remote tomcat-server thru an ssh-tunnel.
    I have walked thru various posts and blogs, but finally couldn't get it running.
    On the linux-server, I have set the following JAVA_OPTS:
    export JAVA_OPTS='-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8888 -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.useLocalHostname=true -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=myserver'myserver is the server-name that is resolved by the hostname-command. I also tried using localhost instead.
    On the client I run the following ssh-command to create the tunnel:
    ssh tomcat@myserver -L8888:myserver:8888 -N -vWhen I try to create a remote connection with jconsole using localhost:8888, I see the following output by ssh:
    debug1: Connection to port 8888 forwarding to myserver port 8888 requested.
    debug1: channel 1: new [direct-tcpip]
    debug1: channel 1: free: direct-tcpip: listening port 8888 for myserver port 8888, connect from 127.0.0.1 port 1618, nchannels 2It looks not too bad to me, but unfortunately, jconsole runs into a timeout after about 2 mins.
    On the server I see the following using netstat:
    tcp        0    168 myserver:ssh    mywindowsbox:3381  VERBUNDEN  
    tcp        0      0 myserver:ssh    mywindowsbox:1317  VERBUNDEN  
    tcp        0      0 myserver:44625  myserver:8888   TIME_WAIT  
    tcp        0      0 *:8888                      *:*                         LISTENIt appears to me that the tomcat-server is listening correctly on port 8888 for all incoming hosts (although localhost should be enough).
    Furthermore, it seems that the ssh-tunnel has been establised.
    Why the hell, jconsole still can't connect?

    Hiya.
    JMX connections use two ports. You need the RMI Registry and the RMI Stub. This first one you bound to port 8888, but the other one is probably still bound to a random port. You need to be able to access that one through SSH as well.
    Trouble is that the second port uses a random port and most application servers can't statically configure this one. See this article for possible solutions (be sure to read the follow ups as well) : http://blogs.sun.com/jmxetc/entry/connecting_through_firewall_using_jmx
    Cheers,
    Hugp

  • JConsole Development

    Hello,
    I know limited Java, but I good with several other programming languages (PHP, C#, VB6, VBA, HTML, and JavaScript), so I am looking to learn. My company is using a black box application developed in Java and we are having performance issues with it. That the moment we have set the Java VM to reboot every night at 10am, which seems to help. I have setup JConsole to monitor the JVM, but with the restarts it loses connection every night and all the associated data that it has collected.
    The performance issues are causing same angry customers and they would like them fix. I am trying to find correlations between the JVM load and performance, but I need to be able to search the data to a given time frame. I can do this in excel, if I had an CSV output.
    I would like some help in modifying JConsole to automatically append the collected data to a CSV file OR recommendations on other tools that I can use to do this for me?
    I would also like some help modifying JConsole to automatically attempt reconnect at a specified time interval OR recommendations on other tools that I can use to do this for me?
    Can people recommend resources?
    Thanks
    jlimited
    Edited by: jlimited on Apr 2, 2009 9:25 AM

    jlimited wrote:
    I would like some help in modifying JConsole to automatically append the collected data to a CSV file OR recommendations on other tools that I can use to do this for me?Get a profiler.
    Create or find a client that will force the server to do stuff.
    Run the server in the profiler while using the client (or several) to produce a moderate load on the system. That should show where the system spends most of its time. Correct problems from that.
    After the above step tun the server in the profiler while using the client (or several) to produce a heavy load on the system. That should show where the system spends most of its time. Correct problems from that.
    ..and we are having performance issues with it. Helps to identify that more specifically. For example.
    1. At 8:00am everything runs fast. By 4:00pm every action from the user standpoint is slow.
    2. The customer activity report which is run at 5:00pm by all of the customers is slower and gets slower every day that the server is not rebooted. Everything else is ok.

  • Jconsole and ssl

    Hey guys,
    Can someone tell me how to use the jconsole over ssl? I know you have to set the com.sun.management.jmxremote.ssl= true... however I'm not understanding how to get it to use a particular certificate.
    And perhaps how to get tomcat started with the same options...
    crrrum

    Hello - You wrote:
    ...not understanding how to get it to use a particular certificate...
    Did you follow the recipe listed here?
    http://java.sun.com/j2se/1.5.0/docs/guide/management/agent.html#SSL_enabled
    For more information, see keytool - Key and Certificate Management Tool
    (Solaris and Linux) :
    http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/keytool.html#EXAMPLES
    (Windows):
    http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/keytool.html#EXAMPLES
    and the JSSE Guide:
    http://java.sun.com/j2se/1.5.0/docs/guide/security/jsse/JSSERefGuide.html

  • New to JMX and JConsole usage

    I am just learning about the app montoring features available through JConsole. I am using jdk150_06 to montor an app locally on a Windows PC. I set the property (-Dcom.sun.management.jmxremote) on the statup of my app. The JConsole comes up, sees the JVM, I connect to it and everything seems ok. I want to pull a heap dump of the app to look at in the Memory Analyzer plugin tool available in Eclipse 3.5. According to all the doco I see in JConsole I should see a "com.sun.management" MBean registered in which I can specify a location for the heap dump and generate one. However, I don't see a "com.sun.management" MBean in my JConsole.
    Wondering if anyone has done this before? Am I looking for the wrong thing? Is it maybe my JDK version or something?
    Any help is appreciated.
    Thanks,
    Troy

    Hi Rishabh
    Instructions for enabling jmx on a per-StorageNode basis can be found in chapter 8 of the Admin Guide: http://docs.oracle.com/cd/NOSQL/html/AdminGuide/standardized-monitoring.html
    You can enable JMX when you create the bootstrap configuration, or after the store has been deployed by setting the StorageNode's mgmtClass parameter.
    Once you have enabled it, you can connect to the JMX service by way of the StorageNode's registry. In Jconsole's "New Connection" dialogue, select "Remote Process" and supply the registry's hostname:port, where port is the number that was given as the -port argument in the makebootconfig command that originally configured the StorageNode.
    The MBeans are described in the javadoc for oracle.kv.mgmt.jmx at http://docs.oracle.com/cd/NOSQL/html/javadoc/oracle/kv/mgmt/jmx/package-summary.html.
    -- Guy

  • Re: Unable to make a secure connection to Weblogic 9 with Jconsole

    Hi,
    I'm after some help configuring my jconsole 5 (or 6) command line and service URL to create a secure connection to a Weblogic 9.2 server (1.5 JVM). The weblogic runtime mbeans server is being used to host my custom mbeans. Here are the settings I'm currently using:-
    "D:\jdk1.6.0_13\bin\jconsole.exe" -J-Djmx.remote.protocol.provider.pkgs=weblogic.management.remote -J-Djava.class.path="D:\jdk1.6.0_13\lib\jconsole.jar;D:\jdk1.6.0_13\lib\tools.jar;D:\gmac\weblogic_client_jars\wljmxclient.jar" -J-Djavax.net.ssl.keyStore=d:\keystores\????????.jks -J-Djavax.net.ssl.keyStorePassword=??????? -debug service:jmx:<strong>t3s</strong>:///jndi/<strong>t3s</strong>://w.x.y.z:ppppppp/weblogic.management.mbeanservers.runtime
    This fails with the following error:-
    09-Apr-2009 11:40:18 com.sun.corba.se.impl.legacy.connection.SocketFactoryConnectionImpl <init><br />
    WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_SSL_WLS; hostname: 1.2@; port: 2089"<br />
    org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No<br />
    at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2172)<br />
    at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2193)<br />
    at com.sun.corba.se.impl.legacy.connection.SocketFactoryConnectionImpl.<init>(SocketFactoryConnectionImpl.java:73)<br />
    at com.sun.corba.se.impl.legacy.connection.SocketFactoryContactInfoImpl.createConnection(SocketFactoryContactInfoImpl.java:70)<br />
    at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)<br />
    at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:118)<br />
    at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:211)<br />
    at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)<br />
    at weblogic.corba.j2ee.naming.Utils.narrowContext(Utils.java:126)<br />
    at weblogic.corba.j2ee.naming.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:94)<br />
    at weblogic.corba.j2ee.naming.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:31)<br />
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:41)<br />
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)<br />
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)<br />
    at javax.naming.InitialContext.init(InitialContext.java:223)<br />
    at javax.naming.InitialContext.<init>(InitialContext.java:197)<br />
    at weblogic.management.remote.common.ClientProviderBase.makeConnection(ClientProviderBase.java:138)<br />
    at weblogic.management.remote.common.ClientProviderBase.newJMXConnector(ClientProviderBase.java:79)<br />
    at javax.management.remote.JMXConnectorFactory.newJMXConnector(JMXConnectorFactory.java:338)<br />
    at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:247)<br />
    at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:207)<br />
    at sun.tools.jconsole.ProxyClient.tryConnect(ProxyClient.java:336)<br />
    at sun.tools.jconsole.ProxyClient.connect(ProxyClient.java:296)<br />
    at sun.tools.jconsole.VMPanel$2.run(VMPanel.java:280)<br />
    Caused by: java.net.UnknownHostException: 1.2@<br />
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)<br />
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)<br />
    at java.net.Socket.connect(Socket.java:519)<br />
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:550)<br />
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:353)<br />
    at com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:71)<br />
    at weblogic.corba.client.security.SSLORBSocketFactory.createSocket(SSLORBSocketFactory.java:275)<br />
    at weblogic.corba.client.iiop.BiDirSSLORBSocketFactory.createSocket(BiDirSSLORBSocketFactory.java:61)<br />
    at com.sun.corba.se.impl.legacy.connection.SocketFactoryConnectionImpl.<init>(SocketFactoryConnectionImpl.java:55)<br />
    ......I've tried all secure protocols (IIOPS, T3S, and HTTPS) with the same result. Until I added the following to the command line I got an "unknown protocol error".
    -J-Djmx.remote.protocol.provider.pkgs=weblogic.management.remote
    I know the service URL works as I have a standalone java client which can make the connection using the same JVM arguments and service URL from my development machine, using any of the mentioned protocols. I can also access the server using IIOP from jconsole unencrypted, but this will need to be turned off eventually.
    Any help would be appreciated.
    Regards
    Andrew
    </p>
    Edit : 15-Apr-2009 :
    I've Also tried using weblogic.jar in the jconsole classpath rather than wljmxclient.jar and get the following error:-
    java.io.IOException
    at weblogic.management.remote.common.ClientProviderBase.makeConnection(ClientProviderBase.java:151)
    at weblogic.management.remote.common.ClientProviderBase.newJMXConnector(ClientProviderBase.java:79)
    at javax.management.remote.JMXConnectorFactory.newJMXConnector(JMXConnectorFactory.java:338)
    Caused by: javax.naming.ConfigurationException Root exception is java.net.MalformedURLException: no host: t3s://:0
    at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:45)
    at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:773)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:365)
    at weblogic.jndi.Environment.getContext(Environment.java:307)
    I did find one sun forum posting relating to problems connecting JConsole to SSL/TLS. In that case the poster ended up creating a new connector provider for jconsole to use. I don't know if this is relevant to my situation, and no code examples were made available for me to try. If anyone can offer some advice on things to check it would be a great help, or free alternatives to JConsole which are proven to work with secure protocols.
    Edited by: APD on Apr 15, 2009 2:55 AM

    Solution *Part 1"
    Well I've managed to get JConsole and Weblogic 9.2 working over a secure connection. Getting to the solution has involved a
    lot of searching on the web, and some help from Oracle support, but the biggest credit goes to a team from Xebia (France)
    for their blogsite with an informative article on the subject.
    Here are the links to the article
    Original in French:-
    http://blog.xebia.fr/2007/06/28/jconsole-et-weblogic-9
    Put through Google's translation toolset into English:-
    http://translate.google.com/translate?hl=en&sl=fr&u=http://blog.xebia.fr/2007/06/28/jconsole-et-weblogic-9
    Originally I reviewed this without translation, but not being a French speaker/reader I just skipped the text and looked at
    the code / setup examples. This lead me to my first breakthrough which was to add the following to the JConsole startup
    command:-
    -J-Djmx.remote.protocol.provider.pkgs=weblogic.management.remote
    and
    -J-Djava.class.path="D:\jdk1.5.0_16\lib\jconsole.jar;D:\jdk1.5.0_16\lib\tools.jar;D:\weblogic_client_jars\wljmxclient.jar"
    This forces JConsole to use the weblogic classes for the various protocols, rather than its own classes, and cured the problem
    of JConsole throwing an "Unknown protocol" exception when I tried to use T3, T3S, IIOPS or HTTPS. However it didn't cure the
    next problem, which depending on the version of JConsole, was either "Unknown host" or "Malformed URL".
    I experimented with using "Weblogic.jar" in place of "wljmxclient.jar" (both taken from my Weblogic installation), and got a
    different set of errors.
    After further searching on the web, with no success, I had the inspiration to put the Xebia article through Google
    translate to see if anything else popped out, and it did. It turns out that there is a mismatch in the way the userid and
    password typed into JConsole's GUI is passed to the underlying protocol "client provider", and then the server (this may
    just be a weblogic issue), so it becomes necessary to extend the weblogic classes with a version that puts the
    userid/password in the correct place before calling the original weblogic methods. Once done the classpath needs updating
    to include the jar for the new client provider classes, and the jmx.remote.protocol.provider.pkgs needs to point at those
    classes instead of the weblogic ones.
    Here's one of the client providers I created, derived from the sample code in the Xebia article:-
    package myproviders.jmx.remote.t3;
    import java.io.IOException;
    import java.util.HashMap;
    import java.util.Map;
    import javax.management.remote.JMXConnector;
    import javax.management.remote.JMXServiceURL;
    * Extended from the original Weblogic provider to correct the userid/password location problem.
    * Credit to the team from Xebia Business Intelligence Architects for the solution.
    public class ClientProvider extends weblogic.management.remote.t3.ClientProvider {
         private static final String local_protocol = "t3"; // just a debug constant
         public JMXConnector newJMXConnector(JMXServiceURL serviceURL,
                   Map environment) throws IOException {
              System.out.println("inside myproviders clientProvider.newJMXConnector()");
              System.out.println("Protocol is " + local_protocol);
              Map newMap = checkCredentials (environment);
              System.out.println("continuing with super.newJMXConnector()");
              return super.newJMXConnector(serviceURL, newMap);
         @SuppressWarnings ("unchecked")
         private Map checkCredentials (Map map)
              System.out.println("...inside myproviders clientProvider.checkCredentials()");
              // if the old map doesn't contain the new security properties
              if (!map.containsKey("java.naming.security.principal") && ! map.containsKey("java.naming.security.credentials"))
                   System.out.println("......Missing new format credentials");
                   // but it does contain the old one
                   if (map.containsKey("jmx.remote.credentials"))
                        System.out.println("......found old format credentials - transforming old to new.");
                        // build a new map containing the correct properties, as well as the old ones, so whichever
                        // version the server is expecting, it will get the values.
                        Map newMap = new HashMap();                    
                        newMap.putAll(map);
                        String[] cred = (String[])map.get("jmx.remote.credentials");
                        newMap.put("java.naming.security.principal", cred[0]);
                        newMap.put("java.naming.security.credentials",cred[1]);
                        return newMap;
              return map;
    ---------------------------------------------------------------------------------------------------------------

  • Weblogic 91 Jboss  Pojo Cache and JConsole Issue

    Hi ,
    The set up is like this ,
    JBoss Pojo Cache is used for caching on Weblogic 9.1, trying to use JConsole (Sun) to connect to the managed server's mbean server to get the Pojo Cache.
    Am getting the following exception on the server, Any suggestions/help would be great
    <Jul 20, 2006 2:30:54 PM PDT> <Warning> <RMI> <BEA-080003> <RuntimeException thrown by rmi server
    javax.management.remote.rmi.RMIConnectionImpl.getAttribute(Ljavax.management.ObjectName;Ljava.lan
    String;Ljavax.security.auth.Subject;)
    java.lang.ClassCastException: org.jboss.cache.aop.TreeCacheAop.
    java.lang.ClassCastException: org.jboss.cache.aop.TreeCacheAop
    at weblogic.iiop.IIOPOutputStream.writeAny(IIOPOutputStream.java:1534)
    at weblogic.iiop.IIOPOutputStream.writeObject(IIOPOutputStream.java:2172)
    at javax.management.remote.rmi.RMIConnectionImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:517)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:407)
    Truncated. see log file for complete stacktrace
    >

    Shirish Goel <> writes:
    Looks like a serialization issue. You should check the definition of TreeCacheAop.
    andy
    Hi ,
    The set up is like this ,
    JBoss Pojo Cache is used for caching on Weblogic 9.1, trying to use JConsole (Sun) to connect to the managed server's mbean server to get the Pojo Cache.
    Am getting the following exception on the server, Any suggestions/help would be great
    <Jul 20, 2006 2:30:54 PM PDT> <Warning> <RMI> <BEA-080003> <RuntimeException thrown by rmi server
    javax.management.remote.rmi.RMIConnectionImpl.getAttribute(Ljavax.management.ObjectName;Ljava.lan
    String;Ljavax.security.auth.Subject;)
    java.lang.ClassCastException: org.jboss.cache.aop.TreeCacheAop.
    java.lang.ClassCastException: org.jboss.cache.aop.TreeCacheAop
    at weblogic.iiop.IIOPOutputStream.writeAny(IIOPOutputStream.java:1534)
    at weblogic.iiop.IIOPOutputStream.writeObject(IIOPOutputStream.java:2172)
    at javax.management.remote.rmi.RMIConnectionImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:517)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:407)
    Truncated. see log file for complete stacktrace

  • How to configure JConsole to connect to an agent with JMXMP and SASL Auth

    Hi,
    I have a standalone Java application which I am monitoring via JMX with the JMXMP protocol.
    I have just added SASL authentication, but now I'm not able to connect with JConsole anymore.
    Any pointers would be appreciated.
    I'm running Java 5.
    Thanks.

    Thanks, Ken.  I do have the Webex Application Scanning Bypass setting enabled already.  I agree it is unable to work via HTTPS due to the proprietary protocol the client is using.  It does seem to work sometimes, but isn't reliable.  I will research the logs, as you suggested.
    Thanks,
        Chris
    PS. Here is are the screenshots of the application.
    Message was edited by: Chris Gillham

  • Can't find my MBean in VisualVM or JConsole

    I have a MBean that I'm deploying as part of an ear onto Glassfish. Using JConsole or VisualVM I can't find the MBean. As far as I can tell it's deploying correctly. I've put the class below, in case the problem is in there. Any ideas?
    public class TestEmitter implements TestEmitterMBean, NotificationEmitter {
    private NotificationBroadcasterSupport broadcaster = new NotificationBroadcasterSupport();
    private long seqNumber;
    private static final String TYPE_REQUESTED = "requested";
    private static final String TYPE_SUCCESSFUL = "request successful";
    private static final String TYPE_FAILED = "request failed";
    public TestEmitter(){
    @Override
    public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws IllegalArgumentException {
    broadcaster.addNotificationListener(listener, filter, handback);
    @Override
    public MBeanNotificationInfo[] getNotificationInfo() {
    return new MBeanNotificationInfo[]{
    new MBeanNotificationInfo(new String[]{TYPE_REQUESTED, TYPE_SUCCESSFUL, TYPE_FAILED},
    javax.management.Notification.class.getName(), "Notifications")};
    @Override
    public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException {
    broadcaster.removeNotificationListener(listener);
    @Override
    public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException {
    broadcaster.removeNotificationListener(listener, filter, handback);
    public synchronized long getNextSeqNumber() {
    return seqNumber++;
    @Override
    public void sendRequestNotification() {
    Notification notification = new Notification(TYPE_REQUESTED,this,getNextSeqNumber());
    broadcaster.sendNotification(notification);
    @Override
    public void sendSuccessfulNotification() {
    Notification notification = new Notification(TYPE_SUCCESSFUL,this,getNextSeqNumber());
    broadcaster.sendNotification(notification);
    @Override
    public void sendFailedNotification() {
    Notification notification = new Notification(TYPE_FAILED,this,getNextSeqNumber());
    broadcaster.sendNotification(notification);
    }

    Basically, that's it. If I set a break point I can see the code in the bean is being executed so I'm assuming it's been deployed.

Maybe you are looking for

  • Production Orders - Scheduled Finished Date Basic Finish Date

    In production orders, it is being noticed scheduled finished date lies further than basic finish date, what could be the reason? what configuration should we need to do in order to make scheduled finish date matches (or) lies before basic finish date

  • Just got a ipod and have many problems

    first of all i dont kno much about computers but anyways how come when im transfering music in my ipod it says it only has like 900 mb of space. Also how come one of my songs is 5 min long and it takes up 5 mb but another 4 min song takes up around 6

  • Need a default varient for ME57

    Hi Folks, Could any one please explain how to maintain a default varient for transaction ME57? Also do explain to maintain all fields as empty while entering to ME57 expcept the scope of list and sort indicator. Say for example we maintain 3 varients

  • Why is my ipod 5th gen pictures sometimes turn out blank white?

    I am currently using ipod 5th gen and recently, my pictures are just white blank pictures whenever i open them. This only happens sometimes and only to recent pictures. Other old pictures can be opened and are just fine. This has been bothering me. I

  • IR 9.3 Import data issue

    Hello All, I have a spreedsheet of data. which i imported into bqy and used that as local result in the main query and joined. When i working on the desktop version its working fine. when i publish the same in workspace and my PC gets freezes. i need