dredknight opened a new issue #5587:
URL: https://github.com/apache/cloudstack/issues/5587


   <!--
   Verify first that your issue/request is not already reported on GitHub.
   Also test if the latest release and main branch are affected too.
   Always add information AFTER of these HTML comments, but no need to delete 
the comments.
   -->
   
   ##### ISSUE TYPE
   <!-- Pick one below and delete the rest -->
    * Bug Report
   
   ##### COMPONENT NAME
   <!--
   Categorize the issue, e.g. API, VR, VPN, UI, etc.
   -->
   ~~~
   Usage server
   ~~~
   
   ##### CLOUDSTACK VERSION
   <!--
   New line separated list of affected versions, commit ID for issues on main 
branch.
   -->
   4.15.0
   4.15.2
   ~~~
   
   ~~~
   
   ##### CONFIGURATION
   <!--
   Information about the configuration if relevant, e.g. basic network, 
advanced networking, etc.  N/A otherwise
   -->
   N/A
   
   ##### OS / ENVIRONMENT
   <!--
   Information about the environment if relevant, N/A otherwise
   -->
   N/A
   
   ##### SUMMARY
   <!-- Explain the problem/feature briefly -->
   Usage server is active since 04.2021 but from the database it can be seen in 
cloud_usage table that there is data only for the period between 2021-04-22 
23:59:59 and 2021-05-19 23:59:59  and nothing since.
   
   /var/log/cloudstack/usage.log constantly reports this error and warning 
messages
   
   `2021-10-19 13:33:40,184 INFO  [cloud.usage.UsageManagerImpl] 
(Usage-Job-1:null) (logid:) starting usage job...
   2021-10-19 13:33:40,315 INFO  [cloud.usage.UsageManagerImpl] 
(Usage-Job-1:null) (logid:) Parsing usage records between Thu May 20 02:00:00 
CEST 2021 and Tue Oct 19 01:59:59 CEST 2021
   2021-10-19 13:37:57,870 DEBUG [cloud.usage.UsageManagerImpl] 
(Usage-Job-1:null) (logid:) assigning ip address: 10.10.179.184 to account: 29
   2021-10-19 13:37:57,876 ERROR [cloud.usage.UsageManagerImpl] 
(Usage-Job-1:null) (logid:) Exception in usage manager
   java.lang.NullPointerException
           at 
com.cloud.usage.UsageManagerImpl.createIPHelperEvent(UsageManagerImpl.java:1423)
           at 
com.cloud.usage.UsageManagerImpl.createHelperRecord(UsageManagerImpl.java:987)
           at com.cloud.usage.UsageManagerImpl.parse(UsageManagerImpl.java:649)
           at 
com.cloud.usage.UsageManagerImpl.runInContextInternal(UsageManagerImpl.java:405)
           at 
com.cloud.usage.UsageManagerImpl$1.runInContext(UsageManagerImpl.java:347)
           at 
org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:48)
           at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:55)
           at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:102)
           at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:52)
           at 
org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:45)
           at com.cloud.usage.UsageManagerImpl.run(UsageManagerImpl.java:349)
           at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
           at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
           at 
java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
           at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
           at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
           at java.base/java.lang.Thread.run(Thread.java:834)
   2021-10-19 13:37:57,878 DEBUG [db.Transaction.Transaction] 
(Usage-Job-1:null) (logid:) Rolling back the transaction: Time = 11 Name =  
-UsageManagerImpl.parse:631-UsageManagerImpl.runInContextInternal:405-UsageManagerImpl$1.runInContext:347-ManagedContextRunnable$1.run:48-DefaultManagedContext$1.call:55-DefaultManagedContext.callWithContext:102-DefaultManagedContext.runWithContext:52-ManagedContextRunnable.run:45-UsageManagerImpl.run:349-Executors$RunnableAdapter.call:515-FutureTask.run:264-ScheduledThreadPoolExecutor$ScheduledFutureTask.run:304;
 called by 
-TransactionLegacy.rollback:888-UsageManagerImpl.parse:849-UsageManagerImpl.runInContextInternal:405-UsageManagerImpl$1.runInContext:347-ManagedContextRunnable$1.run:48-DefaultManagedContext$1.call:55-DefaultManagedContext.callWithContext:102-DefaultManagedContext.runWithContext:52-ManagedContextRunnable.run:45-UsageManagerImpl.run:349-Executors$RunnableAdapter.call:515-FutureTask.run:264
   2021-10-19 13:37:57,950 WARN  [db.Transaction.Transaction] 
(Usage-Job-1:null) (logid:) txn: Commit called when it is not a transaction: 
-UsageManagerImpl.parse:858-UsageManagerImpl.runInContextInternal:405-UsageManagerImpl$1.runInContext:347-ManagedContextRunnable$1.run:48-DefaultManagedContext$1.call:55-DefaultManagedContext.callWithContext:102-DefaultManagedContext.runWithContext:52-ManagedContextRunnable.run:45-UsageManagerImpl.run:349-Executors$RunnableAdapter.call:515-FutureTask.run:264-ScheduledThreadPoolExecutor$ScheduledFutureTask.run:304
   2021-10-19 13:37:57,950 WARN  [apache.cloudstack.alerts] (Usage-Job-1:null) 
(logid:)  alertType:: 20 // dataCenterId:: 0 // podId:: 0 // clusterId:: null 
// message:: Usage job failed. Job id: 250841
   2021-10-19 13:37:57,970 DEBUG [cloud.usage.UsageAlertManagerImpl] 
(Usage-Job-1:null) (logid:) Have already sent: 1 emails for alert type '20' -- 
skipping send email
   2021-10-19 13:37:57,970 INFO  [cloud.usage.UsageManagerImpl] 
(Usage-Job-1:null) (logid:) usage job complete
   `
   
   Full log is attached here: 
[usage.log](https://github.com/apache/cloudstack/files/7373049/usage.log)
   
   ##### STEPS TO REPRODUCE
   <!--
   For bugs, show exactly how to reproduce the problem, using a minimal 
test-case. Use Screenshots if accurate.
   
   For new features, show how the feature would be used.
   -->
   
   <!-- Paste example playbooks or commands between quotes below -->
   ~~~
   I don't know. Nothing was done out of the ordinary. Usage server was 
installed and enabled.
   ~~~
   
   <!-- You can also paste gist.github.com links for larger files -->
   
   ##### EXPECTED RESULTS
   <!-- What did you expect to happen when running the steps above? -->
   
   ~~~
   Usage server to collect all data.
   ~~~
   
   ##### ACTUAL RESULTS
   <!-- What actually happened? -->
   
   <!-- Paste verbatim command output between quotes below -->
   ~~~
   Usage does not collect all data.
   ~~~
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to