Hi Sadhu,

I just tried it, we need to give permissions to the files db.properties and 
log4j-cloud.xml after copying them to the /etc/cloudstack/usage directory. 
After that just restart the cloudstack-usage service and the issue won't be 
seen.

Thanks and regards,
Abhinav

-----Original Message-----
From: Suresh Sadhu [mailto:suresh.sa...@citrix.com] 
Sent: Monday, April 15, 2013 1:36 PM
To: dev@cloudstack.apache.org
Subject: RE: [QA]question on cloudstack-usage service

Still see the problem even after copying the files


[root@rhel631 management]# cp db.properties /etc/cloudstack/usage/
[root@rhel631 management]# cp log4j-cloud.xml /etc/cloudstack/usage/
[root@rhel631 management]# service cloudstack-usage start
Starting CloudStack Usage Monitor cloudstack-usage         [  OK  ]
[root@rhel631 management]# service cloudstack-usage status cloudstack-usage 
(pid  13320) is running...
[root@rhel631 management]# service cloudstack-usage status cloudstack-usage is 
stopped

total 68

[root@rhel631 usage]# chmod 755 *
[root@rhel631 usage]# ll
-rwxr-xr-x. 1 root root 64626 Apr 15 09:31 cloudstack-usage.err
-rwxr-xr-x. 1 root root     0 Mar 29 09:16 cloudstack-usage.out
[root@rhel631 usage]# service cloudstack-usage start
Starting CloudStack Usage Monitor cloudstack-usage         [  OK  ]
[root@rhel631 usage]# service cloudstack-usage status cloudstack-usage is 
stopped



regards
sadhu

-----Original Message-----
From: Hugo Trippaers [mailto:htrippa...@schubergphilis.com]
Sent: 15 April 2013 13:15
To: dev@cloudstack.apache.org
Subject: RE: [QA]question on cloudstack-usage service

Heya,

I just checked my qa system. Before starting the usage server I copy the 
db.properties and log4j.xml from /etc/cloudstack/management to 
/etc/cloudstack/usage.  Without these two files the usage server will have 
trouble starting. The db.properties not being present could be the cause for 
the DAO failure.

Can you test with this "fix"? If that works I'll fix the usage server to also 
look in /etc/cloudstack/managent for those files and package example 
configuration in the rpm. (In case people want to install the usage server on 
another server than the management server)

Cheers,

Hugo

