APIs & Integrations

dwaynemac
Contributor

Debugging Webhooks

SOLVE

I've been testing my webhooks endpoint with external clients and response 204 is given correctly.

But on the app monitor all fired webhook events are listed as "HTTP host connection error"

 

How may I debug this?

0 Upvotes
1 Accepted solution
dennisedson
Solution
HubSpot Product Team
HubSpot Product Team

Debugging Webhooks

SOLVE

Looks like you have an SSL issue. 

I ran a post to your request url and received this:

Postman.png

View solution in original post

15 Replies 15
dwaynemac
Contributor

Debugging Webhooks

SOLVE

Ok! Some tweaking on my ssl configuration seem to have solved the issue. thanks!

 

CleanShot 2021-09-14 at 15.14.40.png

 

 

dwaynemac
Contributor

Debugging Webhooks

SOLVE

thanks!

0 Upvotes
dwaynemac
Contributor

Debugging Webhooks

SOLVE

Thank you! Looking forward to your input. 

0 Upvotes
dennisedson
Solution
HubSpot Product Team
HubSpot Product Team

Debugging Webhooks

SOLVE

Looks like you have an SSL issue. 

I ran a post to your request url and received this:

Postman.png

dwaynemac
Contributor

Debugging Webhooks

SOLVE

My issue seems to be the same of the post you linked but there is no solution there either 

0 Upvotes
Teun
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

Debugging Webhooks

SOLVE

Thanks for the additional info! If the response is given within 5 seconds, that can not be the issue.
@dennisedson Could you help us out?



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Debugging Webhooks

SOLVE

@dwaynemac , I am looking into this.  Will let you know what I figure out

dwaynemac
Contributor

Debugging Webhooks

SOLVE

Definetly under 5 seconds

CleanShot 2021-09-13 at 10.36.46.png

0 Upvotes
Teun
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

Debugging Webhooks

SOLVE

@dwaynemac How long does it take your server to respond?
I found the following in another post:

HubSpot will retry in the following cases:

  • Connection Failed - If we cannot open an http connection to the provided webhook URL
  • Timeout - If your service takes longer than 5 seconds to send back a response to a batch of notifications
  • Error codes - If your service responds with an HTTP status code that is not one of: 400, 401, 403, 404, 405

Could it be that you are experiencing a timeout?
There are some solutions available here.



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


0 Upvotes
Teun
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

Debugging Webhooks

SOLVE

@dwaynemac Could you try to respond with 200? I checked a few of my applications and the workflow should work with a 200 response.



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


0 Upvotes
dwaynemac
Contributor

Debugging Webhooks

SOLVE

nope. still not working after changing responde to 200. 

 

CleanShot 2021-09-13 at 10.32.38.png

0 Upvotes
Teun
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

Debugging Webhooks

SOLVE

Hi @dwaynemac ,

 

By 'app monitor', do you mean the workflow logs or do you mean the application that is receiving the post request from the webhook?

If it is an application you wrote yourself, could you explain what technique you used so we can help you debug? Did you use PHP, NodeJS (Express) or another solution?



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


dwaynemac
Contributor

Debugging Webhooks

SOLVE

By 'app monitor' I meant this link: https://app.hubspot.com/developer/5030521/application/182429/monitoring/webhooks

 

The app is written by myself. It's on RubyOnRails, hosted on AWS, with a LetsEncrypt certificate.

I tested the webhook endpoint with https://paw.cloud/ with the 'validate certificate' enabled and it worked fine from there.

0 Upvotes
Teun
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

Debugging Webhooks

SOLVE

So if I read your post correctly, your app is giving a valid response (204) on the endpoint the webhook is pointing to? Cause if no response is given to the webhooks POST request, that will result in an error.



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


0 Upvotes
dwaynemac
Contributor

Debugging Webhooks

SOLVE

Yes, my app is responding with 204. 

But I tried responding "ok" and 202 and had de same problem.

What's the expected response by HubSpot?

0 Upvotes