cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "shweta agarwal (JIRA)" <j...@apache.org>
Subject [jira] [Reopened] (CLOUDSTACK-4533) permission issue in usage server and it failed to start after upgrade from 3.0.4 to 4.2
Date Thu, 29 Aug 2013 12:44:51 GMT

     [ https://issues.apache.org/jira/browse/CLOUDSTACK-4533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

shweta agarwal reopened CLOUDSTACK-4533:
----------------------------------------


Recreated the enviornment .Still see this issue.

Even if usage server is running if you see closely cloudstack-usage.err file its clearly showing
permission denied
and usage log also shows exception in accessing db



cloudstack-usage.err shows :
com.cloud.utils.exception.CloudRuntimeException: DB Exception on: null
        at com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:414)
        at com.cloud.configuration.dao.ConfigurationDaoImpl_EnhancerByCloudStack_303d763f.CGLIB$searchIncludingRemoved$47(<generated>)
        at com.cloud.configuration.dao.ConfigurationDaoImpl_EnhancerByCloudStack_303d763f_FastClassByCloudStack_a4702748.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
        at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
        at com.cloud.configuration.dao.ConfigurationDaoImpl_EnhancerByCloudStack_303d763f.searchIncludingRemoved(<generated>)
        at com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:349)
        at com.cloud.configuration.dao.ConfigurationDaoImpl_EnhancerByCloudStack_303d763f.CGLIB$searchIncludingRemoved$46(<generated>)
        at com.cloud.configuration.dao.ConfigurationDaoImpl_EnhancerByCloudStack_303d763f_FastClassByCloudStack_a4702748.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
        at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
        at com.cloud.configuration.dao.ConfigurationDaoImpl_EnhancerByCloudStack_303d763f.searchIncludingRemoved(<generated>)
        at com.cloud.utils.db.GenericDaoBase.listIncludingRemovedBy(GenericDaoBase.java:901)
        at com.cloud.configuration.dao.ConfigurationDaoImpl_EnhancerByCloudStack_303d763f.CGLIB$listIncludingRemovedBy$76(<generated>)
        at com.cloud.configuration.dao.ConfigurationDaoImpl_EnhancerByCloudStack_303d763f_FastClassByCloudStack_a4702748.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
        at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
        at com.cloud.configuration.dao.ConfigurationDaoImpl_EnhancerByCloudStack_303d763f.listIncludingRemovedBy(<generated>)
        at com.cloud.utils.db.GenericDaoBase.listIncludingRemovedBy(GenericDaoBase.java:913)
        at com.cloud.configuration.dao.ConfigurationDaoImpl_EnhancerByCloudStack_303d763f.CGLIB$listIncludingRemovedBy$77(<generated>)
        at com.cloud.configuration.dao.ConfigurationDaoImpl_EnhancerByCloudStack_303d763f_FastClassByCloudStack_a4702748.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
        at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
        at com.cloud.configuration.dao.ConfigurationDaoImpl_EnhancerByCloudStack_303d763f.listIncludingRemovedBy(<generated>)
        at com.cloud.configuration.dao.ConfigurationDaoImpl.getConfiguration(ConfigurationDaoImpl.java:81)
        at com.cloud.configuration.dao.ConfigurationDaoImpl_EnhancerByCloudStack_303d763f.CGLIB$getConfiguration$6(<generated>)
        at com.cloud.configuration.dao.ConfigurationDaoImpl_EnhancerByCloudStack_303d763f_FastClassByCloudStack_a4702748.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
        at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
        at com.cloud.configuration.dao.ConfigurationDaoImpl_EnhancerByCloudStack_303d763f.getConfiguration(<generated>)
        at com.cloud.configuration.dao.ConfigurationDaoImpl.getConfiguration(ConfigurationDaoImpl.java:109)
        at com.cloud.configuration.dao.ConfigurationDaoImpl_EnhancerByCloudStack_303d763f.CGLIB$getConfiguration$7(<generated>)
        at com.cloud.configuration.dao.ConfigurationDaoImpl_EnhancerByCloudStack_303d763f_FastClassByCloudStack_a4702748.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
        at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
        at com.cloud.configuration.dao.ConfigurationDaoImpl_EnhancerByCloudStack_303d763f.getConfiguration(<generated>)
        at com.cloud.usage.UsageManagerImpl.configure(UsageManagerImpl.java:168)
        at com.cloud.utils.component.ComponentContext.initComponentsLifeCycle(ComponentContext.java:111)
        at com.cloud.usage.UsageServer.start(UsageServer.java:60)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:616)
        at org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:243)
Caused by: java.sql.SQLException: Access denied for user 'cloud'@'localhost' (using password:
YES)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4074)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4006)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:919)
        at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:4578)
        at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1296)
        at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2397)
        at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2430)
        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2215)
        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:813)
        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399)
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:334)
        at java.sql.DriverManager.getConnection(DriverManager.java:620)
        at java.sql.DriverManager.getConnection(DriverManager.java:200)
        at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:75)
        at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
        at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1188)
        at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
        at com.cloud.utils.db.Transaction.getConnection(Transaction.java:558)
        at com.cloud.utils.db.Transaction.prepareStatement(Transaction.java:469)
        at com.cloud.utils.db.Transaction.prepareAutoCloseStatement(Transaction.java:462)
        at com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:387)



