cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "sadhu suresh (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-2452) Usage:F5:SRX:usage manager failed with db exception due to undefiled field "account.default" (cloud_usage.account.default field is missing)
Date Mon, 13 May 2013 07:19:17 GMT

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-2452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13655817#comment-13655817
] 

sadhu suresh commented on CLOUDSTACK-2452:
------------------------------------------

work around:

use below query to update the missing field in cloud_usage.account tables:
mysql>use cloud_usage;
 mysql>alter table account add column `default` int(1) unsigned NOT NULL DEFAULT '0';

                
> Usage:F5:SRX:usage manager failed with db exception due to undefiled field "account.default"
(cloud_usage.account.default field is missing)
> -------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-2452
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-2452
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Usage
>    Affects Versions: 4.2.0
>            Reporter: sadhu suresh
>            Priority: Blocker
>
> Noticed usage manager failed with runtime exception: a undefined filed  "account.default"
 exits in the request sql query by the usage manager , due to this usage statistics job fail
 with 
> i.e  account.default field is missing in the cloud_usage.account table.
> 1.install the usage server
> 2.configure the usage serve to query the usage statistics for every 10 min
> 3.configure the lb and generate the load form VM 
> 4.observe the usage statistics.
> actual results:
> usage job failed with runtime exception
> 013-05-13 10:45:09,191 ERROR [cloud.usage.UsageManagerImpl] (Usage-Job-1:null) Exception
in usage manager
> com.cloud.utils.exception.CloudRuntimeException: DB Exception on: com.mysql.jdbc.JDBC4PreparedStatement@5508e44d:
SELECT account.id, account.account_name, account.type, account.domain_id, account.state, account.removed,
account.cleanup_needed, account.network_domain, account.uuid, account.default_zone_id, account.default
FROM account WHERE account.id = 2
>         at com.cloud.utils.db.GenericDaoBase.findById(GenericDaoBase.java:979)
>         at com.cloud.user.dao.AccountDaoImpl_EnhancerByCloudStack_c97e9195.CGLIB$findById$35(<generated>)
>         at com.cloud.user.dao.AccountDaoImpl_EnhancerByCloudStack_c97e9195_FastClassByCloudStack_e3754c48.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.user.dao.AccountDaoImpl_EnhancerByCloudStack_c97e9195.findById(<generated>)
>         at com.cloud.utils.db.GenericDaoBase.findByIdIncludingRemoved(GenericDaoBase.java:939)
>         at com.cloud.user.dao.AccountDaoImpl_EnhancerByCloudStack_c97e9195.CGLIB$findByIdIncludingRemoved$36(<generated>)
>         at com.cloud.user.dao.AccountDaoImpl_EnhancerByCloudStack_c97e9195_FastClassByCloudStack_e3754c48.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.user.dao.AccountDaoImpl_EnhancerByCloudStack_c97e9195.findByIdIncludingRemoved(<generated>)
>         at com.cloud.usage.UsageManagerImpl.createVolumeHelperEvent(UsageManagerImpl.java:1075)
>         at com.cloud.usage.UsageManagerImpl.createHelperRecord(UsageManagerImpl.java:764)
>         at com.cloud.usage.UsageManagerImpl.parse(UsageManagerImpl.java:509)
>         at com.cloud.usage.UsageManagerImpl.run(UsageManagerImpl.java:323)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:679)
> Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column
'account.default' in 'field list'
>         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.Util.getInstance(Util.java:386)
>         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1053)
>         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4074)
> "usage.log" 432L, 51892C
> use cloud_usage
> mysql> SELECT account.id, account.account_name, account.type, account.domain_id, account.state,
account.removed, account.cleanup_needed, account.network_domain, account.uuid, account.default_zone_id,
account.default FROM account WHERE account.id = 2;
> ERROR 1054 (42S22): Unknown column 'account.default' in 'field list'
> [root@centos63 ~]# mysql cloud_usage;
> Reading table information for completion of table and column names
> You can turn off this feature to get a quicker startup with -A
> Welcome to the MySQL monitor.  Commands end with ; or \g.
> Your MySQL connection id is 1137
> Server version: 5.1.69 Source distribution
> Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
> Oracle is a registered trademark of Oracle Corporation and/or its
> affiliates. Other names may be trademarks of their respective
> owners.
> Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
> mysql> desc account;
> +-----------------+---------------------+------+-----+---------+-------+
> | Field           | Type                | Null | Key | Default | Extra |
> +-----------------+---------------------+------+-----+---------+-------+
> | id              | bigint(20) unsigned | NO   | PRI | NULL    |       |
> | account_name    | varchar(100)        | YES  |     | NULL    |       |
> | uuid            | varchar(40)         | YES  | UNI | NULL    |       |
> | type            | int(1) unsigned     | NO   |     | NULL    |       |
> | domain_id       | bigint(20) unsigned | YES  |     | NULL    |       |
> | state           | varchar(10)         | NO   |     | enabled |       |
> | removed         | datetime            | YES  | MUL | NULL    |       |
> | cleanup_needed  | tinyint(1)          | NO   |     | 0       |       |
> | network_domain  | varchar(100)        | YES  |     | NULL    |       |
> | default_zone_id | bigint(20) unsigned | YES  |     | NULL    |       |
> +-----------------+---------------------+------+-----+---------+-------+
> 10 rows in set (0.00 sec)
> mysql> use cloud;
> Reading table information for completion of table and column names
> You can turn off this feature to get a quicker startup with -A
> Database changed
> mysql> desc account;
> +-----------------+---------------------+------+-----+---------+----------------+
> | Field           | Type                | Null | Key | Default | Extra          |
> +-----------------+---------------------+------+-----+---------+----------------+
> | id              | bigint(20) unsigned | NO   | PRI | NULL    | auto_increment |
> | account_name    | varchar(100)        | YES  | MUL | NULL    |                |
> | uuid            | varchar(40)         | YES  | UNI | NULL    |                |
> | type            | int(1) unsigned     | NO   |     | NULL    |                |
> | domain_id       | bigint(20) unsigned | YES  | MUL | NULL    |                |
> | state           | varchar(10)         | NO   |     | enabled |                |
> | removed         | datetime            | YES  | MUL | NULL    |                |
> | cleanup_needed  | tinyint(1)          | NO   | MUL | 0       |                |
> | network_domain  | varchar(255)        | YES  |     | NULL    |                |
> | default_zone_id | bigint(20) unsigned | YES  | MUL | NULL    |                |
> | default         | int(1) unsigned     | NO   |     | 0       |                |
> +-----------------+---------------------+------+-----+---------+----------------+
> 11 rows in set (0.01 sec)

--
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