convoy icon indicating copy to clipboard operation
convoy copied to clipboard

[Bug report]: Webhooks not seeing in Dashboard

Open Xtreme89 opened this issue 2 years ago • 17 comments

Describe the bug

When i sent a Webhook to my Server running with convoy, i dont see the event in the dashboard. I got a http response 200 back to my python script and i also see in the tcpdump that the message is reaching my server and my server is answer so what is the reason why i dont see the event in the dashboard?

GUI saying "You have no incoming events."

Software is running on docker with this guide: https://docs.getconvoy.io/deployment/install-convoy/docker

  • Convoy:Convoy v24.5.1
  • OS: Ubuntu 22.04.4 LTS
  • Docker: Docker version 26.1.4, build 5650f9b
  • Browser [e.g. stock browser, safari]
POST /ingest/IyfVnxGqtjjQcDdJ HTTP/1.1
Host: xxxxxxx:5005
User-Agent: python-requests/2.31.0
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Content-Length: 43
Content-Type: application/json

{"content": "Dies ist eine Testnachricht."}
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
X-Request-Id: 19a860f0bda9/CyNJQ6afqA-000031
Date: Fri, 21 Jun 2024 18:09:08 GMT
Content-Length: 53

{"status":true,"message":"Event received","data":43}

Xtreme89 avatar Jun 21 '24 18:06 Xtreme89

Hey @Xtreme89,

Here are a few steps to you can take to debug this:

  1. Confirm it's showing up in the Events Log. If it's showing up here but not on the Event Delivery page, it's likely a subscription configuration problem.
  2. If it's not showing up at all, check the /queue/monitoring/ page and check the CreateEventQueue -- it will show you the reason why it failed to ingest.

subomi avatar Jun 21 '24 18:06 subomi

HI,

thanks for your help

On booh pages Event Log and Event Delivery there is nothing.

On CreateEventQueue i can see Events it is on Pending

{
  "CreateSubscription": false,
  "Event": {
    "created_at": "2024-06-21T18:01:27.559426213Z",
    "data": "eyJjb250ZW50IjogIkRpZXMgaXN0IGVpbmUgVGVzdG5hY2hyaWNodC4ifQ==",
    "endpoints": null,
    "event_type": "IyfVnxGqtjjQcDdJ",
    "headers": {
      "Accept": [
        "*/*"
      ],
      "Accept-Encoding": [
        "gzip, deflate"
      ],
      "Connection": [
        "keep-alive"
      ],
      "Content-Length": [
        "43"
      ],
      "Content-Type": [
        "application/json"
      ],
      "User-Agent": [
        "python-requests/2.31.0"
      ],
      "X-Convoy-Source-Id": [
        "IyfVnxGqtjjQcDdJ"
      ]
    },
    "idempotency_key": "",
    "is_duplicate_event": false,
    "project_id": "01J0XZ8E8W3BRAJTA26W5WRJCZ",
    "raw": "{\"content\": \"Dies ist eine Testnachricht.\"}",
    "source_id": "01J0XZ96SKDY0D0VF6PZ7ZTN72",
    "uid": "01J0XZBQR71AGNT8XCM8XSG0RB",
    "updated_at": "2024-06-21T18:01:27.559426295Z",
    "url_query_params": ""
  },
  "Params": {
    "ProjectID": "",
    "UID": "",
    "app_id": "",
    "custom_headers": null,
    "data": null,
    "endpoint_id": "",
    "event_type": "",
    "idempotency_key": "",
    "owner_id": "",
    "source_id": ""
  }
}

Xtreme89 avatar Jun 21 '24 18:06 Xtreme89

You can try retrying it from there to check for the error message (if any)

subomi avatar Jun 21 '24 18:06 subomi

There is no Button like retrying or something like that, just archiv and delete

Xtreme89 avatar Jun 21 '24 19:06 Xtreme89

Can you confirm that the worker container is running?

subomi avatar Jun 21 '24 19:06 subomi

the following docker container are running local-web-1 local-pgbouncer-1 local-redis_server-1 local-postgres-1

Xtreme89 avatar Jun 21 '24 19:06 Xtreme89

There should be a worker component running as well.

subomi avatar Jun 21 '24 19:06 subomi

OK i see,

container ingest and worker dont come up.

i think it is because of this issue https://github.com/frain-dev/convoy/issues/2068

when web not started correctly the other container dont came up maybe?

because condition of ingest and worker is that web must be healthy, but web is later healthy on start it is on error

Xtreme89 avatar Jun 21 '24 19:06 Xtreme89

