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.java
> > :1
> > 008)
> >
> >         at
> > com.cloud.utils.db.TransactionContextBuilder.interceptStart(Transact
> > io
> > nConte
> > xtBuilder.java:49)
> >
> >         at
> > com.cloud.utils.component.ComponentInstantiationPostProcessor$Interc
> > ep
> > torDis
> > patcher.intercept(ComponentInstantiationPostProcessor.java:116)
> >
> >         at
> > com.cloud.usage.dao.UsageVMSnapshotOnPrimaryDaoImpl_EnhancerByCloudS
> > ta
> > ck_ff5
> > 9469d.createPartialSelectSql(<generated>)
> >
> >         at
> > com.cloud.utils.db.GenericDaoBase.<init>(GenericDaoBase.java:239)
> >
> >         at
> > com.cloud.usage.dao.UsageVMSnapshotOnPrimaryDaoImpl.<init>(UsageVMSn
> > ap
> > shotOn
> > PrimaryDaoImpl.java:38)
> >
> >         at
> > com.cloud.usage.dao.UsageVMSnapshotOnPrimaryDaoImpl_EnhancerByCloudS
> > ta
> > ck_ff5
> > 9469d.<init>(<generated>)
> >
> >         at
> > java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInst
> > an
> > ce0(Na
> > tive Method)
> >
> >         at
> > java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInst
> > an
> > ce(Nat
> > iveConstructorAccessorImpl.java:62)
> >
> >         at
> > java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.new
> > In
> > stance
> > (DelegatingConstructorAccessorImpl.java:45)
> >
> >         at
> > java.base/java.lang.reflect.Constructor.newInstance(Constructor.java
> > :4
> > 90)
> >
> >         at
> > net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:291)
> >
> >         at
> > net.sf.cglib.proxy.Enhancer$EnhancerFactoryData.newInstance(Enhancer
> > .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.postPr
> > oc
> > essBef
> > oreInstantiation(ComponentInstantiationPostProcessor.java:92)
> >
> >         at
> > org.springframework.beans.factory.support.AbstractAutowireCapableBea
> > nF
> > actory
> > .applyBeanPostProcessorsBeforeInstantiation(AbstractAutowireCapableB
> > ea
> > nFacto
> > ry.java:1144)
> >
> >         at
> > org.springframework.beans.factory.support.AbstractAutowireCapableBea
> > nF
> > actory
> > .resolveBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:
> > 11
> > 19)
> >
> >         at
> > org.springframework.beans.factory.support.AbstractAutowireCapableBea
> > nF
> > actory
> > .createBean(AbstractAutowireCapableBeanFactory.java:520)
> >
> >         at
> > org.springframework.beans.factory.support.AbstractBeanFactory.lambda
> > $d
> > oGetBe
> > an$0(AbstractBeanFactory.java:335)
> >
> >         at
> > org.springframework.beans.factory.support.DefaultSingletonBeanRegist
> > ry
> > .getSi
> > ngleton(DefaultSingletonBeanRegistry.java:234)
> >
> >         at
> > org.springframework.beans.factory.support.AbstractBeanFactory.doGetB
> > ea
> > n(Abst
> > ractBeanFactory.java:333)
> >
> >         at
> > org.springframework.beans.factory.support.AbstractBeanFactory.getBea
> > n(
> > Abstra
> > ctBeanFactory.java:208)
> >
> >         at
> > org.springframework.beans.factory.support.DefaultListableBeanFactory
> > .p
> > reInst
> > antiateSingletons(DefaultListableBeanFactory.java:944)
> >
> >         at
> > org.springframework.context.support.AbstractApplicationContext.finis
> > hB
> > eanFac
> > toryInitialization(AbstractApplicationContext.java:923)
> >
> >         at
> > org.springframework.context.support.AbstractApplicationContext.refre
> > sh
> > (Abstr
> > actApplicationContext.java:588)
> >
> >         at
> > org.springframework.context.support.ClassPathXmlApplicationContext.<
> > in
> > it>(Cl
> > assPathXmlApplicationContext.java:144)
> >
> >         at
> > org.springframework.context.support.ClassPathXmlApplicationContext.<
> > 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
> >
>

Reply via email to