o365 Audit logs for EWS failure (eg Throttle) - exchangewebservices

we are using a client with EWS connection for meeting documents (CRUD) and Streaming notification for changes in the meeting room documents by other clients. After running for few months, suddenly we notice two issues,
The streaming notification is disconnected within 2 seconds after open and some times the acknowledgment is not sent out to the client. The info logs contain undefined.
The streaming subscription exceeding the max limit for the account -> pretty sure that there are no additional clients running.
LOG:
warn: Fail to start streaming subscription <"room email id>">. Ex: You have exceeded the available subscriptions for your account. Remove unnecessary subscriptions and try your request again. ServiceResponseException {
message: 'You have exceeded the available subscriptions for your account. Remove unnecessary subscriptions and try your request again.',
InnerException: null,
response:
SubscribeResponse {
errorDetails:
DictionaryWithStringKey {
keys: [Array],
keysToObjs: [Object],
objects: [Object],
keyPicker: [Function] },
errorProperties: [],
subscription: StreamingSubscription { service: [Object], id: null, watermark: null },
result: 2,
errorCode: 103,
errorMessage: 'You have exceeded the available subscriptions for your account. Remove unnecessary subscriptions and try your request again.' } }
May we know if Audit logs can be enabled on the O365 to know the reason for any of the EWS errors? Online search resulted into Mailbox related audit logs but could not find any content related to ews logs from O365 (logs to indicate the reason for error and to view the throttle settings/throttle limit hit/etc).

Related

Webhook handler for Stripe event ... of type <several events> failed: User not found

I have a test mode product which I am generating a payment link for and passing a uid encoded in hex through a client_reference_id param. I have an firebase cloud function event handler and a webhook in my test stripe dashboard pointing to my event endpoint. Everything seems to be functioning properly, but I'm seeing these errors in my log console for several of the events sent:
invoice.paid
invoice.payment_succeeeded
checkout.session.completed
customer.subscription.created
customer.subscription.updated
I'm seeing these in my google cloud logs explorer. The error is as stated in the description. I don't see a stacktrace, but there is a trace path. I found them in Google Cloud's Trace List, but there's no stacktrace in there either. Just the sequence that got me to the errror:
/ext-firestore-stripe-payments-handleWebhookEvents (2645.429 ms)
Handling Stripe event [<event name>] of type <event type>
❗️[Error]: Webhook handler for Stripe event [<eventname>] of type [checkout.session.completed] failed: User not found!
[Open in Logs Viewer]
Full Log Entry
{
textPayload: "❗️[Error]: Webhook handler for Stripe event [<eventname>] of type [checkout.session.completed] failed: User not found!"
insertId: "<id>"
resource: {2}
timestamp: "2023-02-04T00:24:11.569373Z"
severity: "ERROR"
labels: {2}
logName: "<path>"
trace: "<path>"
receiveTimestamp: "2023-02-04T00:24:11.661364910Z"
}
and finally
4. Function execution took 2248 ms, finished with status code: 200
It's just not clear to me what is causing this error. Since I am using a payment link, I don't know how I can have a user besides what the user enters for themselves in the payment screen (email, etc).
The issue here was that there was a second endpoint with a different name which I had created while testing which was still enabled. Since I changed the name, it appears the extension was reporting errors on the firebase side. Deleting / disabling the endpoint solves the reported errors.

Openshift AMQ6 - message order - queue

I use AMQ 6 (ActiveMQ) on OpenShift, and I use a queue with re-delivery with exponentialBackoff (set in connection query params).
When I have one consumer and two messages and the first message gets processed by my single consumer and does NOT get an ACK...
Will the broker deliver the 2nd message to the single consumer?
Or will the broker wait for the re-delivery to preserve message order.
This documentation states:
...Typically a consumer handles redelivery so that it can maintain message order while a message appears as inflight on the broker. ...
I don't want to have my consumer wait for re-delivery. It should consume other messages. Can I do this without multiple consumers? If so, how?
Note: In my connection query params I don't have the ActiveMQ exclusive consumer set.
I have read the Connection Configuration URI docs, but jms.nonBlockingRedelivery isn't mentioned there.
Can the resource adapter use it by query param?
If you set jms.nonBlockingRedelivery=true on your client's connection URL then messages will be delivered to your consumer while others are in the process of redelivery. This is false by default.

Apache Camel MQTT - No exception thrown when the message broker is down

