You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2013/05/16 09:15:17 UTC

[jira] [Commented] (CLOUDSTACK-2456) usage:usage parser throws runtime exception while parsing networkoffering usage

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

ASF subversion and git services commented on CLOUDSTACK-2456:
-------------------------------------------------------------

Commit e7fef86c8086a3bad3a5f3aacaa39dd5ddef3ab4 in branch refs/heads/master from [~mice]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=e7fef86 ]

CLOUDSTACK-2456 usage:usage parser throws runtime exception while parsing networkoffering usage

                
> usage:usage parser throws runtime exception while parsing  networkoffering usage 
> ---------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-2456
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-2456
>             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: Critical
>
> Noticed runtime exception in the  usage log due to usage parser failed  while parsing network-offering usage due to  invalid date format
> steps:
> 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.check the usage events
> actual results:
> Noticed runtime exception in the  usage log due to usage parser failed  while parsing networkoffering usage due to Unparseable date
>  content of usage log:
> *******************
> 2013-05-13 14:05:04,367 DEBUG [usage.parser.PortForwardingUsageParser] (Usage-Job-1:null) Parsing all PortForwardingRule usage events for account: 23
> 2013-05-13 14:05:04,368 DEBUG [usage.parser.PortForwardingUsageParser] (Usage-Job-1:null) No port forwarding usage events for this period
> 2013-05-13 14:05:04,368 DEBUG [usage.parser.NetworkOfferingUsageParser] (Usage-Job-1:null) Parsing all NetworkOffering usage events for account: 23
> 2013-05-13 14:05:04,370 WARN  [usage.dao.UsageNetworkOfferingDaoImpl] (Usage-Job-1:null) Error getting usage records
> com.cloud.utils.exception.CloudRuntimeException: why why
>         at com.cloud.utils.DateUtil.parseDateString(DateUtil.java:55)
>         at com.cloud.utils.DateUtil.parseDateString(DateUtil.java:45)
>         at com.cloud.usage.dao.UsageNetworkOfferingDaoImpl.getUsageRecords(UsageNetworkOfferingDaoImpl.java:136)
>         at com.cloud.usage.dao.UsageNetworkOfferingDaoImpl_EnhancerByCloudStack_4853ba17.CGLIB$getUsageRecords$1(<generated>)
>         at com.cloud.usage.dao.UsageNetworkOfferingDaoImpl_EnhancerByCloudStack_4853ba17_FastClassByCloudStack_c905aa49.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.usage.dao.UsageNetworkOfferingDaoImpl_EnhancerByCloudStack_4853ba17.getUsageRecords(<generated>)
>         at com.cloud.usage.parser.NetworkOfferingUsageParser.parse(NetworkOfferingUsageParser.java:69)
>         at com.cloud.usage.UsageManagerImpl.parseHelperTables(UsageManagerImpl.java:735)
>         at com.cloud.usage.UsageManagerImpl.parse(UsageManagerImpl.java:593)
>         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: java.text.ParseException: Unparseable date: "1"
>         at java.text.DateFormat.parse(DateFormat.java:354)
>         at com.cloud.utils.DateUtil.parseDateString(DateUtil.java:53)
>         ... 19 more
> 2013-05-13 14:05:04,370 DEBUG [usage.parser.NetworkOfferingUsageParser] (Usage-Job-1:null) No NetworkOffering usage events for this period
> additional info:
> It looks like in the code ,wrongly assigning the retturned resultset field value(default) to date field.

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