Yes, after reinstall the cloudstack-usage. -----Original Message----- From: Suresh Kumar Anaparti <sureshkumar.anapa...@gmail.com> Sent: Friday, August 12, 2022 10:55 AM To: users@cloudstack.apache.org Subject: Re: cloud usage Unable to load db configuration
Ok, issue resolved after reinstallation? On Fri, Aug 12, 2022 at 12:40 PM <cristian.c@istream.today> wrote: > > Looks like there was a issue with db.properties, after I reinstalled, the > symlink was created, before was without symlink. > > lrwxrwxrwx 1 root root 40 Aug 11 18:56 db.properties -> > /etc/cloudstack/management/db.properties > lrwxrwxrwx 1 root root 30 Aug 11 18:56 key -> /etc/cloudstack/management/key > > > Regards, > Cristian > > > -----Original Message----- > From: Suresh Kumar Anaparti <sureshkumar.anapa...@gmail.com> > Sent: Friday, August 12, 2022 9:37 AM > To: users@cloudstack.apache.org > Subject: Re: cloud usage Unable to load db configuration > > Ok, Please check the parameter "db.cloud.maxActive" in > /etc/cloudstack/usage/db.properties as well. > > parameter parsing issue here: > https://github.com/apache/cloudstack/blob/cad9332082a1f85eedc30cf547ae > 28224be170c2/framework/db/src/main/java/com/cloud/utils/db/Transaction > Legacy.java#L1030 > > On Fri, Aug 12, 2022 at 12:17 AM <cristian.c@istream.today> wrote: > > > > Hi Suresh, > > > > I only have these; > > > > root@acs-apac:/home/ubuntu# find / -name "db.properties" > > /etc/cloudstack/usage/db.properties > > /etc/cloudstack/management/db.properties > > root@acs-apac:/home/ubuntu# > > > > > > Regards, > > Cristian > > > > -----Original Message----- > > From: Suresh Kumar Anaparti <sureshkumar.anapa...@gmail.com> > > Sent: Thursday, August 11, 2022 7:19 PM > > To: users@cloudstack.apache.org > > Subject: Re: cloud usage Unable to load db configuration > > > > Hi Cristian, > > > > The listed db configuration parameters looks good. > > > > I think there is another db.properties file from where the configuration is > > loaded. Can you find whether any other db.properties file exists, and check > > if the parameter "db.cloud.maxActive" is missing or has invalid value. > > Please update / correct it to "db.cloud.maxActive=250". You can ignore the > > simulator db settings (simulator is used for testing purposes). > > > > Regards, > > Suresh > > > > On Thu, Aug 11, 2022 at 4:55 PM <cristian.c@istream.today> wrote: > > > > > > HI Suresh, > > > > > > > > > This is what I have in from /etc/management/db.properties > > > > > > # usage database tuning parameters > > > > > > db.cloud.port=3306 > > > > > > db.cloud.maxActive=250 > > > db.cloud.maxIdle=30 > > > db.cloud.maxWait=10000 > > > > > > > > > db.usage.port=3306 > > > > > > db.usage.maxActive=100 > > > db.usage.maxIdle=30 > > > db.usage.maxWait=10000 > > > db.usage.url.params=serverTimezone=UTC > > > > > > > > > # Simulator database settings > > > db.simulator.username=cloud > > > db.simulator.password=cloud ( I'm not aware about what is simulator for > > > ) here the pass is "cloud" > > > db.simulator.host=localhost > > > db.simulator.driver=jdbc:mysql > > > db.simulator.port=3306 > > > db.simulator.name=simulator > > > db.simulator.maxActive=250 > > > db.simulator.maxIdle=30 > > > db.simulator.maxWait=10000 > > > db.simulator.autoReconnect=true > > > > > > > > > Regards, > > > Cristian > > > > > > > > > > > > -----Original Message----- > > > From: Suresh Kumar Anaparti <sureshkumar.anapa...@gmail.com> > > > Sent: Thursday, August 11, 2022 1:41 PM > > > To: users@cloudstack.apache.org > > > Subject: Re: cloud usage Unable to load db configuration > > > > > > Hi Cristian, > > > > > > It seems to be issue with parameter parsing in the db.properties file, > > > not the password. Please check the value of the parameter > > > "db.cloud.maxActive" in db.properties file, it should be a valid integer. > > > > > > Also, make sure the below parameters in db.properties file have valid > > > integer values. > > > > > > db.cloud.port > > > db.cloud.maxActive > > > db.cloud.maxIdle > > > db.cloud.maxWait > > > > > > db.usage.port > > > db.usage.maxActive > > > db.usage.maxIdle > > > db.usage.maxWait > > > > > > db.simulator.port > > > db.simulator.maxActive > > > db.simulator.maxIdle > > > db.simulator.maxWait > > > > > > Regards, > > > Suresh > > > > > > On Thu, Aug 11, 2022 at 3:27 PM <cristian.c@istream.today> wrote: > > > > > > > > Hello, > > > > > > > > > > > > > > > > Any idea why I see the bellow error? I have the right > > > > password in /management/db.properties and in > > > > /usage/db.properties > > > > (encrypted) > > > > > > > > > > > > > > > > > > > > > > > > 2022-08-11 09:52:40,160 INFO [utils.component.ComponentContext] > > > > (main:null) > > > > (logid:) Configuring > > > > com.cloud.usage.dao.UsageDaoImpl_EnhancerByCloudStack_ed194661 > > > > > > > > 2022-08-11 09:52:40,160 INFO [utils.component.ComponentContext] > > > > (main:null) > > > > (logid:) Configuring > > > > com.cloud.usage.UsageManagerImpl_EnhancerByCloudStack_c8031ed8 > > > > > > > > 2022-08-11 09:52:40,160 DEBUG [cloud.usage.UsageManagerImpl] > > > > (main:null) > > > > (logid:) Checking to see if usage.vmops.pid exists. > > > > > > > > 2022-08-11 09:52:40,160 INFO [cloud.usage.UsageManagerImpl] > > > > (main:null) > > > > (logid:) Implementation Version is 4.16.1.0 > > > > > > > > 2022-08-11 09:52:51,433 DEBUG > > > > [utils.crypt.EncryptionSecretKeyChecker] > > > > (main:null) (logid:) Encryption Type: null > > > > > > > > 2022-08-11 09:52:51,435 INFO [db.Transaction.Transaction] > > > > (main:null) > > > > (logid:) Is Data Base High Availiability enabled? Ans : false > > > > > > > > 2022-08-11 09:52:51,449 WARN [db.Transaction.Transaction] > > > > (main:null) > > > > (logid:) Unable to load db configuration, using defaults with 5 > > > > connections. > > > > Falling back on assumed datasource on localhost:3306 using > > > > username:password=cloud:cloud. Please check your configuration > > > > > > > > java.lang.NumberFormatException: null > > > > > > > > at > > > > java.base/java.lang.Integer.parseInt(Integer.java:614) > > > > > > > > at > > > > java.base/java.lang.Integer.parseInt(Integer.java:770) > > > > > > > > at > > > > com.cloud.utils.db.TransactionLegacy.initDataSource(TransactionLegacy. > > > > java:1 > > > > 030) > > > > > > > > at > > > > com.cloud.utils.db.TransactionLegacy.<clinit>(TransactionLegacy. > > > > ja > > > > va > > > > :1 > > > > 008) > > > > > > > > at > > > > com.cloud.utils.db.TransactionContextBuilder.interceptStart(Tran > > > > sa > > > > ct > > > > io > > > > nConte > > > > xtBuilder.java:49) > > > > > > > > at > > > > com.cloud.utils.component.ComponentInstantiationPostProcessor$In > > > > te > > > > rc > > > > ep > > > > torDis > > > > patcher.intercept(ComponentInstantiationPostProcessor.java:116) > > > > > > > > at > > > > com.cloud.usage.dao.UsageVMSnapshotOnPrimaryDaoImpl_EnhancerByCl > > > > ou > > > > dS > > > > ta > > > > ck_ff5 > > > > 9469d.createPartialSelectSql(<generated>) > > > > > > > > at > > > > com.cloud.utils.db.GenericDaoBase.<init>(GenericDaoBase.java:239 > > > > ) > > > > > > > > at > > > > com.cloud.usage.dao.UsageVMSnapshotOnPrimaryDaoImpl.<init>(Usage > > > > VM > > > > Sn > > > > ap > > > > shotOn > > > > PrimaryDaoImpl.java:38) > > > > > > > > at > > > > com.cloud.usage.dao.UsageVMSnapshotOnPrimaryDaoImpl_EnhancerByCl > > > > ou > > > > dS > > > > ta > > > > ck_ff5 > > > > 9469d.<init>(<generated>) > > > > > > > > at > > > > java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.new > > > > In > > > > st > > > > an > > > > ce0(Na > > > > tive Method) > > > > > > > > at > > > > java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.new > > > > In > > > > st > > > > an > > > > ce(Nat > > > > iveConstructorAccessorImpl.java:62) > > > > > > > > at > > > > java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl > > > > .n > > > > ew > > > > In > > > > stance > > > > (DelegatingConstructorAccessorImpl.java:45) > > > > > > > > at > > > > java.base/java.lang.reflect.Constructor.newInstance(Constructor. > > > > ja > > > > va > > > > :4 > > > > 90) > > > > > > > > at > > > > net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:291 > > > > ) > > > > > > > > at > > > > net.sf.cglib.proxy.Enhancer$EnhancerFactoryData.newInstance(Enha > > > > nc > > > > er > > > > .j > > > > ava:44 > > > > 8) > > > > > > > > at > > > > net.sf.cglib.proxy.Enhancer.nextInstance(Enhancer.java:700) > > > > > > > > at > > > > net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java: > > > > 298) > > > > > > > > at > > > > net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:480) > > > > > > > > at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:305) > > > > > > > > at > > > > com.cloud.utils.component.ComponentInstantiationPostProcessor.po > > > > st > > > > Pr > > > > oc > > > > essBef > > > > oreInstantiation(ComponentInstantiationPostProcessor.java:92) > > > > > > > > at > > > > org.springframework.beans.factory.support.AbstractAutowireCapabl > > > > eB > > > > ea > > > > nF > > > > actory > > > > .applyBeanPostProcessorsBeforeInstantiation(AbstractAutowireCapa > > > > bl > > > > eB > > > > ea > > > > nFacto > > > > ry.java:1144) > > > > > > > > at > > > > org.springframework.beans.factory.support.AbstractAutowireCapabl > > > > eB > > > > ea > > > > nF > > > > actory > > > > .resolveBeforeInstantiation(AbstractAutowireCapableBeanFactory.java: > > > > 11 > > > > 19) > > > > > > > > at > > > > org.springframework.beans.factory.support.AbstractAutowireCapabl > > > > eB > > > > ea > > > > nF > > > > actory > > > > .createBean(AbstractAutowireCapableBeanFactory.java:520) > > > > > > > > at > > > > org.springframework.beans.factory.support.AbstractBeanFactory.la > > > > mb > > > > da > > > > $d > > > > oGetBe > > > > an$0(AbstractBeanFactory.java:335) > > > > > > > > at > > > > org.springframework.beans.factory.support.DefaultSingletonBeanRe > > > > gi > > > > st > > > > ry > > > > .getSi > > > > ngleton(DefaultSingletonBeanRegistry.java:234) > > > > > > > > at > > > > org.springframework.beans.factory.support.AbstractBeanFactory.do > > > > Ge > > > > tB > > > > ea > > > > n(Abst > > > > ractBeanFactory.java:333) > > > > > > > > at > > > > org.springframework.beans.factory.support.AbstractBeanFactory.ge > > > > tB > > > > ea > > > > n( > > > > Abstra > > > > ctBeanFactory.java:208) > > > > > > > > at > > > > org.springframework.beans.factory.support.DefaultListableBeanFac > > > > to > > > > ry > > > > .p > > > > reInst > > > > antiateSingletons(DefaultListableBeanFactory.java:944) > > > > > > > > at > > > > org.springframework.context.support.AbstractApplicationContext.f > > > > in > > > > is > > > > hB > > > > eanFac > > > > toryInitialization(AbstractApplicationContext.java:923) > > > > > > > > at > > > > org.springframework.context.support.AbstractApplicationContext.r > > > > ef > > > > re > > > > sh > > > > (Abstr > > > > actApplicationContext.java:588) > > > > > > > > at > > > > org.springframework.context.support.ClassPathXmlApplicationConte > > > > xt > > > > .< > > > > in > > > > it>(Cl > > > > assPathXmlApplicationContext.java:144) > > > > > > > > at > > > > org.springframework.context.support.ClassPathXmlApplicationConte > > > > xt > > > > .< > > > > in > > > > it>(Cl > > > > assPathXmlApplicationContext.java:85) > > > > > > > > at > > > > com.cloud.usage.UsageServer.start(UsageServer.java:52) > > > > > > > > at com.cloud.usage.UsageServer.main(UsageServer.java:41) > > > > > > > > > > > > > > > > Thank you, > > > > > > > > Cristian > > > > > > > > > >