Comments (10)
I just noticed the default timeout in App.config is 10 minutes, and the exception is thrown at the 10 minute mark. I will increase the value of ApiResponseWaitTimeOutInMinutes to 20 minutes and report back.
from peek.
Now the same exception occurs after 20 minutes.
from peek.
Same set of errors , i ' m also getting as mentioned above , it seems that there is some change in the SDK function or procedure.
it also means that API , database and webjob are communicating with each other but in such a fashion the results are not populating.
from peek.
In Swagger , i ' m getting back the below response as 200 and for some API response code is 500.
https://billing-data-api.azurewebsites.net/api/cspsummary/currentmonth
Response Body
[]
Response Code
200
Response Headers
{
"cache-control": "no-cache",
"pragma": "no-cache",
"content-length": "122",
"content-type": "application/json; charset=utf-8",
"content-encoding": "gzip",
"expires": "-1",
"vary": "Accept-Encoding",
"server": "Microsoft-IIS/8.0",
"x-aspnet-version": "4.0.30319",
"x-powered-by": "ASP.NET",
"date": "Fri, 10 Feb 2017 18:45:23 GMT"
}
[ base url: , api version: v1 ]
{"schemaValidationMessages":[{"level":"error","message":"Can't read from file https://billing-data-api.azurewebsites.net:443/swagger/docs/v1"}]}
from peek.
I receive accurate Response Body content when I click the "Try it out!" button for:
https://[my site].azurewebsites.net/swagger/ui/index#!/CspSummary/CspSummary_GetCurrentMonthData
AND
https://[my site].azurewebsites.net/swagger/ui/index#!/CspSummary/CspSummary_GetSingleMonthData
s3banerjee, for what requests do you receive a 500 error?
from peek.
/api/cspbilling : - Returning back response 200 , but nothing in response body
/api/cspbilling/currentmonth : - Returning back response 200 , but nothing in response body
/api/cspusage :- Response 500.
/api/userbilling :- Response 500.
for 200 response in body we have nothing.
Response Body
[]
for 500 response
Response Body
{
"Message": "An error has occurred."
}
from peek.
Check out my pull request for the /api/cspusage response 500 errors you are seeing. I saw the same error, and in my case it was because the current /api/cspusage code throws an exception if any of your clients in the partner center have a relationship other than "reseller" (e.g. "advisor" relationship). My pull request adds a check to see if there is a reseller relationship before pulling usage data.
from peek.
Hi ssugar,
I applied the code in your pull request #32. It resolves the problem for us. Thank you very much.
For the record, our successful BillingWebJob.exe run is copied below.
[02/17/2017 22:04:00 > 40f151: SYS INFO] Status changed to Starting
[02/17/2017 22:04:00 > 40f151: SYS INFO] WebJob singleton setting is False
[02/17/2017 22:04:12 > 40f151: SYS INFO] Run script 'BillingWebJob.exe' with script host - 'WindowsScriptHost'
[02/17/2017 22:04:12 > 40f151: SYS INFO] Status changed to Running
[02/17/2017 22:04:19 > 40f151: INFO] Found the following functions:
[02/17/2017 22:04:19 > 40f151: INFO] BillingWebJob.Program.CronJob
[02/17/2017 22:04:20 > 40f151: INFO] Executing: 'Program.CronJob' - Reason: 'Timer fired at 2017-02-17T22:04:20.1740855Z'
[02/17/2017 22:04:20 > 40f151: INFO] Job started for fetching billing data at 02/17/2017 22:04:20
[02/17/2017 22:04:20 > 40f151: INFO] Starting job processing for Customer Type csp
[02/17/2017 22:04:20 > 40f151: INFO] Starting CSP Routine. Current Usage, Historic Usage and Historic Billing data will be updated..
[02/17/2017 22:04:20 > 40f151: INFO]
[02/17/2017 22:04:20 > 40f151: INFO] Fetching records for Current Month's Usage from the API. This may take a while. If this operation is timimg out, consider increasing the TimeOut limit in Configuration file.
[02/17/2017 22:07:36 > 40f151: INFO]
[02/17/2017 22:07:36 > 40f151: INFO] 1216 records fetched from the API..
[02/17/2017 22:07:36 > 40f151: INFO]
[02/17/2017 22:07:36 > 40f151: INFO] All Usage data which exist in DB will be deleted and replaced by new line items.
[02/17/2017 22:07:42 > 40f151: INFO]
[02/17/2017 22:07:42 > 40f151: INFO] 0 usage records exist in DB and will be deleted.
[02/17/2017 22:07:42 > 40f151: INFO]
[02/17/2017 22:07:42 > 40f151: INFO] 1216 new usage records will be added to the database.
[02/17/2017 22:08:24 > 40f151: INFO]
[02/17/2017 22:08:24 > 40f151: INFO] Now fetching historic usage and billing records from the API month-by-month.
[02/17/2017 22:08:24 > 40f151: INFO]
[02/17/2017 22:08:24 > 40f151: INFO] Fetching dates from the config..
[02/17/2017 22:08:24 > 40f151: INFO]
[02/17/2017 22:08:24 > 40f151: INFO] Fetching Csp Billing and Summary data from 07/01/2016 00:00:00 to 02/17/2017 22:08:24
[02/17/2017 22:08:24 > 40f151: INFO]
[02/17/2017 22:08:24 > 40f151: INFO] Routine started for 7-2016
[02/17/2017 22:08:24 > 40f151: INFO] Checking Db for existing csp billing records for the month 7-2016..
[02/17/2017 22:08:24 > 40f151: INFO] No existing records found in Database for this month. Calling API for the data..
[02/17/2017 22:09:37 > 40f151: INFO] 244 data rows returned from the csp summary api.
[02/17/2017 22:09:37 > 40f151: INFO] 5703 data rows returned from the csp billing api.
from peek.
@snpdev - Glad to hear it helped.
from peek.
@ssugar thank you for pointing that out. merging the pull request.
from peek.
Related Issues (20)
- Azure peek dashboard - new customers not appearing HOT 3
- Filter data on basis of customer HOT 1
- How to get the daily consumption HOT 12
- Expose LicenseType Flag (to monitor AHUB usage) HOT 2
- Display Tags of ressources HOT 4
- CSP Usage webjob throwing exception Microsoft.Rest.HttpOperationException HOT 14
- EA usage error: The wait operation timed out HOT 2
- "Message": "An error has occurred." for CSP Usage api HOT 2
- Release date of the promised new version? HOT 3
- Timeout for CspUtilization HOT 3
- ResourceUtilizationList.json is missing HOT 1
- support for MFA requirement
- Anyone still using this code ? HOT 2
- Webjob returning exception.Swagger/cspusage is working but cspbilling error HOT 2
- Error running webjob for csp data. database not being populated
- Webjob thrown exception for csp. Unable to populate database HOT 1
- No Issue
- doesn't work with vs 2019
- This repo is missing important files HOT 2
- This repo is missing a LICENSE file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from peek.