I have an AIX Server running Websphere 8.5
Under Administration Services in the Web UI I have configured all the JMX Connectors to be enabled. No SSL or Authentication at the moment, since it's only for testing.
I also have a remote linux machine running Ubuntu 16.04 and oracle Java 8. I have copied all the runtime jars from "/usr/IBM/WebSphere/AppServer/runtimes" to a folder on that linux machine.
After copying the jar files I have created a script to start jconsole and connect via JMX:
#!/bin/bash
CLASSPATH=$JAVA_HOME/lib/jconsole.jar
CLASSPATH=$CLASSPATH:/home/user/runtimes/com.ibm.ws.admin.client_8.5.0.jar
CLASSPATH=$CLASSPATH:/home/user/runtimes/com.ibm.ws.ejb.thinclient_8.5.0.jar
CLASSPATH=$CLASSPATH:/home/user/runtimes/com.ibm.ws.orb_8.5.0.jar
$JAVA_HOME/bin/jconsole \
-J-Djava.class.path=$CLASSPATH\
service:jmx:iiop://172.29.154.22:9100/jndi/JMXConnector
Upon starting this script, it tells me that the secure connection failed and whether I want to retry insecurely. If I confirm the insecure connection, it will retry and suceed. After that it exposes all of Websphere's custom Mbeans.
The jconsole output windows reads as following:
Aug 30, 2017 10:23:25 AM com.ibm.ws.security.config.ConfigURLProperties
SEVERE: JSAS1480I: Security is not enabled because the ConfigURL property file is not set.
Aug 30, 2017 10:23:26 AM com.ibm.ws.security.config.SecurityObjectLocator
INFO: CWSCF0002I: The client code is attempting to load the security configuration the server and this operation is not allowed.
Now I need to do the same on a/any windows machine. My current windows machine is running windows 10 and oracle java jdk1.8.0_112.
So I copied the runtimes and ported the jconsole script. The following batch script contains the commands to start jconsole:
"C:\Program Files\Java\jdk1.8.0_112\bin\jconsole.exe" -J"-Djava.class.path=C:\Program Files\Java\jdk1.8.0_112\lib\jconsole.jar;C:\Users\user\Desktop\jconsole\runtimes\com.ibm.ws.admin.client_8.5.0.jar;C:\Users\user\Desktop\jconsole\runtimes\com.ibm.ws.ejb.thinclient_8.5.0.jar;C:\Users\user\Desktop\jconsole\runtimes\com.ibm.ws.orb_8.5.0.jar" service:jmx:iiop://172.29.154.22:9100/jndi/JMXConnector
Running this script (as admin or as normal user, no difference), it will try to connect securely and fail. The jconsole output will read:
Aug 30, 2017 10:33:00 AM com.ibm.ws.security.config.ConfigURLProperties
SCHWERWIEGEND: JSAS1480I: Die Sicherheit ist nicht aktiviert, weil die ConfigURL-Eigenschaftendatei nicht definiert ist.
Aug 30, 2017 10:33:00 AM com.ibm.ws.security.config.SecurityObjectLocator
INFORMATION: CWSCF0002I: Der Clientcode versucht die Sicherheitskonfiguration des Servers zu laden. Diese Operation ist nicht zulässig.
Aug 30, 2017 10:33:08 AM com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl <init>
WARNUNG: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: cli-l-01.intranet.local; port: 2809"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2200)
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2221)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:223)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:236)
at com.sun.corba.se.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:119)
at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:187)
at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:137)
at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:229)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:130)
at com.ibm.WsnBootstrap.WsnNameServiceHelper.narrow(WsnNameServiceHelper.java:65)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getWsnNameService(WsnInitCtxFactory.java:1507)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootContextFromServer(WsnInitCtxFactory.java:1041)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootJndiContext(WsnInitCtxFactory.java:963)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:615)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:128)
at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:765)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:164)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:179)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1955)
at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1922)
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:287)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:270)
at sun.tools.jconsole.ProxyClient.tryConnect(ProxyClient.java:357)
at sun.tools.jconsole.ProxyClient.connect(ProxyClient.java:313)
at sun.tools.jconsole.VMPanel$2.run(VMPanel.java:294)
Caused by: java.net.SocketException: Permission denied: connect
at sun.nio.ch.Net.connect0(Native Method)
at sun.nio.ch.Net.connect(Net.java:454)
at sun.nio.ch.Net.connect(Net.java:446)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:648)
at java.nio.channels.SocketChannel.open(SocketChannel.java:189)
at com.sun.corba.se.impl.transport.DefaultSocketFactoryImpl.createSocket(DefaultSocketFactoryImpl.java:95)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:207)
... 23 more
Then I get the option to retry connecting insecurely which will also fail with the following additional output to the jconsole output window:
Aug 30, 2017 10:34:01 AM com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl <init>
WARNUNG: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: cli-l-01.intranet.local; port: 2809"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2200)
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2221)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:223)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:236)
at com.sun.corba.se.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:119)
at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:187)
at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:137)
at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:229)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:130)
at com.ibm.WsnBootstrap.WsnNameServiceHelper.narrow(WsnNameServiceHelper.java:65)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getWsnNameService(WsnInitCtxFactory.java:1507)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootContextFromServer(WsnInitCtxFactory.java:1041)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootJndiContext(WsnInitCtxFactory.java:963)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:615)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:128)
at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:765)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:164)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:179)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1955)
at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1922)
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:287)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:270)
at sun.tools.jconsole.ProxyClient.tryConnect(ProxyClient.java:357)
at sun.tools.jconsole.ProxyClient.connect(ProxyClient.java:313)
at sun.tools.jconsole.VMPanel$2.run(VMPanel.java:294)
Caused by: java.net.SocketException: Permission denied: connect
at sun.nio.ch.Net.connect0(Native Method)
at sun.nio.ch.Net.connect(Net.java:454)
at sun.nio.ch.Net.connect(Net.java:446)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:648)
at java.nio.channels.SocketChannel.open(SocketChannel.java:189)
at com.sun.corba.se.impl.transport.DefaultSocketFactoryImpl.createSocket(DefaultSocketFactoryImpl.java:95)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:207)
... 23 more
"cli-l-01.intranet.local" is the local windows computer's hostname and points to 127.0.0.1 - Why is it doing this? It's supposed to connect to the server and not the local machine. The server's port 2809 is open under port name "BOOTSTRAP_ADDRESS" in Websphere
I have also tried using other versions of java, for example the IBM Java JRE, aswell as 32 and 64 bit versions. Also i have tried different computers also running windows server 2012.
What is going wrong here? It works perfectly on linux but i can't get the connection to work on windows.