You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Harikrishna Patnala <ha...@citrix.com> on 2013/10/31 07:19:29 UTC

[Solved]Re: Urgent - usage databae always empty

Hi Dean,
Can you summarise the issue occurred and how you solved it. It helps people to quickly look into the similar problem and solution.

Thanks
Harikrishna
On 30-Oct-2013, at 11:22 pm, Dean Kamali <de...@gmail.com> wrote:

> Well, it seems that all what I needed was more patience, even tho the above
> message shows in the logs, I waited for 10 minutes and usage data started
> populating in an interval of 10 mins.
> 
> Thanks everyone for your help!
> 
> 
> On Wed, Oct 30, 2013 at 12:11 PM, Dean Kamali <de...@gmail.com> wrote:
> 
>> I have tried your suggestion, and I see that usage_job gets updated after
>> I delete the entry there, and restart the usage service.
>> I have also truncated all tables, "nice feature in sqlyog" and, I'm still
>> not able to see any data.
>> 
>> I'm still seeing the following in the logs:
>> 
>> 2013-10-30 16:06:58,941 INFO  [cloud.usage.UsageServer] (main:null)
>> UsageServer ready...
>> 2013-10-30 16:08:00,001 INFO  [cloud.usage.UsageManagerImpl]
>> (Usage-Job-1:null) starting usage job...
>> 2013-10-30 16:08:00,007 DEBUG [cloud.usage.UsageManagerImpl]
>> (Usage-Job-1:null) Not owner of usage job, skipping...
>> 2013-10-30 16:08:00,007 INFO  [cloud.usage.UsageManagerImpl]
>> (Usage-Job-1:null) usage job complete
>> 
>> I have re-deployed the management server on Ubuntu / Center with same
>> results.
>> 
>> Dean
>> 
>> 
>> On Wed, Oct 30, 2013 at 10:47 AM, Travis Graham <tg...@tgraham.us>wrote:
>> 
>>> Can you try stopping the cloudstack-usage process, removing any records
>>> you have in the usage_job table, then restarting cloudstack-usage and
>>> change your settings to get it to run again if needed?
>>> 
>>> Just to be safe, do db dumps on both your cloud and cloud_usage databases
>>> before removing any records.
>>> 
>>> Travis
>>> 
>>> On Oct 30, 2013, at 10:17 AM, Dean Kamali <de...@gmail.com> wrote:
>>> 
>>>> Thanks Marty, Travis
>>>> 
>>>> I have changed the default GMT, and I have set both aggregation and
>>>> execution timezone to America/New_York, yet, and I have restarted both
>>>> management and usage servers.
>>>> 
>>>> still getting this stupid error "Not owner of usage job, skipping... "
>>> when
>>>> execution time occur"
>>>> 
>>>> Any other ideas?
>>>> 
>>>> Dean
>>>> 
>>>> 
>>>> On Wed, Oct 30, 2013 at 9:24 AM, Travis Graham <tg...@tgraham.us>
>>> wrote:
>>>> 
>>>>> Can you check your timezone settings in the global configs to make sure
>>>>> there's a correct timezone?
>>>>> 
>>>>> usage.aggregation.tiemzone
>>>>> usage.execution.timezone
>>>>> 
>>>>> 
>>>>> 
>>> http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.0.2/html/Admin_Guide/time-zones.html
>>>>> 
>>>>> We had issues with the default GMT setting where the jobs wouldn't run
>>>>> until we set both of those settings to our current timezone.
>>>>> 
>>>>> You'll notice the default GMT isn't an exact match in the list
>>> provided in
>>>>> the link above.
>>>>> 
>>>>> Search for usage in the Global Settings section of the UI and verify
>>> all
>>>>> the settings are sane.
>>>>> 
>>>>> Travis
>>>>> 
>>>>> On Oct 30, 2013, at 9:13 AM, Dean Kamali <de...@gmail.com>
>>> wrote:
>>>>> 
>>>>>> Yes it is running
>>>>>> 
>>>>>> /etc/init.d/cloudstack-usage status
>>>>>> 
>>>>>> cloudstack-usage (pid  3435) is running...
>>>>>> 
>>>>>> checking usage db, usage_job table it shows the following
>>>>>> 
>>>>>> it shows pid number (however its different from pid id 3435, which
>>> shows
>>>>>> when running status command), heartbeat info along with start and
>>>>> end_date
>>>>>> 
>>>>>> I have checked the logs, I keep seeing  "Not owner of usage job,
>>>>>> skipping... " when execution time occur.
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> On Wed, Oct 30, 2013 at 8:32 AM, Travis Graham <tg...@tgraham.us>
>>>>> wrote:
>>>>>> 
>>>>>>> Is the usage agent actually running?
>>>>>>> 
>>>>>>> # service cloudstack-usage status
>>>>>>> 
>>>>>>> And do you have the cloudstack-usage init script in /etc/init.d/ ?
>>>>>>> 
>>>>>>> Travis
>>>>>>> 
>>>>>>> On Oct 30, 2013, at 8:20 AM, Dean Kamali <de...@gmail.com>
>>> wrote:
>>>>>>> 
>>>>>>>> in my centos 6.4 , I find a  I see a symbolic link in
>>>>>>> /etc/cloudstack/usage
>>>>>>>> which points to /etc/cloudstack/management/db.properties
>>>>>>>> 
>>>>>>>> I checked the content of the file and seems okay ( it contain db
>>> name,
>>>>>>>> username, password), I have deployed cloudstack management server on
>>>>>>> Ubuntu
>>>>>>>> with exact behavior.
>>>>>>>> 
>>>>>>>> I think its a bug!
>>>>>>>> 
>>>>>>>> Can someone help?
>>>>>>>> 
>>>>>>>> Dean
>>>>>>>> 
>>>>>>>> 
>>>>>>>> On Wed, Oct 30, 2013 at 2:24 AM, Harikrishna Patnala <
>>>>>>>> harikrishna.patnala@citrix.com> wrote:
>>>>>>>> 
>>>>>>>>> Hi,
>>>>>>>>> Can you check db.properties file for correct db connection
>>>>>>> configurations.
>>>>>>>>> 
>>>>>>>>> Thanks
>>>>>>>>> Harikrishna
>>>>>>>>> On 30-Oct-2013, at 9:02 am, Dean Kamali <de...@gmail.com>
>>>>> wrote:
>>>>>>>>> 
>>>>>>>>>> Hello everyone
>>>>>>>>>> 
>>>>>>>>>> I never seen issue with 4.1.1 but with 4.2, I'm not able to get
>>> usage
>>>>>>>>>> database to work.
>>>>>>>>>> 
>>>>>>>>>> it has been very frustrating day for me, and no sign of hope!
>>>>>>>>>> 
>>>>>>>>>> cloud_usage database is empty
>>>>>>>>>> 
>>>>>>>>>> checking the logs I always get UsageServer ready... and no errors
>>> or
>>>>>>>>>> exceptions.
>>>>>>>>>> 
>>>>>>>>>> I have restarted usage server many times, with no luck.
>>>>>>>>>> 
>>>>>>>>>> usage_job table which suppose to show host and pid number for
>>> usuage
>>>>>>>>> server
>>>>>>>>>> is always Null.
>>>>>>>>>> 
>>>>>>>>>> Any ideas on what I need to check.
>>>>>>>>>> 
>>>>>>>>>> Please help!
>>>>>>>>>> 
>>>>>>>>>> Thank you
>>>>>>>>> 
>>>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>> 
>>>>> 
>>> 
>>> 
>> 


