XMiDT

/api/v3/notify in caduceus throwing 404 - page not found error

Hi, I build the xmidt using docker composer. I am able to successfully test the http restful call from webpa. Using the default simulator for testing. But when I try to post the events through cadueus through http://localhost:6000/api/v3/notify , i am getting 404-page not found error.

All other calls to http://localhost:6000 working fine . i.e heath check and get hook. Get hook returns empty string. Please help me to find out the problem

It probably has to do with this code:

Only if the content-type equals application/msgpack will the request be accepted. Otherwise I think you’ll get a 404 as you’re seeing.

Hi schmidtw, thanks … Sorry for the late reply. I have downloaded latest version of caduceus and build the container. After that registering hook worked fine. Get hook list responded with the information I passed for webhook.
After that as you suggested I have created msgpack bin file to test. But while testing the notify event, I am getting response as “message posted in queue”. But the event is not reflecting the Http Listener which I created. May I know is HTTP will work or I need to created HTTPS Listener?

How to check the message in the queue. I am using local goaws sns only(part of Docker build)

Getting below message when I post event

HTTP/1.1 202 Accepted
X-Caduceus-Build: development
X-Caduceus-Flavor: development
X-Caduceus-Region: local
X-Caduceus-Server: localhost
X-Caduceus-Start-Time: 07 Feb 20 10:29 UTC
Date: Mon, 10 Feb 2020 06:10:09 GMT
Content-Length: 28
Content-Type: text/plain; charset=utf-8

Request placed on to queue.

hi Gops,

Sorry for a late response. Are you still having this issue? Caduceus accepts HTTP and HTTPS webhooks. The most common reasons I can think of why you may not see an event you expect:

  • The destination/information in the wrp doesn’t match what the webhook is asking for. This won’t be seen in Caduceus logs.
  • Registering a webhook with your endpoint/URL and then waiting a bit too long to send the test event. Webhooks only last for five minutes, so it could expire before the event was sent. This won’t be seen in Caduceus logs.
  • Caduceus tried to send the event but failed. You would be able to see this in the Caduceus logs.

I think the most likely reason is the first one. I would suggest looking at these fields in the webhook that you are registering to Caduceus:

Events


this event type that the regular expressions in this list are matching against is described in the wrp spec here as the event identifier:
https://xmidt.io/docs/wrp/basics/#event-locators
The destination in your test event should match one of the regular expressions provided in your webhook registration.

Devices


The regular expression here are matched against the Source of the wrp. (This was written when the source was always the device id, but now that Talaria makes some events I’ve created this issue.) More information about this can be found on the same page as before:
https://xmidt.io/docs/wrp/basics/#locators

For testing, if you just want your listener to receive every event sent to Caduceus, I would recommend having a webhook where both device_id and events are [".*'].