rhq client beginners question
willemnoorduin Mar 10, 2011 6:17 AMI have installed JBoss-Operation Network (JON 2.4.0) on a server, and the accompanying agents on the JBoss-AS nodes. Setup was Okey, and we are receiving data allright. My question is relly about rhq-remote-client. When I first test connectivity, I get:
wnoordui@192.168.0.1:~/rhq/rhq-remoting-cli-3.0.0.GA/scripts$ ./../bin/rhq-cli.sh -u rhqadmin -p rhqadmin
RHQ - RHQ Enterprise Remote CLI 3.0.0.GA
Remote server version is: 3.0.1.GA(81e26be20d)
Login successful
rhqadmin@localhost:7080$
So this is okay, when I execute the following script:
var criteria = new org.rhq.core.domain.criteria.ResourceCriteria();
var resource = new org.rhq.core.domain.resource.Resource();
criteria.addFilterResourceTypeName('JBossAS Server')
criteria.fetchChildResources(true)
resources = ResourceManager.findResourcesByCriteria(criteria)
resource = resources.get(0)
if (resource.childResources == null) print('no child resources'); else pretty.print(resource.childResources);
We get:
rhqadmin@localhost:7080$ exec -f /home/wnoordui/rhq/rhq-remoting-cli-3.0.0.GA/scripts/associations.js
org.jboss.remoting.CannotConnectException: Can not connect http client invoker. cannot assign instance of java.lang.String to field org.rhq.core.domain.resource.Resource.modifiedBy of type org.rhq.core.domain.auth.Subject in instance of org.rhq.core.domain.resource.Resource. Response: OK/200.
at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:348)
at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:137)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
at org.jboss.remoting.Client.invoke(Client.java:1634)
at org.jboss.remoting.Client.invoke(Client.java:548)
at org.jboss.remoting.Client.invoke(Client.java:536)
at org.rhq.enterprise.client.RemoteClientProxy.invoke(RemoteClientProxy.java:201)
at $Proxy18.findResourcesByCriteria(Unknown Source)
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 sun.reflect.misc.Trampoline.invoke(MethodUtil.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
....
JBoss-Operation Network is installed as out-of-the-box. The only thing I have changed is:
root:/opt/jon-server/jbossas/server/default/conf# vim jboss-service.xml
And uncomment the attrbute InvokerLocator tag I did found this by googling). Still not working though. I am just beginning with JON and remoting Client, so I think this is just me. Can anyone say how to configure JON correclty to handle my requsts ?