I'm currently working with Apache Camel and its MQTT component. I have a route consuming messages from the broker (Apache ActiveMQ artemis) and one other sending messages to it. The problem is that there are no exception thrown when the message broker is not available. Moreover all the messages that are not sent are kept in memory waiting for an eventual restart of the server, causing memory overflows. I don't know if this related to the MQTT protocol itself or to the configuration of the endpoint.
Here is my configuration :
MQTTEndpoint mqttEndpoint = null;
mqttEndpoint = (MQTTEndpoint) mqttComponent.createEndpoint(MQTT_BROKER);
mqttEndpoint.getConfiguration().setHost(properties.getBrokerAddress());
mqttEndpoint.getConfiguration().setPublishTopicName(publishTopicName);
//mqttEndpoint.getConfiguration().setSubscribeTopicNames(subscribreTopicNames);
mqttEndpoint.getConfiguration().setUserName(properties.getBrokerUsername());
mqttEndpoint.getConfiguration().setPassword(properties.getBrokerPassword());
mqttEndpoint.getConfiguration().setSslContext(createSSLContext());
mqttEndpoint.getConfiguration().setByDefaultRetain(false);
mqttEndpoint.getConfiguration().setQualityOfService(QoS.AT_MOST_ONCE.toString());
mqttEndpoint.getConfiguration().setConnectAttemptsMax(1);
mqttEndpoint.getConfiguration().setConnectWaitInSeconds(5);
mqttEndpoint.getConfiguration().setReconnectBackOffMultiplier(1);
mqttEndpoint.getConfiguration().setDisconnectWaitInSeconds(3);
mqttEndpoint.setCamelContext(camelCtx);
So this is correct behaviour for the QOS level you have set. You are setting the QOS flag to QoS.AT_MOST_ONCE.toString(). This is known as QOS level 2.
A Small Summary Of QOS 2 – Only Once
This level guarantees that the message will be delivered only once. If there is networking issues and it cannot deliver it the message will stay in the client queue till delivery is possible. This is the slowest QOS level as it requires 4 messages.
The sender sends a message and waits for an acknowledgement (PUBREC)
The receiver sends a PUBREC message
If the sender doesn’t receive an acknowledgement ( PUBREC) it will resend the message
with the DUP flag set.
When the sender receives an acknowledgement message PUBREC it then sends a message release message (PUBREL).
If the sender doesn’t receive the PUBREL it will resend the PUBREC message
When the receiver receives the PUBREL message it can now forward the message onto any subscribers.
The receiver then send a publish complete (PUBCOMP) .
If the sender doesn’t receive the PUBCOMP message it will resend the PUBREL message.
When the sender receives the PUBCOMP the process is complete and it can delete the message from the outbound queue.
See this blog entry for more informaton.
Most important part is that in your case the receiver is not available thus the MQTT protocol for QOS 2 cannot complete.

QuickBlox: can't get push notifications to work using REST api

I'm developing a quickblox application using Adobe AIR, which forces me to use the REST Api instead of the native libraries. I can't get the push notifications to work for offline Messages or the admin panel. Here's the details of what I do:
Admin panel:
uploaded Apple certificates for both Devel and Production push notifications
Setup project ID and server key for GCM
on Application Activate:
Register with APNS. Get device token:
XXXXXXX1fd86e783c1410e9b9e41e9f11339e33f17f59bfcc7d6bf9XXXXXXXXX
Generate udid for device. This is not Apple's device UDID, since it is now deprecated. I generate one myself. I'm saying this just in case this could be the problem
Login to Quickblox as user with device info
POST
{
"auth_key":"XXXXXXXXXX",
"nonce":8072,
"user":{
"password":"XXXXXXX",
"login":"XXXXXX"
},
"application_id":"1563",
"timestamp":1363692198,
"device":{
"platform":"ios",
"udid":"71B18699-E1A3-13B6-F8C3-BDBF01AC1FFC-B4B3475569E9-6B6A-A27E-56D1-B73E0ED4"
},
"signature":"d61293bbd98d2e523952c0f30e44ec514fb7f86a"
}
Login is ok. Create push token. As client_identification_sequence I use the token retrieved from Apple
POST
{
"push_token":{
"environment":"development",
"client_identification_sequence":"XXXXXXX1fd86e783c1410e9b9e41e9f11339e33f17f59bfcc7d6bf9XXXXXXXXX"
},
"device":{
"platform":"ios",
"udid":"71B18699-E1A3-13B6-F8C3-BDBF01AC1FFC-B4B3475569E9-6B6A-A27E-56D1-B73E0ED4"
}
}
Quickblox returns a token 153323 so I assume everything is ok
Now create subscription
POST
{
"notification_channels":"apns"
}
Quickblox returns the following
[
{
"subscription":{
"device":{
"udid":"71B18699-E1A3-13B6-F8C3-BDBF01AC1FFC-B4B3475569E9-6B6A-A27E-56D1-B73E0ED4",
"platform":{
"name":"ios"
}
},
"id":167704,
"notification_channel":{
"name":"apns"
}
}
}
]
UDid matches udid I passed from login. Everything looks good
Now I go to Admin panel and try to send Message. Admin panel says:
Notification has been successfully added to queue
If I go to queue, message shows as 'sent' but I never receive the notification in my device.
Any help would be greatly appreciated
your code looks good,
some comments:
1) you dont need to pass
"device":{
"platform":"ios",
"udid":"71B18699-E1A3-13B6-F8C3-BDBF01AC1FFC-B4B3475569E9-6B6A-A27E-56D1-B73E0ED4"
},
params to session, because you are passing them while creating push token
2) udid - it's just to separate users devices, because user can has more than 1 device. So you can pass any value to 'udid' which uniquely identify user's particular device
3) if you have sent message from admin panel - it means i think everything is OK on client side. So just check your APNS certificates, reupload them.

