WG: how to change resource name programmatically
by SALEWSKI, Steffen
Hi All,
@Joseph:
Thank you very much for the instructions how to add a manual resource to RHQ. This helped me a lot!
@All:
Now, I also have the problem to rename my added resource. I found out that there is the possibility to change properties (e.g. the name of a resource) by calling the equivalent setter method:
var res = ResourceManager.getResource(subject, 10001)
res.setName("My Resource Name")
The question now is: How to commit this property change via CLI, so it is updated on the server?
I could not find an update method or something equal in the CLI API. Btw, another question: Where to find the most recent API description for the CLI interface? The one I currently use is: http://www.redhat.com/docs/en-US/JBoss_ON/2.3/api/remote-api/index.html But there the DiscoveryBoss is completely undescribed. Is there some?
Best regards,
Steffen
Von: rhq-users-bounces(a)lists.fedorahosted.org [mailto:rhq-users-bounces@lists.fedorahosted.org] Im Auftrag von Alexey Kamenchuk
Gesendet: Sonntag, 20. Juni 2010 17:33
An: rhq-users(a)lists.fedorahosted.org
Betreff: how to change resource name programmatically
Hi All
I need to rename my inventoried platforms and JBoss servers
Can this be done via CLI?
Regards
Alexey
13 years, 9 months
using ${} notation in ant recipe
by John Mazzitelli
shashin from #rhq has this question - I haven't tried this, but this
should work. If it doesn't, we should try to fix it so it does work.
This would be an important feature:
In deploy.xml ant recipe, define this:
<rhq:input-property name="profile.template"
description="Name of JBoss EAP template used to create Profile"
required="true"
defaultValue="default"
type="string"/>
Now, inside of the <rhq:deployment-unit> task, define an rhq:file
definition, and use that input property in the value of the name
attribute, like this:
<rhq:deployment-unit ...>
...
<rhq:file name="eap-template-${profile.template}-50.zip" />
Our ant handler should replace all ${} variables with their property
values (whether they were defined with rhq:input-property or just the
normal Ant <property>.
Its been reporting that this doesn't work. Can someone confirm that this
is broken? If so, we need to write up a bugzilla and hopefully fix this.
13 years, 10 months
Re: rhq-agent keep crashing
by John Mazzitelli
OK, looks like its a JNA problem - based on this:
C [libc.so.6+0x6d83a] cfree+0x7a
C [jna331537674748900792.tmp+0x573b] Java_com_sun_jna_Memory_free+0x1b
j com.sun.jna.Memory.free(J)V+0
j com.sun.jna.Memory.finalize()V+4
Its trying to free memory which causes a segfault - most likely its a
bug in JNA with their native memory management code. As Ian said, the
only place JNA is used is in certain plugins (the agent core does not
use JNA native stuff).
However, you can't purge agent plugins as per Ian's instructions (that
is only for SERVER side plugins - you can't purge agent plugins today).
If you are using the latest beta, you CAN however DISABLE plugins. See
this bugzilla issue:
https://bugzilla.redhat.com/show_bug.cgi?id=RHQ-2
If you are using the latest code, shutdown your agents, disable the
plugins you don't need that use JNA, then restart your agents and see if
the problem goes away. I'm not sure of the exact steps here, but I think
if you shutdown the agents, then disable plugins, then restart agents,
it should remove those plugins from getting deployed in the agents.
If you track down the JNA bug, let us know and we'll see if we can work
around it. Perhaps its just an issue where we should upgrade the version
of JNA we use - if so, we can upgrade that and rebuild the plugins.
13 years, 10 months
rhq-agent keep crashing
by Henon Guillaume
Hi,
I have installed rhq-server-3.0.0.B05 and server is working fine.
Now I have also installed an agent but it keeps crashing, before having discovered any targets.
The hs_err file shows the following
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00c8001c, pid=27794, tid=2800745360
#
# JRE version: 6.0_20-b02
# Java VM: Java HotSpot(TM) Server VM (16.3-b01 mixed mode linux-x86 )
# Problematic frame:
# C [libc.so.6+0x6801c]
--------------- T H R E A D ---------------
Current thread (0xa632c800): JavaThread "InventoryManager.discovery-1" daemon [
_thread_in_native, id=28634, stack(0xa6eaf000,0xa6f00000)]
siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x4c8fedf
c
And last entry in agent.log is
2010-06-24 16:52:39,501 INFO [InventoryManager.discovery-1] (rhq.core.pc.invent
ory.AutoDiscoveryExecutor)- Process scan auto-detected new server resource: scan
=[ProcessScan: query=[process|basename|match=^java.*,arg|org.jboss.Main|match=.*
], name=[JBoss4]], discovered-process=[process: pid=[14653], name=[java], ppid=[
14627]]
I'm running agent and server on the same host : linux redhat 5 32b.
2.6.18-53.el5xen #1 SMP Wed Oct 10 17:06:12 EDT 2007 i686 i686 i386 GNU/Linux
Can somebody help me on that issue ? I had the same problem with rhq-server-3.0.0.B03.
Thanks.
Guillaume
13 years, 10 months
RHQ with H2 database error on database creation
by Larry Brigman
After figuring out the issue with the web page erasing the database password,
the installation stops without providing an error but the web page still hast
the moving the bar with "Starting up, please wait..."
First exception after what looks to be the end of database creation.
2010-06-17 14:04:04,199 WARN [org.jboss.system.ServiceController]
Problem starting service persistence.units:ear=rhq.ear,unitName=rhqpu
javax.persistence.PersistenceException:
org.hibernate.HibernateException: Dialect class not found:
org.rhq.core.domain.dialect.H2CustomDialect
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:720)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:127)
at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:246)
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 org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:103)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy53.start(Unknown Source)
at org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:120)
at org.jboss.ejb3.Ejb3Deployment.startPersistenceUnits(Ejb3Deployment.java:627)
at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:351)
at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:91)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy33.start(Unknown Source)
at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:512)
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 org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy34.start(Unknown Source)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy9.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
Caused by: org.hibernate.HibernateException: Dialect class not found:
org.rhq.core.domain.dialect.H2CustomDialect
at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:81)
at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:42)
at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:426)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:128)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2019)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:713)
... 95 more
13 years, 10 months
RHQ with H2 database fails on installation
by Larry Brigman
I am trying to install rhq 3.0.0.B05 using the H2 database on a RHEL5 system.
It is running sun jre 1.6.0-20. During the install, the test connection works
but moving on to the next phase it gets the following error on the web page:
org.h2.jdbc.JdbcSQLException: Wrong user name or password [8004-117]
It turns out that the issue is that when the test connection is
completed it wipes out the password from the page such
that it has to be re-entered.
13 years, 10 months