Re: [Solved]Re: Urgent - usage databae always empty

Posted by Dean Kamali <de...@gmail.com>.
Summary

No usage data is being populated in the database, all tables are empty.

I have set both
usage.aggregation.tiemzone to America/New_York
usage.execution.timezone to America/New_York

And I have set usage.stats.job.aggregation.range to 10

In the logs I kept seeing  "Not owner of usage job, skipping... " when
execution time occur. however after waiting for about 30 min or
so, usage data started populating and it started working.

Dean


On Thu, Oct 31, 2013 at 2:19 AM, Harikrishna Patnala <
harikrishna.patnala@citrix.com> wrote:

> Hi Dean,
> Can you summarise the issue occurred and how you solved it. It helps
> people to quickly look into the similar problem and solution.
>
> Thanks
> Harikrishna
> On 30-Oct-2013, at 11:22 pm, Dean Kamali <de...@gmail.com> wrote:
>
> > Well, it seems that all what I needed was more patience, even tho the
> above
> > message shows in the logs, I waited for 10 minutes and usage data started
> > populating in an interval of 10 mins.
> >
> > Thanks everyone for your help!
> >
> >
> > On Wed, Oct 30, 2013 at 12:11 PM, Dean Kamali <de...@gmail.com>
> wrote:
> >
> >> I have tried your suggestion, and I see that usage_job gets updated
> after
> >> I delete the entry there, and restart the usage service.
> >> I have also truncated all tables, "nice feature in sqlyog" and, I'm
> still
> >> not able to see any data.
> >>
> >> I'm still seeing the following in the logs:
> >>
> >> 2013-10-30 16:06:58,941 INFO  [cloud.usage.UsageServer] (main:null)
> >> UsageServer ready...
> >> 2013-10-30 16:08:00,001 INFO  [cloud.usage.UsageManagerImpl]
> >> (Usage-Job-1:null) starting usage job...
> >> 2013-10-30 16:08:00,007 DEBUG [cloud.usage.UsageManagerImpl]
> >> (Usage-Job-1:null) Not owner of usage job, skipping...
> >> 2013-10-30 16:08:00,007 INFO  [cloud.usage.UsageManagerImpl]
> >> (Usage-Job-1:null) usage job complete
> >>
> >> I have re-deployed the management server on Ubuntu / Center with same
> >> results.
> >>
> >> Dean
> >>
> >>
> >> On Wed, Oct 30, 2013 at 10:47 AM, Travis Graham <tgraham@tgraham.us
> >wrote:
> >>
> >>> Can you try stopping the cloudstack-usage process, removing any records
> >>> you have in the usage_job table, then restarting cloudstack-usage and
> >>> change your settings to get it to run again if needed?
> >>>
> >>> Just to be safe, do db dumps on both your cloud and cloud_usage
> databases
> >>> before removing any records.
> >>>
> >>> Travis
> >>>
> >>> On Oct 30, 2013, at 10:17 AM, Dean Kamali <de...@gmail.com>
> wrote:
> >>>
> >>>> Thanks Marty, Travis
> >>>>
> >>>> I have changed the default GMT, and I have set both aggregation and
> >>>> execution timezone to America/New_York, yet, and I have restarted both
> >>>> management and usage servers.
> >>>>
> >>>> still getting this stupid error "Not owner of usage job, skipping... "
> >>> when
> >>>> execution time occur"
> >>>>
> >>>> Any other ideas?
> >>>>
> >>>> Dean
> >>>>
> >>>>
> >>>> On Wed, Oct 30, 2013 at 9:24 AM, Travis Graham <tg...@tgraham.us>
> >>> wrote:
> >>>>
> >>>>> Can you check your timezone settings in the global configs to make
> sure
> >>>>> there's a correct timezone?
> >>>>>
> >>>>> usage.aggregation.tiemzone
> >>>>> usage.execution.timezone
> >>>>>
> >>>>>
> >>>>>
> >>>
> http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.0.2/html/Admin_Guide/time-zones.html
> >>>>>
> >>>>> We had issues with the default GMT setting where the jobs wouldn't
> run
> >>>>> until we set both of those settings to our current timezone.
> >>>>>
> >>>>> You'll notice the default GMT isn't an exact match in the list
> >>> provided in
> >>>>> the link above.
> >>>>>
> >>>>> Search for usage in the Global Settings section of the UI and verify
> >>> all
> >>>>> the settings are sane.
> >>>>>
> >>>>> Travis
> >>>>>
> >>>>> On Oct 30, 2013, at 9:13 AM, Dean Kamali <de...@gmail.com>
> >>> wrote:
> >>>>>
> >>>>>> Yes it is running
> >>>>>>
> >>>>>> /etc/init.d/cloudstack-usage status
> >>>>>>
> >>>>>> cloudstack-usage (pid  3435) is running...
> >>>>>>
> >>>>>> checking usage db, usage_job table it shows the following
> >>>>>>
> >>>>>> it shows pid number (however its different from pid id 3435, which
> >>> shows
> >>>>>> when running status command), heartbeat info along with start and
> >>>>> end_date
> >>>>>>
> >>>>>> I have checked the logs, I keep seeing  "Not owner of usage job,
> >>>>>> skipping... " when execution time occur.
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> On Wed, Oct 30, 2013 at 8:32 AM, Travis Graham <tg...@tgraham.us>
> >>>>> wrote:
> >>>>>>
> >>>>>>> Is the usage agent actually running?
> >>>>>>>
> >>>>>>> # service cloudstack-usage status
> >>>>>>>
> >>>>>>> And do you have the cloudstack-usage init script in /etc/init.d/ ?
> >>>>>>>
> >>>>>>> Travis
> >>>>>>>
> >>>>>>> On Oct 30, 2013, at 8:20 AM, Dean Kamali <de...@gmail.com>
> >>> wrote:
> >>>>>>>
> >>>>>>>> in my centos 6.4 , I find a  I see a symbolic link in
> >>>>>>> /etc/cloudstack/usage
> >>>>>>>> which points to /etc/cloudstack/management/db.properties
> >>>>>>>>
> >>>>>>>> I checked the content of the file and seems okay ( it contain db
> >>> name,
> >>>>>>>> username, password), I have deployed cloudstack management server
> on
> >>>>>>> Ubuntu
> >>>>>>>> with exact behavior.
> >>>>>>>>
> >>>>>>>> I think its a bug!
> >>>>>>>>
> >>>>>>>> Can someone help?
> >>>>>>>>
> >>>>>>>> Dean
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> On Wed, Oct 30, 2013 at 2:24 AM, Harikrishna Patnala <
> >>>>>>>> harikrishna.patnala@citrix.com> wrote:
> >>>>>>>>
> >>>>>>>>> Hi,
> >>>>>>>>> Can you check db.properties file for correct db connection
> >>>>>>> configurations.
> >>>>>>>>>
> >>>>>>>>> Thanks
> >>>>>>>>> Harikrishna
> >>>>>>>>> On 30-Oct-2013, at 9:02 am, Dean Kamali <de...@gmail.com>
> >>>>> wrote:
> >>>>>>>>>
> >>>>>>>>>> Hello everyone
> >>>>>>>>>>
> >>>>>>>>>> I never seen issue with 4.1.1 but with 4.2, I'm not able to get
> >>> usage
> >>>>>>>>>> database to work.
> >>>>>>>>>>
> >>>>>>>>>> it has been very frustrating day for me, and no sign of hope!
> >>>>>>>>>>
> >>>>>>>>>> cloud_usage database is empty
> >>>>>>>>>>
> >>>>>>>>>> checking the logs I always get UsageServer ready... and no
> errors
> >>> or
> >>>>>>>>>> exceptions.
> >>>>>>>>>>
> >>>>>>>>>> I have restarted usage server many times, with no luck.
> >>>>>>>>>>
> >>>>>>>>>> usage_job table which suppose to show host and pid number for
> >>> usuage
> >>>>>>>>> server
> >>>>>>>>>> is always Null.
> >>>>>>>>>>
> >>>>>>>>>> Any ideas on what I need to check.
> >>>>>>>>>>
> >>>>>>>>>> Please help!
> >>>>>>>>>>
> >>>>>>>>>> Thank you
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>
> >>>>>
> >>>
> >>>
> >>
>
>