> -----Original Message-----
> From: Abhinav Roy [mailto:abhinav....@citrix.com]
> Sent: Monday, April 15, 2013 7:55 AM
> To: dev@cloudstack.apache.org
> Subject: RE: [QA]question on cloudstack-usage service
> 
> Same issue is seen in my setup also.
> 
> Thanks and regards,
> Abhinav
> 
> -----Original Message-----
> From: Suresh Sadhu [mailto:suresh.sa...@citrix.com]
> Sent: Monday, April 15, 2013 11:15 AM
> To: dev@cloudstack.apache.org
> Subject: RE: [QA]question on cloudstack-usage service
> 
> Wido/Kelven,
> 
> This issue  noticed on master build please find few more details below:.
>  http://jenkins-ccp.citrix.com/job/ASF-build-master-nonoss-rhel63/211/
> 
> 
> root@centos63 usage]# which jsvc
> /usr/bin/jsvc
> [root@centos63 usage]# /usr/bin/jsvc status
> 15/04/2013 06:53:11 14280 jsvc error: Cannot locate Java Home Manually 
> set the JAVA_HOME classpath but still see the problem
> 
> [root@centos63 usage]# export JAVA_HOME=/usr/lib/jvm/jre-1.6.0
> [root@centos63 usage]# echo $JAVA_HOME
> /usr/lib/jvm/jre-1.6.0
> [root@centos63 usage]# /usr/bin/jsvc status
> [root@centos63 usage]# /usr/bin/jsvc start
> 
> Content of  Cloudstack-usage file (FYI)
> --------------------------------------------------------
> SCP=""
> DCP=""
> UCP=`ls /usr/share/cloudstack-usage/cloud-usage-*.jar`":"`ls
> /usr/share/cloudstack-usage/lib/* | tr '\n' ':'` 
> JCP="/usr/share/java/commons-daemon.jar"
> 
> # We need to append the JSVC daemon JAR to the classpath # AgentShell 
> implements the JSVC daemon methods export 
> CLASSPATH="$SCP:$DCP:$UCP:$JCP:/etc/cloudstack/usage"
> 
> 
> Its looks like it's similar to the following issue:
> 
>  https://issues.apache.org/jira/browse/CLOUDSTACK-1746
> 
> 
> regards
> sadhu
> 
> 
> 
> 
> -----Original Message-----
> From: Kelven Yang [mailto:kelven.y...@citrix.com]
> Sent: 13 April 2013 00:11
> To: dev@cloudstack.apache.org
> Subject: Re: [QA]question on cloudstack-usage service
> 
> It looks like to UsageDao has some trouble to initialize itself. On 
> which branch does this problem happen?
> 
> Kelven
> 
> On 4/12/13 11:05 AM, "Wido den Hollander" <w...@widodh.nl> wrote:
> 
> >
> >
> >On 04/12/2013 01:33 PM, Suresh Sadhu wrote:
> >> HI,
> >>
> >>
> >> Any idea why usage server is stopped with unexpected exception(is 
> >>there any issue exits/logged already),do we need to add any 
> >>additional packages/rpm/configurations other than installing the 
> >>usage server monitor"
> >> Seen this issue on master build.
> >>
> >
> >Hmm, that is weird. Could you print the classpath what is submitted 
> >to the JSVC process?
> >
> >Wondering what it is generating.
> >
> >Wido
> >
> >>
> >> [root@rhel631 ~]# service cloudstack-usage start
> >> Starting CloudStack Usage Monitor cloudstack-usage         [  OK  ]
> >> [root@rhel631 ~]# service cloudstack-usage status cloudstack-usage 
> >> (pid  20999) is running...
> >> [root@rhel631 ~]# service cloudstack-usage status cloudstack-usage 
> >> is stopped
> >>
> >>
> >> Content of cloudstack-usage.err:
> >> *************************
> >>
> >> log4j:WARN No appenders could be found for logger 
> >>(org.springframework.core.env.StandardEnvironment).
> >> log4j:WARN Please initialize the log4j system properly.
> >> log4j:WARN See
> >>http://logging.apache.org/log4j/1.2/faq.html#noconfig
> >>for more info.
> >> java.lang.reflect.InvocationTargetException
> >>          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >>          at
> >>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorIm
> pl.j
> >>ava
> >>:57)
> >>          at
> >>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcc
> ess
> >>orI
> >>mpl.java:43)
> >>          at java.lang.reflect.Method.invoke(Method.java:616)
> >>          at
> >>org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoa
> der.java
> >>:17
> >>7)
> >> Caused by: org.springframework.beans.factory.BeanCreationException:
> >>Error creating bean with name 'portForwardingUsageParser': Injection 
> >>of autowired dependencies failed; nested exception is
> >>org.springframework.beans.factory.BeanCreationException: Could not 
> >>autowire field: private com.cloud.usage.dao.UsageDao 
> >>com.cloud.usage.parser.PortForwardingUsageParser._usageDao; nested 
> >>exception is org.springframework.beans.factory.BeanCreationException:
> >>Error creating bean with name 'usageDaoImpl' defined in URL 
> >>[jar:file:/usr/share/cloudstack-usage/lib/cloud-server-4.2.0-SNAPSHOT.
> >>jar
> >>!/com/cloud/usage/dao/UsageDaoImpl.class]: BeanPostProcessor before 
> >>instantiation of bean failed; nested exception is
> >>net.sf.cglib.core.CodeGenerationException:
> >>java.lang.ExceptionInInitializerError-->null
> >>          at
> >>org.springframework.beans.factory.annotation.AutowiredAnnotationBea
> nPo
> >>stP
> >>rocessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProc
> esso
> >>r.j
> >>ava:287)
> >>          at
> >>org.springframework.beans.factory.support.AbstractAutowireCapableBea
> nF
> >>act
> >>ory.populateBean(AbstractAutowireCapableBeanFactory.java:1106)
> >>          at
> >>org.springframework.beans.factory.support.AbstractAutowireCapableBea
> nF
> >>act
> >>ory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
> >>          at
> >>org.springframework.beans.factory.support.AbstractAutowireCapableBea
> nF
> >>act
> >>ory.createBean(AbstractAutowireCapableBeanFactory.java:456)
> >>          at
> >>org.springframework.beans.factory.support.AbstractBeanFactory$1.getO
> bj
> >>ect
> >>(AbstractBeanFactory.java:294)
> >>          at
> >>org.springframework.beans.factory.support.DefaultSingletonBeanRegist
> >>r
> y
> >>.ge
> >>tSingleton(DefaultSingletonBeanRegistry.java:225)
> >>          at
> >>org.springframework.beans.factory.support.AbstractBeanFactory.doGetB
> ea
> >>n(A
> >>bstractBeanFactory.java:291)
> >>          at
> >>org.springframework.beans.factory.support.AbstractBeanFactory.getBea
> n(
> >>Abs
> >>tractBeanFactory.java:193)
> >>          at
> >>org.springframework.beans.factory.support.DefaultListableBeanFactory
> >>.p
> >>reI
> >>nstantiateSingletons(DefaultListableBeanFactory.java:609)
> >>          at
> >>org.springframework.context.support.AbstractApplicationContext.finis
> >>hB
> >>ean
> >>FactoryInitialization(AbstractApplicationContext.java:918)
> >>          at
> >>org.springframework.context.support.AbstractApplicationContext.refre
> >>sh
> >>(Ab
> >>stractApplicationContext.java:469)
> >>          at
> >>org.springframework.context.support.ClassPathXmlApplicationContext.<
> >>i
> n
> >>it>
> >>(ClassPathXmlApplicationContext.java:139)
> >>          at
> >>org.springframework.context.support.ClassPathXmlApplicationContext.<
> >>i
> n
> >>it>
> >>(ClassPathXmlApplicationContext.java:83)
> >>          at com.cloud.usage.UsageServer.start(UsageServer.java:52)
> >>          ... 5 more
> >> Caused by: org.springframework.beans.factory.BeanCreationException:
> >>Could not autowire field: private com.cloud.usage.dao.UsageDao 
> >>com.cloud.usage.parser.PortForwardingUsageParser._usageDao; nested 
> >>exception is org.springframework.beans.factory.BeanCreationException:
> >>Error creating bean with name 'usageDaoImpl' defined in URL 
> >>[jar:file:/usr/share/cloudstack-usage/lib/cloud-server-4.2.0-SNAPSHOT.
> >>jar
> >>!/com/cloud/usage/dao/UsageDaoImpl.class]: BeanPostProcessor before 
> >>instantiation of bean failed; nested exception is
> >>net.sf.cglib.core.CodeGenerationException:
> >>java.lang.ExceptionInInitializerError-->null
> >> @
> >>

Reply via email to