Yes, that is correct. The way it is currently organised might not be the best approach, but they all start in a crash loop till they eventually become healthy.

subomi avatar Jun 21 '24 19:06 subomi

when i do "docker-compose restart" the ingest and worker came up and it is working messages is showing in the gui

maybe you can look for a solution?

Xtreme89 avatar Jun 21 '24 19:06 Xtreme89

I would love to find a solution; if you're interested, I'll accept pull requests.

subomi avatar Jun 21 '24 19:06 subomi

One addiontal question i have added in the convoy.json https for web server

"server": {
    "http": {
        "ssl": true,
        "ssl_cert_file": "cert.pem",
        "ssl_key_file": "key.pem",
        "port": 5005

it is also working i can access the gui, but now ingest container is unhealty after reboot

have i forgot something?

Xtreme89 avatar Jun 21 '24 19:06 Xtreme89

Can you share the logs?

subomi avatar Jun 21 '24 20:06 subomi

That is my problem ingest container dont have any logs when i look into it

ok got it - nothing more

2024-06-21T20:12:00.113458895Z Error: [postgres]: failed to open database - dial tcp 172.30.0.4:6432: connect: connection refused
2024-06-21T20:12:00.116084298Z time="2024-06-21T20:12:00Z" level=fatal msg="[postgres]: failed to open database - dial tcp 172.30.0.4:6432: connect: connection refused"
2024-06-21T20:12:00.116310985Z Usage:
2024-06-21T20:12:00.116324884Z   Convoy ingest [flags]
2024-06-21T20:12:00.116331620Z
2024-06-21T20:12:00.116370227Z Flags:
2024-06-21T20:12:00.116377805Z   -h, --help                 help for ingest
2024-06-21T20:12:00.116384030Z       --ingest-port uint32   Ingest port (default 5009)
2024-06-21T20:12:00.116390128Z       --interval int         the time interval, measured in seconds, at which the database should be polled for new pub sub sources (default 10)
2024-06-21T20:12:00.116397378Z       --log-level string     ingest log level
2024-06-21T20:12:00.116403773Z
2024-06-21T20:12:00.116410034Z Global Flags:
2024-06-21T20:12:00.116416283Z       --config string                   Configuration file for convoy (default "./convoy.json")
2024-06-21T20:12:00.116447155Z       --db-database string              Database Database
2024-06-21T20:12:00.116455289Z       --db-host string                  Database Host
2024-06-21T20:12:00.116461384Z       --db-options string               Database Options
2024-06-21T20:12:00.116467810Z       --db-password string              Database Password
2024-06-21T20:12:00.116474168Z       --db-port int                     Database Port
2024-06-21T20:12:00.116480572Z       --db-scheme string                Database Scheme
2024-06-21T20:12:00.116487061Z       --db-type string                  Database provider
2024-06-21T20:12:00.116493345Z       --db-username string              Database Username
2024-06-21T20:12:00.116499997Z       --enable-profiling                Enable profiling
2024-06-21T20:12:00.116506287Z       --feature-flag string             Enable feature flags (experimental)
2024-06-21T20:12:00.116513088Z       --otel-auth-header-name string    OTel backend auth header name
2024-06-21T20:12:00.116519371Z       --otel-auth-header-value string   OTel backend auth header value
2024-06-21T20:12:00.116525722Z       --otel-collector-url string       OTel collector URL
2024-06-21T20:12:00.116532482Z       --otel-sample-rate float          OTel tracing sample rate (default 1)
2024-06-21T20:12:00.116539158Z       --redis-database string           Redis database
2024-06-21T20:12:00.116545911Z       --redis-host string               Redis Host
2024-06-21T20:12:00.116552653Z       --redis-password string           Redis Password
2024-06-21T20:12:00.116558939Z       --redis-port int                  Redis Port
2024-06-21T20:12:00.116565426Z       --redis-scheme string             Redis Scheme
2024-06-21T20:12:00.116571844Z       --redis-type string               Redis provider
2024-06-21T20:12:00.116645573Z       --redis-username string           Redis Username
2024-06-21T20:12:00.116655827Z       --sentry-dsn string               Sentry backend dsn
2024-06-21T20:12:00.116662901Z       --tracer-type string              Tracer backend, e.g. sentry, datadog or otel

Xtreme89 avatar Jun 21 '24 20:06 Xtreme89

my fault web is not starting correctly

Xtreme89 avatar Jun 21 '24 20:06 Xtreme89

ok my fault, everything is working

Xtreme89 avatar Jun 21 '24 20:06 Xtreme89