hello community
When I create an outbound transition, and when a document meets all the requirements for the push to occur, when the push occurs I see a task: outbound task document using the outbound_push_tasks view in the medic-sentinel couchDB database
Last week it worked fine, but now I have some problems, the push just doesn’t happen, so I changed the mapping to a simple key “patients”: 52 and the relevant_to: “1 === 1” and again nothing happens, the task:outbound is not created, and no push is performed
Yes I’m using “mark_for_outbound”: true
Is there a log where I can find the error?
Most of the logging in the outbound push code ends up in the task:outbound
doc, but if you’re not getting that, then check the api and sentinel logs as there may be an error
or info
there that gives you something to go on.
The mark_for_outbound
only fires on change, and won’t apply to historical docs, so make sure when you’re testing you submit a new doc after making your config changes.
Hi again
In sentinel logs I’ve found the information that I needed to continue and now I’ve the outbound transition working as expected in my local environment but once loaded to our test server https://supervisor-moh-mali.dev.medicmobile.org/ I’m not getting the push to our endpoint, we do not have access to logs to see what is going on
@bamatic - Oh no! That sounds super frustrating. From a generic perspective, you’d want to look in the server logs for sentinel. For a standard docker setup, these would be located in /srv/storage/medic-sentinel/logs/medic-sentinel.log
. For me, when I intentionally put a bad character in my base_url
so it’s http://1s92.168.68.26:8081
, I get this in the error logs:
[2022-07-20 22:02:01] 2022-07-20 22:02:01 ERROR: Failed to push 89847b81-ecd8-4304-9912-09f095ccc8f9 to debugtest: Error: getaddrinfo ENOTFOUND 1s92.168.68.26 1s92.168.68.26:8081
[2022-07-20 22:02:01] 2022-07-20 22:02:01 INFO: Task outbound completed
On more point that might help, I like to use a server I control for debugging, and run a nice debugging app like this one. I can then tail the sentinel logs, see the server logs and see the browser console all in one view:
My app_settings.json
will then look like this:
{
<!--- OTHER CONFIG HERE ----->
"transitions": {
"mark_for_outbound": true
},
"outbound": {
"debugtest": {
"relevant_to": "doc.type === 'person' && doc.role == 'patient'",
"destination": {
"base_url": "http://192.168.68.26:8081",
"path": "/"
},
"mapping": {
<!--- MAPPING HERE ----->
}
}
}
}
However, for your specific scenario, it sounds like you don’t have access to medic-sentinel.log
and agreed, the details I can see in Fauxton in my medic-sentinel
database are not enough for you to know what the problem is.
Since we host for you, let me see if I can dig up the log information, ensuring there’s no sensitive information, I’ll post back so others can follow along. If need be, I’ll contact you directly.
Stay tuned!
@bamatic - I realize we can’t give out any confidential information on the forums as we need to authenticate each user. I’ll open a GitHub ticket in the repo and we’ll follow up from there.
For others following along, the answer will almost always be shown in either the logs on the base_url
server or in your medic-sentinel.log
, likely the latter.
Hi there,
We’ve updated from 3.13 our instance https://supervisor-moh-mali.dev.medicmobile.org/
We’re not getting outbond transition anymore
Could you please look at medic-sentinel.log again for us, if we have some error or info message ?
Hi @bamatic
Sorry for the late reply. I’m checking logs for https://supervisor-moh-mali.dev.medicmobile.org/ and logtrail isn’t reporting any Sentinel logs.
However, if I’m looking at couchdb or haproxy logs, I can see the medic-sentinel
user making requests, so it might be that log capturing isn’t working.