Webhook message/payload is not received


Question 

I have configured a Webhook connection, yet I’m not receiving any messages at my target. How can I troubleshoot it?

Answer 

Sometimes, Webhook-related issues can be attributed to networking configuration. Some examples of such cases are:

  • Lenses running inside a container but Docker is not configured for public Internet access.
  • Lenses runs in a cloud environment, and a network rule is missing.
  • Lenses runs in a managed environment, and a corporate firewall/proxy is filtering specific application ports, e.g., Microsoft Teams.

Such issues can be easily identified by either using public HTTP/Webhook services or with a simple networking utility such as netcat. Both methodologies allow you to collect HTTP/Webhook messages/payloads that you can easily inspect for troubleshooting.

Here is an example using netcat:

# Let's start netcat in an interactive mode listening at port 8989
$ nc -l 8989

# A successful Webhook event sent by Lenses shown at netcat's terminal output
POST /my/webhook HTTP/1.1
Host: localhost:8989
User-Agent: akka-http/10.1.11
Content-Type: text/plain; charset=UTF-8
Content-Length: 15

{"key":"value"}

Failure to see such output to netcat’s terminal is indicative of Lenses not being able to reach out to the host or that port being filtered.

Another possible source of valuable troubleshooting information can be lenses.log. Below you can find an unsuccessful log entry related to webhooks.

# Unsuccessful due to Webhook target host not reachable
WARN  [i.l.c.c.f.ChannelForwarder$$anon$2] [ioapp-compute-2]
Webhook channel publisher for channel [whchann] failed to handle the event.
Tcp command [Connect(localhost:8989,None,List(),Some(10 seconds),true)] failed
because of java.net.ConnectException: Connection refused
--
Last modified: April 17, 2024