Webhooks not hitting webserver, response code -1

SOLVED
JasonM_PDX
Here to help

Webhooks not hitting webserver, response code -1

I've been encountering an issue with using the webhooks. I had a webhook set up and working great for several months on two of our organizations, but then I stopped getting any requests from the Dashboard to my webserver.

 

I can intentionally generate a down or up event that would previously hit the webhook, but I won't ever see a request in the Apache logs. If I use the "Test" button in the Dashboard Alerts page, I get an error back and still no request.

 

I have confirmed that the webhook script is otherwise accessible from external services, it is HTTPS enabled with a valid (wildcard) certificate, and all other requests show up properly in the webserver logs.

 

An interesting thing I found is in the following snippet of webhook logs requested from the Dashboard API:

 

{
"organizationId": "XXXXXX",
"networkId": "N_XXXXXX",
"sentAt": "2019-12-04T07:37:35.993999Z",
"loggedAt": "2019-12-04T07:37:36.118000Z",
"url": "https://webhooks.example.com/alertHook.php",
"alertType": "Cellular went down",
"responseCode": -1,
"responseDuration": 122
},
{
"organizationId": "XXXXXX",
"networkId": "N_XXXXXX",
"sentAt": "2019-12-04T07:37:41.061000Z",
"loggedAt": "2019-12-04T07:37:41.181999Z",
"url": "https://webhooks.example.com/alertHook.php",
"alertType": "Cellular went down",
"responseCode": -1,
"responseDuration": 120
},
{
"organizationId": "XXXXXX",
"networkId": "L_XXXXXX",
"sentAt": "2019-12-04T07:48:25.513000Z",
"loggedAt": "2019-12-04T07:48:25.727999Z",
"url": "https://webhooks.example.com/alertHook.php",
"alertType": "APs went down",
"responseCode": -1,
"responseDuration": 214
}

 

All the request logs indicate a responseCode of -1, but unfortunately, I'm unable to find any documentation (like almost all of the API) indicating what that return value means. I would obviously expect it to be the HTTP response code, but since it never hits the server, it makes sense it doesn't have one. I'm hoping that someone else has seen similar and can suggest what might be causing this. My assumption is that it is an issue with the config in the Dashboard, but I've tried removing/re-adding it, changing it, and otherwise tweaking with it while maintaining the key pieces with no luck.

 

Thank you in advance for any help/suggestions.

1 ACCEPTED SOLUTION

Update: Switching to a non-wildcard cert fixed it.

 

I replaced the wildcart cert that was in place previously with a single domain cert through Let's Encrypt as a test. Once the new cert was in place, I was able to see the Dashboard servers hitting my webserver again and actually showing up in the access log.

View solution in original post

3 REPLIES 3
PhilipDAth
Kind of a big deal

Is your webhook server got a correct public SSL certificate?

 

On a different manner, over the last couple of months I have had issues with the scanner API failing to send to our servers.  The only fix that seemed to work in that case was to delete the config in the dashboard, save it, and then put it back in again.

You could give that a try.

The webserver does have a publicly issued valid certificate. The certificate is a wildcard, but that was previously working.

 

I have tried removing and re-adding, but maybe I missed a network as not all of our networks are on our primary template. So, I'll try that again. Thanks for the suggestion.

Update: Switching to a non-wildcard cert fixed it.

 

I replaced the wildcart cert that was in place previously with a single domain cert through Let's Encrypt as a test. Once the new cert was in place, I was able to see the Dashboard servers hitting my webserver again and actually showing up in the access log.

View solution in original post

Get notified when there are additional replies to this discussion.
Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.