Thank you for your prompt response.
Hey, I am trying to implement this approach. Can you share wiki documentation or any description/CURL for above api to implement?
Also, What do you suggest? Like should it run like after every hour and should our pod try to hit this URL and check it’s response? Also, what should be done if we get a false value in flag? Should we manually restart or is there a better suggestion?
Now, the info method also returns the field “IsMeteredLicensed.” If it is false, it means something wrong happened in communication between your pod and billing service; the easiest way to fix it is to restart the container.
For on premise, my requests look like these:
const asposeHtmlToExcelUrl = baseUrl + ‘/v3.0/cells/convert?format=XLSX&checkExcelRestriction=true&streamFormat=html’
var configuration = {
method: ‘put’,
url: asposeHtmlToExcelUrl,
headers: {
‘accept’: ‘multipart/form-data’,
‘Content-Type’: ‘multipart/form-data’,
…data.getHeaders()
},
data: data,
responseType : ‘stream’
};
Where baseUrl is something like: http://aspose-cells-cloud.document-service-backend-${ appEnv }.svc.cluster.local
;
basically: http://aspose-words-cloud.<backend_container>.svc.cluster.local
We don’t use any token in this case. How to make a call from this pod to the said URL then?
I do not know how to implement this for cell service; you better contact them via the forum.
I mean cells or words, I should implement for all. I provided code just for reference. I got this issue in words which is implemented in similar fashion.
Edit: This has happened multiple times at random and our business is getting impacted by this. We need to have a handling mechanism for this so it is very important for us.
You should call baseUrl + /v4.0/words/info and set authToken, which you should get before from /connect/token
ok. let me try.
Hey. I am able to hit the URL and getting response. Thank you for your help.
One clarification needed, so let’s say IsMeteredLicensed is false, they will the requests immediately start showing the red messages, or it will happen in next 24 hours. This is because, we might also want to set an interval for making this call periodically. So we are thinking what should we do in case when IsMeteredLicensed is false.
If you have some suggestion please let us know, as restarting containers automatically might not be possible for us.
Edit: Response
{
“Name”: “Aspose.Words Cloud API”,
“Version”: “24.12.0”,
“AdditionalInfo”: [
{
“Key”: “ConsumptionCredit”,
“Value”: “13701”
},
{
“Key”: “ConsumptionQuantity”,
“Value”: “6470.9579”
},
{
“Key”: “IsMeteredLicensed”,
“Value”: “True”
}
],
“RequestId”: “d046c954-4490-4b5e-bb2a-6a6bc225a0da”
}
When “Key”: “IsMeteredLicensed” is false, the container can’t send statistics to the billing service for 24 hours, and the application will add a red message whenever the license is not set again.
So, if you call this URL once every 24 hours, it should be enough for the container to be always licensed.
Thank you for your reply. If I understand correctly, hitting this api URL once in 24 hours, will give billing service the statistics and we will never face this issue, correct? or i want to understand like even after doing this, is their still a possibility that IsMeteredLicensed comes as false? And what could be the reasons why this comes as false?
This issue is sporadic, so we now know only one reason why it is happening - the container cannot send data.
So, if it happens even with IsMeteredLicensed, it is true, so we will consider a deeper analysis.
Hey, One question. So I got above response which I shared by running the curl in our backend pod. So if you see this URL in the curl:
curl --location 'http://aspose-words-cloud.document-service-backend-qa.svc.cluster.local/v4.0/words/info'
It is calling aspose pod as this is the way on premise is implemented. My question is, can I do similar thing in aspose pod itself? Like I am not able to run this CURL in aspose pod. I want to do something like liveliness probe based on some condition so was hoping if there is a way to trigger this in aspose pod itself.
You may try to set up a liveness probe that will call specific API URL like /v4.0/words/info; I will ask our devops team if they can share some solutions.
Any idea, on which port the service runs on pod? Baceause that would be also be required when I set up the liveliness probe
The application itself uses 80 ports, which port you map to it, depending on your docker-compose or whatever method you use.
Hey, Just wanted to ask one thing like I am trying to implement a liveliness probe so as to automatically restart container. But seems like, the aspose words docker image, does not have any curl, jq installed. Is it possible to include these in the image?
i’m afraid we do not have such plans as we plan make images as small as possible
Hi,
We received this issue in production again! When I triggered the URL, we got this:
{
“Name”: “Aspose.Words Cloud API”,
“Version”: “24.12.0”,
“AdditionalInfo”: [
{
“Key”: “ConsumptionCredit”,
“Value”: “57744”
},
{
“Key”: “ConsumptionQuantity”,
“Value”: “23667.3795”
},
{
“Key”: “IsMeteredLicensed”,
“Value”: “True”
}
],
“RequestId”: “a519cfcc-a92a-4534-ad47-0730232db191”
}
We are loosing business due to this and is a very serious concern to us as this is happening intermittently a lot of times. Please fix it from aspose side asap.
Please note that this was observed around 5:08 pm (IST)
Sorry for the inconvenience. I shared your error with the billing team.