Calendar API Response with '403: Daily Limit Exceeded' - Google Chrome Extension

I started with an little application for showing some relevant information to our developer team, which is collected from different sources. Like google calendar, our project backoffice, an openarena server-logs etc.
I started with an web application, but then decided to switch the project to an chrome extension. Now i already had the google calendar integration up and running using the V3 Javascript(alpha) Client-Lib. This wasn't working anymore because i had to change the OAUTH dance, from the one for web-apps, to the one for packaged/installed apps.
For this i followed the tutorial (It's my first extension.) http://code.google.com/chrome/extensions/tut_oauth.html and got the OAUTH dance working again. Now i'am trying to request my calendar-data from the google api using the signedRequest-Methode from the tutorial, but alway receive the response "Daily Limit Exceeded. Please sign up" (Api Console shows i haven't performed any request).
Maybe someone has an idea what i am doing wrong here, because i tried everthing i could think about. Thanks in advance, Florian
Code -
manifest.json:
{
"name": "MIS",
"version": "0.1",
"description": "Monitor Information System",
"background_page": "background.html",
"browser_action": {
"default_icon": "img/mis/icon.png",
"default_title": "Mis"
},
"permissions": [
"tabs",
"https://www.googleapis.com/",
"https://www.google.com/"]
}
background.html:
...
oauth = ChromeExOAuth.initBackgroundPage
({
'request_url':'https://www.google.com/accounts/OAuthGetRequestToken',
'authorize_url':'https://www.google.com/accounts/OAuthAuthorizeToken',
'access_url':'https://www.google.com/accounts/OAuthGetAccessToken',
'consumer_key': 'anonymous',
'consumer_secret': 'anonymous',
'scope': 'https://www.googleapis.com/auth/calendar',
'app_name': 'Mis'
});
...
main.html Methode call:
function performCalendarEventsRequest(calendarId)
{
var requestUrl = 'https://www.googleapis.com/calendar/v3/calendars/'+calendarId+'/events';
var request = {
'method': 'GET',
'headers': {
'GData-Version': '3.0',
'Content-Type': 'application/atom+xml'
},
'parameters': {
'alt': 'json'
},
'body': 'Data to send'
};
oauth.sendSignedRequest(requestUrl, calendarEventsRequestCallback, request);
}
Since your consumer key and secret are both set as anonymous you are not identifying your application in any way.
You can either replace these with the Client ID and Client secret values respectively, which can be found on the API Access tab on your projects page in the API Console, or you can pass the API key (found just under the auth tokens on the same page) using an additional key parameter.
This is the same for most Google APIs.
Source: http://code.google.com/apis/calendar/v3/using.html#APIKey
I know this is an old question but I was stuck in the same error using the PHP implementation (Beta) of the API (2016-01-06), because I initially thought the setAuthConfigFile was all it was needed:
$client = new Google_Client();
$client->setApplicationName('MyCalendarAppName');
$client->setAuthConfigFile(APPPATH.'client_secret.json'); //file downloaded from GDC:
// https://console.developers.google.com/apis/credentials?project=YOUR-PROJECT-ID
$client->addScope(Google_Service_Calendar::CALENDAR_READONLY);
$service = new Google_Service_Calendar($client);
The error was not really due to a "daily limit" of requests but to the fact that I (owner of the Google account) hadn't explicitly given access permissions to the calendar. This is how to do it:
access the URL returned by the createAuthUrl() method (which can be invoked before calling the service);
a "Deny" and "Allow" form for accessing the calendars shows up – press Allow;
a code is returned – copy&paste this code to the authenticate($code) method and voilá, no more 403: Daily Limit Exceeded errors.
For doing this, just use the following lines before invoking the service:
//$client->createAuthUrl();
// - invoke the method above one time only: returns a URL with the "Allow" form
// which will give the code for authentication
$client->authenticate('YOUR_CODE_GOES_HERE');
$service = new Google_Service_Calendar($client); //invokes the Calendar service
However, this will allow a one time access to the calendar. If you try this twice, you get:
Google_Auth_Exception: Error fetching OAuth2 access token, message: 'invalid_grant: Code was already redeemed.'
Meaning that a token is needed to reaccess the calendar with the reedemed code. This token is returned by the authenticate method and can be assigned to the client through the setAccessToken method:
//get the access token you previously stored or get a new one to be stored:
$accessToken = $client->authenticate('YOUR_CODE_GOES_HERE');
//after the if-else blocks...
$client->setAccessToken($accessToken);
//refresh the token if it's expired
if ($client->isAccessTokenExpired())
$client->refreshToken($client->getRefreshToken());
The goal is to reuse that access token repeatedly (implicitly also reusing the redeemed code) and only invoke a refreshToken when the token expires. Google's quickstart creates a specific file for storing this token (calendar-php-quickstart.json) and only uses the authenticate method when the token is not found in that file. I.e. the setAccessToken is the only Client authentication method (besides the setAuthConfigFile) that needs to be used in subsequent requests.
I only fully understood this OAuth 2.0 logic by going through these errors and since this question attracted so many people already, perhaps this may help others...