medic / cht-interoperability

CHT - eCHIS interoperability project
GNU Affero General Public License v3.0
2 stars 3 forks source link

Add sed script for OpenHIM path forwarding #18

Closed samuelimoisili closed 1 year ago

samuelimoisili commented 1 year ago

Description

Added a sed expression to fix OpenHIM path forwarding issue.

Closes medic/interoperability#17

Code review checklist

License

The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.

njogz commented 1 year ago

I am still getting a 404 error when I try a POST request to http://localhost:5001/mediator/patient

samuelimoisili commented 1 year ago

I am still getting a 404 error when I try a POST request to http://localhost:5001/mediator/patient

Run ./startup.sh destroy to destroy your previous instance and configuration, then set up a new instance.

njogz commented 1 year ago

I am now getting the error below after destroying the containers

2023-01-26 12:46:41 Server listening on port 6000
2023-01-26 12:46:41 /app/index.js:26
2023-01-26 12:46:41     throw new Error(`Mediator Registration Failed: Reason ${err}`);
2023-01-26 12:46:41     ^
2023-01-26 12:46:41 
2023-01-26 12:46:41 Error: Mediator Registration Failed: Reason Error: User interop@openhim.org not found when authenticating with core API
2023-01-26 12:46:41     at /app/index.js:26:11
2023-01-26 12:46:41     at /app/node_modules/openhim-mediator-utils/register.js:16:14
2023-01-26 12:46:41     at Request._callback (/app/node_modules/openhim-mediator-utils/auth.js:26:7)
2023-01-26 12:46:41     at self.callback (/app/node_modules/request/request.js:185:22)
2023-01-26 12:46:41     at Request.emit (node:events:513:28)
2023-01-26 12:46:41     at Request.<anonymous> (/app/node_modules/request/request.js:1154:10)
2023-01-26 12:46:41     at Request.emit (node:events:513:28)
2023-01-26 12:46:41     at IncomingMessage.<anonymous> (/app/node_modules/request/request.js:1076:12)
2023-01-26 12:46:41     at Object.onceWrapper (node:events:627:28)
2023-01-26 12:46:41     at IncomingMessage.emit (node:events:525:35)
2023-01-26 12:46:41 
2023-01-26 12:46:41 Node.js v18.13.0
samuelimoisili commented 1 year ago

I am now getting the error below after destroying the containers

2023-01-26 12:46:41 Server listening on port 6000
2023-01-26 12:46:41 /app/index.js:26
2023-01-26 12:46:41     throw new Error(`Mediator Registration Failed: Reason ${err}`);
2023-01-26 12:46:41     ^
2023-01-26 12:46:41 
2023-01-26 12:46:41 Error: Mediator Registration Failed: Reason Error: User interop@openhim.org not found when authenticating with core API
2023-01-26 12:46:41     at /app/index.js:26:11
2023-01-26 12:46:41     at /app/node_modules/openhim-mediator-utils/register.js:16:14
2023-01-26 12:46:41     at Request._callback (/app/node_modules/openhim-mediator-utils/auth.js:26:7)
2023-01-26 12:46:41     at self.callback (/app/node_modules/request/request.js:185:22)
2023-01-26 12:46:41     at Request.emit (node:events:513:28)
2023-01-26 12:46:41     at Request.<anonymous> (/app/node_modules/request/request.js:1154:10)
2023-01-26 12:46:41     at Request.emit (node:events:513:28)
2023-01-26 12:46:41     at IncomingMessage.<anonymous> (/app/node_modules/request/request.js:1076:12)
2023-01-26 12:46:41     at Object.onceWrapper (node:events:627:28)
2023-01-26 12:46:41     at IncomingMessage.emit (node:events:525:35)
2023-01-26 12:46:41 
2023-01-26 12:46:41 Node.js v18.13.0

You didn't call ./startup.sh init, you ran ./startup.sh up after destroying the container, you'll have to reinititalise it.