Usage.log shows :
2013-08-29 18:00:32,354 INFO  [context.support.ClassPathXmlApplicationContext] (main:null)
Bean 'transactionContextBuilder' of type [class com.cloud.utils.db.TransactionContextBuilder]
is not eligible for getting processed by all BeanPostProcessors (for example: not eligible
for auto-proxying)
2013-08-29 18:00:32,401 INFO  [factory.support.DefaultListableBeanFactory] (main:null) Pre-instantiating
singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@65493102:
defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,networkUsageParser,VMInstanceUsageParser,storageUsageParser,securityGroupUsageParser,VPNUserUsageParser,networkOfferingUsageParser,IPAddressUsageParser,vmDiskUsageParser,loadBalancerUsageParser,volumeUsageParser,VMSnapshotUsageParser,portForwardingUsageParser,usageAlertManagerImpl,usageManagerImpl,usageVMInstanceDaoImpl,usageVPNUserDaoImpl,usageDaoImpl,usageNetworkOfferingDaoImpl,usageStorageDaoImpl,usageLoadBalancerPolicyDaoImpl,externalPublicIpStatisticsDaoImpl,usageVolumeDaoImpl,usageNetworkDaoImpl,usageSecurityGroupDaoImpl,usageJobDaoImpl,usageVmDiskDaoImpl,usageVMSnapshotDaoImpl,usagePortForwardingRuleDaoImpl,usageIPAddressDaoImpl,usageEventDaoImpl,eventDaoImpl,eventJoinDaoImpl,userStatsLogDaoImpl,SSHKeyPairDaoImpl,vmDiskStatisticsDaoImpl,userDaoImpl,userAccountDaoImpl,accountDaoImpl,userStatisticsDaoImpl,resourceLimitDaoImpl,resourceCountDaoImpl,configurationDaoImpl,alertDaoImpl,domainDaoImpl,transactionContextBuilder,instantiatePostProcessor,ComponentContext,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0];
root of factory hierarchy
2013-08-29 18:00:33,450 DEBUG [utils.crypt.EncryptionSecretKeyChecker] (main:null) Encryption
Type: null
2013-08-29 18:00:33,532 WARN  [db.Transaction.Transaction] (main:null) 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.lang.Integer.parseInt(Integer.java:443)
        at java.lang.Integer.parseInt(Integer.java:514)
        at com.cloud.utils.db.Transaction.initDataSource(Transaction.java:1042)
        at com.cloud.utils.db.Transaction.<clinit>(Transaction.java:1018)
        at com.cloud.utils.db.TransactionContextBuilder.interceptStart(TransactionContextBuilder.java:49)
        at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:119)
        at com.cloud.usage.dao.UsageDaoImpl_EnhancerByCloudStack_f8d2d29d.createPartialSelectSql(<generated>)
        at com.cloud.utils.db.GenericDaoBase.<init>(GenericDaoBase.java:224)
        at com.cloud.usage.dao.UsageDaoImpl.<init>(UsageDaoImpl.java:73)
        at com.cloud.usage.dao.UsageDaoImpl_EnhancerByCloudStack_f8d2d29d.<init>(<generated>)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
        at net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:228)
        at net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:220)
        at net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:216)
        at net.sf.cglib.proxy.Enhancer.createUsingReflection(Enhancer.java:643)
        at net.sf.cglib.proxy.Enhancer.firstInstance(Enhancer.java:538)
        at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:225)
        at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
        at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:285)
        at com.cloud.utils.component.ComponentInstantiationPostProcessor.postProcessBeforeInstantiation(ComponentInstantiationPostProcessor.java:92)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:880)



Attaching logs for details


                
> permission issue in usage server and it failed to start after upgrade from 3.0.4 to 4.2
> ---------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-4533
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4533
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Packaging, Upgrade, Usage
>    Affects Versions: 4.2.1
>         Environment: 
>            Reporter: shweta agarwal
>            Priority: Blocker
>             Fix For: 4.2.1
>
>         Attachments: cloudstack-usage.err, cloudstack-usage.out
>
>
> did an upgrade from 3.0.4 to 4.2  and then start usage server. 
> Usage server failed to start
> giving following exception :
> log4j:ERROR setFile(null,true) call failed.
> java.io.FileNotFoundException: /var/log/cloudstack/usage/usage.log (Permission denied)
>         at java.io.FileOutputStream.openAppend(Native Method)
>         at java.io.FileOutputStream.<init>(FileOutputStream.java:207)
>         at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
>         at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
>         at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
>         at org.apache.log4j.rolling.RollingFileAppender.activateOptions(RollingFileAppender.java:179)
>         at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
>         at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:295)
>         at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:176)
>         at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:191)
>         at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:523)
>         at org.apache.log4j.xml.DOMConfigurator.parseRoot(DOMConfigurator.java:492)
>         at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:1001)
>         at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:867)
>         at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:773)
>         at org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:901)
>         at org.springframework.util.Log4jConfigurer.initLogging(Log4jConfigurer.java:69)
>         at com.cloud.usage.UsageServer.initLog4j(UsageServer.java:89)
>         at com.cloud.usage.UsageServer.init(UsageServer.java:52)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:616)
>         at org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:207)
> log4j:ERROR setFile(null,true) call failed.
> java.io.FileNotFoundException: /var/log/cloudstack/usage/usage.log (Permission denied)
>         at java.io.FileOutputStream.openAppend(Native Method)
>         at java.io.FileOutputStream.<init>(FileOutputStream.java:207)
>         at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
>         at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
>         at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
>         at org.apache.log4j.rolling.RollingFileAppender.activateOptions(RollingFileAppender.java:179)
>         at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
>         at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:295)
>         at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:176)
>         at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:191)
>         at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:523)
>         at org.apache.log4j.xml.DOMConfigurator.parseRoot(DOMConfigurator.java:492)
>         at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:1001)
>         at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:867)
>         at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:755)
> Attaching full logs.
>                                                                                     
                       

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message