6 Replies Latest reply on Sep 15, 2016 12:44 PM by daniel.taylor.alfresco

    How to troubleshoot a system webhook which isn't calling the callback URL in any way?

    daniel.taylor.alfresco

      Hi all,

       

      I've set up a system webhook to listen for user_account events via the REST api:

       

      r = requests.post(
              "https://my-organisations-jive-cloud-domain.com/api/core/v3/webhooks",
              headers={
                  "Content-type": "application/json",
                  "Authorization": "Bearer {}".format(access_token)
              },
              data=json.dumps(
                  {
                      "events": "user_account",
                      "callback": "https://some-callback.amazonaws.com/some/path"
                  }
              )
          )
      

       

      This succeeds and I get an ID for my newly created webhook:

      200: 
      {
      'events': 'user_account',
      'queueSize': 0,
      'resources': {'self': 
              {
                  'ref': 'https://my-organisations-jive-cloud-domain.com/api/core/v3/webhooks/1005',
                  'allowed': ['GET', 'DELETE', 'PUT']
              }
          },
          'id': '1005',
          'callback': 'https://some-callback.amazonaws.com/some/path'
      }
      

       

      On modifying a user profile however, the logs on the my callback URL server show absolutely no activity at all - no errors, no attempt to make a request.  I've tested the callback URL from the command line & scripts and it is absolutely publicly available (no firewall/network limitations.)  Jive doesn't seem to support the ability to call webhooks which require authentication/custom headers, so I've even modified the callback URL to require nothing - no headers, authorization, just a POST or PUT request and some data.  When GETing the webhook again, I see the following new fields added:

       

      200: 
      {
          'buggyDate': '2016-09-07T14:48:55.441+0000',
          'buggy': True,
          'queueSize': 1,
          'id': '1005',
          'callback': 'https://some-callback.amazonaws.com/some/path'
          ...etc
      }
      

       

      The WebhookEntity documentation says:

       

      [buggy] Returns true if this webhook was classified as buggy. A webhook is classified as buggy when there was an exception while building the payload for a notification for this webhook. The other reason for marking a webhook as buggy is when there was an exception while sending the notification to the remote system (eg. a 500 http error was returned).

      Is this all we have to work with?  How am I meant to determine whether there's a problem with my service or if Jive raised an exception itself 'while building the payload'?  I can't seem to find any kind of logs or debugging information to narrow down the cause of the problem in the Admin console either.  I can see the 'queueSize' field increments every time I modify a user's information which suggests this webhook is dealing with the right events at least.  But to re-iterate - the callback URL is as requirement free as it can be and is absolutely publicly accessible, and tested to be working - I'm not seeing any attempt by Jive to hit it in the logs, suggesting the failure is on Jive's side before it gets to the point of calling my service.

       

      Has anyone else had a similar problem, or can someone at Jive help?  My organisation is using a cloud hosted instance.

       

      Thanks,

      Dan