none
SPF usage data collection stucked RRS feed

  • Question

  • SPF 2012 R2 Usage collection stucked.

    IIS log shows that it tries to collect data using the same lastID over and over...

    2014-01-04 04:48:43 W3SVC2 192.168.0.63 GET /usage/usage lastId=54069&batchSize=10000 8090 domain\username 192.168.0.10 - - 200 0 0 15
    2014-01-04 04:57:44 W3SVC2 192.168.0.63 GET /usage/usage lastId=54069&batchSize=10000 8090 domain\username 192.168.0.10 - - 200 0 0 15
    2014-01-04 04:59:45 W3SVC2 192.168.0.63 GET /usage/usage lastId=54069&batchSize=10000 8090 domain\username 192.168.0.10 - - 200 0 0 15
    2014-01-04 05:08:45 W3SVC2 192.168.0.63 GET /usage/usage lastId=54069&batchSize=10000 8090 domain\username 192.168.0.10 - - 200 0 0 33

    And analytics event log shows that it is getting error with this lastID:

    first event - it tries to get data:

    Component: 7

    Retriever.Retrieve Method Entry Module: 30b83609-3c2c-498e-8627-3cfb2d4de9f1 Retriever.Retrieve Entry at: 1/4/2014 4:48:43 AM. Parameter values:  eventId=54069, batchSize=10000

    next event it gets error :

    Component: 7

    Activity [WebAuthentication Call, id {0e42c4d4-12e0-4e30-badb-2d435162787e}]
    Parent activity [none, id {00000000-0000-0000-0000-000000000000}]

    Elapsed: 0ms
    Context: {f18808fe-84cd-4995-9fe3-b17fd5c8f57b}

    The SPF Usage Metering Retriever encountered an error while attempting to retrieve usage data.  All SCSPFDB database changes have been rolled back.  Failure information: Specified argument was out of the range of valid values.

    and next two events shows that because of error SPF did not get any data :

    Component: 7

    Retrieval Statistics Total count of ProviderUsageRecords retrieved: 0, Total count of bytes retrieved: 0 0

    Component: 7

    Retriever.Retrieve Method Exit Module: 30b83609-3c2c-498e-8627-3cfb2d4de9f1 Result: Retriever.Retrieve Exit at: 1/4/2014 4:48:43 AM. Duration: 00:00:00.0156230

    How i can reset SPF that it started to use different lastID. Can I reset it totally without reinstall ?

    Saturday, January 4, 2014 5:29 AM

Answers

  • Found bad record in SCOM DW in [OperationsManagerDW].[dbo].[ManagedEntityProperty] . After deleting them everything seems working.
    • Marked as answer by andrius.kr Monday, January 13, 2014 11:20 AM
    • Edited by andrius.kr Monday, January 13, 2014 11:21 AM
    Monday, January 13, 2014 11:20 AM

All replies

  • Monday, January 6, 2014 7:52 PM
  • Hello Stanislav, Yes i have seen that page, tried all sugested solutions and none of them helped. Actually it seems that with permissions is everything ok. I have deleted records from sfp's database table scspf.SpfUsageRecord and then i open spf's web service manaly usage/usage lastId=0&batchSize=10000 i get json file with usage records and that table is filled with record about my VMs. But it seems strange because not all VMs go to that table. Meanwhile spf keeps tryint to GET data with the same lastId=54069 over and over. And if i try to open URL with this lastId i get empty file. So i think if i found the whay how to reset it, it would solve my problem.
    Monday, January 6, 2014 9:27 PM
  • OK, got it working, kind of...

    deleted records from SPF scspf.SpfUsageRecord and from WAP usage.Records tables and found and changed to 0 the problematic lastID in WAP usage.ProvidersConfiguration table.

    After this usage data began to show up in SPF and in WAP corresponding tables.

    But one problem remained: usage is getting collected not about all Virtual Machines.

    SPF collects usage data only about one specific subscriptionID:

    But there is no such subscription ID SPF (scspf.Tenants) and the Administrators ID is different:

    Any thoughts ?


    • Edited by andrius.kr Tuesday, January 7, 2014 2:15 PM
    Tuesday, January 7, 2014 2:14 PM
  • One more thing to add, just noticed, that collected usage data is the same every hour. 

    WAP usage get the same usage data constantly.
    Thursday, January 9, 2014 6:33 PM
  • Found bad record in SCOM DW in [OperationsManagerDW].[dbo].[ManagedEntityProperty] . After deleting them everything seems working.
    • Marked as answer by andrius.kr Monday, January 13, 2014 11:20 AM
    • Edited by andrius.kr Monday, January 13, 2014 11:21 AM
    Monday, January 13, 2014 11:20 AM
  • Hi, how did you found out that one of the entries in  [OperationsManagerDW].[dbo].[ManagedEntityProperty] was bad?

    Thanks

    Tuesday, March 18, 2014 11:36 AM
  • Yes, how do you found out ?

    Marcus Lehmann

    Friday, August 8, 2014 2:27 PM
  • Was facing the same issue as described by andrius.kr and this is what worked for me.

    1) Removed SCVMM- SCOM integration

    2) Reconfigured SCVMM-SCOM integration as mentioned at (http://technet.microsoft.com/en-us/library/dn463823.aspx)

    3) Deleted old SPF + SCOM integration by using below command (http://kristiannese.blogspot.in/2014/08/vm-cloud-is-missing-in-windows-azure.html)

    Get-SCSPFSetting -ID 'a815635e-3068-48eb-8845-8c739e698d54' | Remove-SCSPFSetting

    4) Re-integrated SPF + SCOM using below commands (http://blogs.technet.com/b/privatecloud/archive/2013/10/01/configuring-spf-and-windows-azure-pack-for-iaas-usage-and-metering.aspx)

    Import-module spfadmin

    $OMDWSqlServer = "SCOMDWDB01.contoso.com”

    $OMServer = "SCOMMS01.contoso.com"

    $stamp = Get-SCSPFStamp;

    $server = New-SCSPFServer -Name $OMServer -ServerType OMDW -Stamps $stamp[0];

    $setting = New-SCSPFSetting -Name $OMDWSqlServer –Value "Data Source=$OMDWSqlServer;Initial Catalog=OperationsManagerDW;Integrated Security=True" -SettingType DatabaseConnectionString –Server $server

    5) Rebooted WAP Server & SPF Server

    6) Done !!

    All the best !!

    MayurG


    MayurG


    Monday, December 22, 2014 3:02 PM
  • Hi Andrius,

    I also encountered the same issue, only data from SubscriptionId 75700CD5-893E-4F68-ADA7-50EF4668ACC6 were collected. Have you found any way to resolve it?

    Thanks,

    Alex

    Thursday, April 9, 2015 2:41 AM