apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
2.05k stars 1.1k forks source link

Usage Server running issue #4067

Closed rohityadavcloud closed 3 years ago

rohityadavcloud commented 4 years ago

On running 4.14 RC2 (on raspberrypi4) I see these errors:

2020-05-09 14:41:51,517 INFO  [utils.component.ComponentContext] (main:null) (logid:) Configuring com.cloud.usage.UsageManagerImpl_EnhancerByCloudStack_a3757201
2020-05-09 14:41:51,518 DEBUG [cloud.usage.UsageManagerImpl] (main:null) (logid:) Checking to see if usage.vmops.pid exists.
2020-05-09 14:41:51,519 INFO  [cloud.usage.UsageManagerImpl] (main:null) (logid:) Implementation Version is 4.14.0.0
2020-05-09 14:42:09,010 INFO  [context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] (main:null) (logid:) Bean 'transactionContextBuilder' of type [com.cloud.utils.db.TransactionContextBuilder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-05-09 14:42:10,610 DEBUG [utils.crypt.EncryptionSecretKeyChecker] (main:null) (logid:) Encryption Type: file
2020-05-09 14:42:10,626 WARN  [context.support.ClassPathXmlApplicationContext] (main:null) (logid:) Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'IPAddressUsageParser': Unsatisfied dependency expressed through field '_usageDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'usageDaoImpl' defined in URL [jar:file:/usr/share/cloudstack-usage/lib/cloud-engine-schema-4.14.0.0.jar!/com/cloud/usage/dao/UsageDaoImpl.class]: BeanPostProcessor before instantiation of bean failed; nested exception is net.sf.cglib.core.CodeGenerationException: java.lang.ExceptionInInitializerError-->null
2020-05-09 14:42:25,390 INFO  [context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] (main:null) (logid:) Bean 'transactionContextBuilder' of type [com.cloud.utils.db.TransactionContextBuilder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

Rest of the CloudStack works OK, I tested VM deployment on my env (Ubuntu 20.04 + MySQL8 + Java 11 on RaspberryPi4/arm64).

ISSUE TYPE
COMPONENT NAME
Usage server
CLOUDSTACK VERSION
4.14RC2/master
rohityadavcloud commented 4 years ago

Can you check if usage server works with master/4.14 and Java 11 with say Ubuntu 18.04? cc @weizhouapache @andrijapanicsb @DaanHoogland - it is possible that the issue is specific to raspberrypi4 env (however mgmt server, kvm agent etc works OK).

My env details:

# java -version
openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment (build 11.0.7+10-post-Ubuntu-3ubuntu1)
OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Ubuntu-3ubuntu1, mixed mode)
# mysql --version
mysql  Ver 8.0.20-0ubuntu0.20.04.1 for Linux on aarch64 ((Ubuntu))
# lsb_release  -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04 LTS
Release:    20.04
Codename:   focal
# uname  -a
Linux cloudstack-mgmt 5.4.0-1008-raspi #8-Ubuntu SMP Wed Apr 8 11:13:06 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux
rohityadavcloud commented 4 years ago

@andrijapanicsb @DaanHoogland please triage and lower severity if it's not a blocker against Ubuntu 18.04/19.10 and Java11.

andrijapanicsb commented 4 years ago

@rhtyd I've tested upgrading 4.13.0 to 4.14.0 and seen usage jobs run successfully - but let me verify with clean install as well (CentOS, Java 11.0.7)

GabrielBrascher commented 4 years ago

4.14.0.0 RC2 on Ubuntu 18.04

I just checked the usage.log and I can see that it loaded Bean IPAddressUsageParser successfully.

2020-05-11 10:53:44,992 DEBUG [usage.parser.IPAddressUsageParser] (Usage-Job-1:null) (logid:) Parsing IP Address usage for account: 3
2020-05-11 10:53:44,993 DEBUG [usage.parser.IPAddressUsageParser] (Usage-Job-1:null) (logid:) No IP Address usage for this period
2020-05-11 10:53:45,009 DEBUG [usage.parser.IPAddressUsageParser] (Usage-Job-1:null) (logid:) Parsing IP Address usage for account: 5
2020-05-11 10:53:45,010 DEBUG [usage.parser.IPAddressUsageParser] (Usage-Job-1:null) (logid:) No IP Address usage for this period
2020-05-11 10:53:48,442 DEBUG [usage.parser.IPAddressUsageParser] (Usage-Job-1:null) (logid:) Parsing IP Address usage for account: 6
2020-05-11 10:53:48,444 DEBUG [usage.parser.IPAddressUsageParser] (Usage-Job-1:null) (logid:) Total usage time 86400000ms
2020-05-11 10:53:48,444 DEBUG [usage.parser.IPAddressUsageParser] (Usage-Job-1:null) (logid:) Creating IP usage record with id: 526, usage: 24, startDate: Sun Jul 14 02:00:00 CEST 2019, endDate: Mon Jul 15 01:59:59 CEST 2019, for account

Just for the record, the INFO regarding Bean 'transactionContextBuilder' is also logged, but there is no WARN regarding IPAddressUsageParser at the usage.log:

2020-05-11 10:48:52,572 INFO  [context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker] (main:null) (logid:) Bean 'transactionContextBuilder' of type [com.cloud.utils.db.TransactionContextBuilder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
andrijapanicsb commented 4 years ago

I can confirm exactly the same behaviour (like Gabriel's) on CentOS and I can confirm that the DB records for IP usage are created successfully.

rohityadavcloud commented 4 years ago

Similar issue of cloudstack-usage not working on raspberrypi4 https://github.com/apache/cloudstack/issues/4342 was reported by @dony71

rohityadavcloud commented 3 years ago

Closing this, not applicable for usage servers on x86 - I can live with the limitation that usage server doesn't work on RaspberryPi4.