# Troubleshooting medic API that's failing

**URL:** <https://forum.communityhealthtoolkit.org/t/troubleshooting-medic-api-thats-failing/1600>\
**Category:** Technical Support\
**Created:** [November 29, 2021, 5:24pm UTC](https://forum.communityhealthtoolkit.org/t/troubleshooting-medic-api-thats-failing/1600 "2021-11-29T17:24:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![atria](https://communityhealthtoolkit.b-cdn.net/letter_avatar_proxy/v4/letter/a/3da27b/32.png) [@atria](https://forum.communityhealthtoolkit.org/u/atria)\
**Post date:** [November 29, 2021, 5:24pm UTC](https://forum.communityhealthtoolkit.org/t/troubleshooting-medic-api-thats-failing/1600/1 "2021-11-29T17:24:16Z")

</div>

Hello All

I am trying to understand why medic-api fails during set up.(using the formal documentation)

**Logs & Screenshot**  
open ports

 ![Screenshot 2021-11-29 at 17.45.30](https://communityhealthtoolkit.b-cdn.net/uploads/default/original/2X/6/6da2a0685c269ea6cfd162edcf9ae1666b985dac.png)

Logs error-ssl.log

 ![Screenshot 2021-11-29 at 18.01.12](https://communityhealthtoolkit.b-cdn.net/uploads/default/original/2X/4/428ed9cd4bcc347fb4b13d023c6d8c6a9a9fc48c.png)

Browser page

 ![Screenshot 2021-11-29 at 18.02.03](https://communityhealthtoolkit.b-cdn.net/uploads/default/original/2X/6/67f57447b9789b876e74c42d5ebe11294821a614.png)

I have tried :

- Creating images of working containers and using these images to build new containers

- Starting the medic-api within container

**Environment**

- Browser: Chrome
- Client platform: MacOS
- App: api
- Version: 3.7.0, 3.9.0

---

<div class="post-metadata">

**Author:** ![diana](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/diana/32/2049_2.png) [@diana](https://forum.communityhealthtoolkit.org/u/diana)\
**Post date:** [November 29, 2021, 5:28pm UTC](https://forum.communityhealthtoolkit.org/t/troubleshooting-medic-api-thats-failing/1600/2 "2021-11-29T17:28:14Z")

</div>

Hi @atria

Could you please check medic-api logs to see if there’s an obvious error there? You could refer to [How do I get the medic-api logs when using Docker?](https://forum.communityhealthtoolkit.org/t/how-do-i-get-the-medic-api-logs-when-using-docker/1571) for information about how to get logs.

Thanks!

---

<div class="post-metadata">

**Author:** ![mrjones](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/mrjones/32/681_2.png) [@mrjones](https://forum.communityhealthtoolkit.org/u/mrjones)\
**Post date:** [November 29, 2021, 5:45pm UTC](https://forum.communityhealthtoolkit.org/t/troubleshooting-medic-api-thats-failing/1600/3 "2021-11-29T17:45:37Z")

</div>

@atria - I believe you’re following the [local setup steps](https://docs.communityhealthtoolkit.org/apps/tutorials/local-setup/) which have you running `docker compose` to startup the CHT. Medic has published a [docker compose helper](https://github.com/medic/cht-core/tree/master/scripts/docker-helper) which might solve your issues.

@diana’s suggestion about the logs will still apply if you get stuck after trying the helper script.

---

<div class="post-metadata">

**Author:** ![atria](https://communityhealthtoolkit.b-cdn.net/letter_avatar_proxy/v4/letter/a/3da27b/32.png) [@atria](https://forum.communityhealthtoolkit.org/u/atria)\
**Post date:** [November 30, 2021, 8:35am UTC](https://forum.communityhealthtoolkit.org/t/troubleshooting-medic-api-thats-failing/1600/4 "2021-11-30T08:35:43Z")

</div>

Hi @diana

There is nothing in the medic-api logs just the medic-core logs

---

<div class="post-metadata">

**Author:** ![atria](https://communityhealthtoolkit.b-cdn.net/letter_avatar_proxy/v4/letter/a/3da27b/32.png) [@atria](https://forum.communityhealthtoolkit.org/u/atria)\
**Post date:** [November 30, 2021, 10:43am UTC](https://forum.communityhealthtoolkit.org/t/troubleshooting-medic-api-thats-failing/1600/5 "2021-11-30T10:43:59Z")

</div>

@diana I do have logs for an instance where the API is failing after a server restart

[2021-11-30 10:37:14] [message]: ‘Child process errored attempting to transform xml’ }  
[2021-11-30 10:37:16] Node Environment Options: ‘–max\_old\_space\_size=20000’  
[2021-11-30 10:37:16] Node Version: 8.11.4 in production mode  
[2021-11-30 10:37:16] COUCH\_URL [http://medic-api:\*\*\*\*\*\*@localhost:5984/medic](http://medic-api: ****** @localhost:5984/medic)  
[2021-11-30 10:37:16] COUCH\_NODE\_NAME couchdb@localhost  
[2021-11-30 10:37:16] CouchDB Version: 2.3.0  
[2021-11-30 10:37:17] 2021-11-30 10:37:17 INFO: Extracting ddoc…  
[2021-11-30 10:37:17] 2021-11-30 10:37:17 INFO: DDoc extraction completed successfully  
[2021-11-30 10:37:17] 2021-11-30 10:37:17 INFO: Extracting resources…  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 INFO: Extracting resources completed successfully  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 INFO: Extracting initial documents…  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 INFO: Extracting initial documents completed successfully  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 INFO: Loading configuration…  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 WARN: Disabled transition “update\_clinics”  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 WARN: Disabled transition “registration”  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 WARN: Disabled transition “accept\_patient\_reports”  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 WARN: Disabled transition “generate\_patient\_id\_on\_people”  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 WARN: Disabled transition “default\_responses”  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 WARN: Disabled transition “update\_sent\_by”  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 WARN: Disabled transition “update\_sent\_forms”  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 INFO: Loading transition “death\_reporting”  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 WARN: Disabled transition “conditional\_alerts”  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 INFO: Loading transition “multi\_report\_alerts”  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 INFO: Skipping asynchronous transition “multi\_report\_alerts”  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 WARN: Disabled transition “update\_notifications”  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 WARN: Disabled transition “update\_scheduled\_reports”  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 WARN: Disabled transition “resolve\_pending”  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 INFO: Loading transition “muting”  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 INFO: Skipping asynchronous transition “muting”  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 WARN: Disabled transition “mark\_for\_outbound”  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 INFO: Configuration loaded successfully  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 INFO: Merging translations…  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 INFO: Translations merged successfully  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 INFO: Running db migrations…  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 INFO: Database migrations completed successfully  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 INFO: Updating xforms…  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 ERROR: spawn xsltproc ENOENT Error: spawn xsltproc ENOENT  
[2021-11-30 10:37:18] at \_errnoException (util.js:992:11)  
[2021-11-30 10:37:18] at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:190:19)  
[2021-11-30 10:37:18] at onErrorNT (internal/child\_process.js:372:16)  
[2021-11-30 10:37:18] at \_combinedTickCallback (internal/process/next\_tick.js:138:11)  
[2021-11-30 10:37:18] at process.\_tickCallback (internal/process/next\_tick.js:180:9)  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 ERROR: spawn xsltproc ENOENT Error: spawn xsltproc ENOENT  
[2021-11-30 10:37:18] at \_errnoException (util.js:992:11)  
[2021-11-30 10:37:18] at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:190:19)  
[2021-11-30 10:37:18] at onErrorNT (internal/child\_process.js:372:16)  
[2021-11-30 10:37:18] at \_combinedTickCallback (internal/process/next\_tick.js:138:11)  
[2021-11-30 10:37:18] at process.\_tickCallback (internal/process/next\_tick.js:180:9)  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 ERROR: Fatal error initialising medic-api  
[2021-11-30 10:37:18] 2021-11-30 10:37:18 ERROR: { Error: Child process errored attempting to transform xml  
[2021-11-30 10:37:18] at ChildProcess.xsltproc.on.err (/srv/software/medic-api/md5-COhU+vzfKxP6IcVH7UFAQ==/src/services/generate-xform.js:43:21)  
[2021-11-30 10:37:18] at emitOne (events.js:116:13)  
[2021-11-30 10:37:18] at ChildProcess.emit (events.js:211:7)  
[2021-11-30 10:37:18] at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:196:12)  
[2021-11-30 10:37:18] at onErrorNT (internal/child\_process.js:372:16)  
[2021-11-30 10:37:18] at \_combinedTickCallback (internal/process/next\_tick.js:138:11)  
[2021-11-30 10:37:18] at process.\_tickCallback (internal/process/next\_tick.js:180:9)  
[2021-11-30 10:37:18] [stack]: ‘Error: Child process errored attempting to transform xml\n at ChildProcess.xsltproc.on.err (/srv/software/medic-api/md5-COhU+vzfKxP6IcVH7UFAQ==/src/services/generate-xform.js:43:21)\n at emitOne (events.js:116:13)\n at ChildProcess.emit (events.js:211:7)\n at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:196:12)\n at onErrorNT (internal/child\_process.js:372:16)\n at \_combinedTickCallback (internal/process/next\_tick.js:138:11)\n at process.\_tickCallback (internal/process/next\_tick.js:180:9)’,  
[2021-11-30 10:37:18] [message]: ‘Child process errored attempting to transform xml’ }  
[2021-11-30 10:37:20] Node Environment Options: ‘–max\_old\_space\_size=20000’  
[2021-11-30 10:37:20] Node Version: 8.11.4 in production mode  
[2021-11-30 10:37:20] COUCH\_URL [http://medic-api:\*\*\*\*\*\*\*@localhost:5984/medic](http://medic-api: ******* @localhost:5984/medic)  
[2021-11-30 10:37:20] COUCH\_NODE\_NAME couchdb@localhost  
[2021-11-30 10:37:20] CouchDB Version: 2.3.0  
[2021-11-30 10:37:20] 2021-11-30 10:37:20 INFO: Extracting ddoc…  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 INFO: DDoc extraction completed successfully  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 INFO: Extracting resources…  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 INFO: Extracting resources completed successfully  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 INFO: Extracting initial documents…  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 INFO: Extracting initial documents completed successfully  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 INFO: Loading configuration…  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 WARN: Disabled transition “update\_clinics”  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 WARN: Disabled transition “registration”  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 WARN: Disabled transition “accept\_patient\_reports”  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 WARN: Disabled transition “generate\_patient\_id\_on\_people”  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 WARN: Disabled transition “default\_responses”  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 WARN: Disabled transition “update\_sent\_by”  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 WARN: Disabled transition “update\_sent\_forms”  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 INFO: Loading transition “death\_reporting”  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 WARN: Disabled transition “conditional\_alerts”  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 INFO: Loading transition “multi\_report\_alerts”  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 INFO: Skipping asynchronous transition “multi\_report\_alerts”  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 WARN: Disabled transition “update\_notifications”  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 WARN: Disabled transition “update\_scheduled\_reports”  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 WARN: Disabled transition “resolve\_pending”  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 INFO: Loading transition “muting”  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 INFO: Skipping asynchronous transition “muting”  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 WARN: Disabled transition “mark\_for\_outbound”  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 INFO: Configuration loaded successfully  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 INFO: Merging translations…  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 INFO: Translations merged successfully  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 INFO: Running db migrations…  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 INFO: Database migrations completed successfully  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 INFO: Updating xforms…  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 ERROR: spawn xsltproc ENOENT Error: spawn xsltproc ENOENT  
[2021-11-30 10:37:21] at \_errnoException (util.js:992:11)  
[2021-11-30 10:37:21] at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:190:19)  
[2021-11-30 10:37:21] at onErrorNT (internal/child\_process.js:372:16)  
[2021-11-30 10:37:21] at \_combinedTickCallback (internal/process/next\_tick.js:138:11)  
[2021-11-30 10:37:21] at process.\_tickCallback (internal/process/next\_tick.js:180:9)  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 ERROR: spawn xsltproc ENOENT Error: spawn xsltproc ENOENT  
[2021-11-30 10:37:21] at \_errnoException (util.js:992:11)  
[2021-11-30 10:37:21] at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:190:19)  
[2021-11-30 10:37:21] at onErrorNT (internal/child\_process.js:372:16)  
[2021-11-30 10:37:21] at \_combinedTickCallback (internal/process/next\_tick.js:138:11)  
[2021-11-30 10:37:21] at process.\_tickCallback (internal/process/next\_tick.js:180:9)  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 ERROR: Fatal error initialising medic-api  
[2021-11-30 10:37:21] 2021-11-30 10:37:21 ERROR: { Error: Child process errored attempting to transform xml  
[2021-11-30 10:37:21] at ChildProcess.xsltproc.on.err (/srv/software/medic-api/md5-COhU+vzfKxP6IcVH7UFAQ==/src/services/generate-xform.js:43:21)  
[2021-11-30 10:37:21] at emitOne (events.js:116:13)  
[2021-11-30 10:37:21] at ChildProcess.emit (events.js:211:7)  
[2021-11-30 10:37:21] at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:196:12)  
[2021-11-30 10:37:21] at onErrorNT (internal/child\_process.js:372:16)  
[2021-11-30 10:37:21] at \_combinedTickCallback (internal/process/next\_tick.js:138:11)  
[2021-11-30 10:37:21] at process.\_tickCallback (internal/process/next\_tick.js:180:9)  
[2021-11-30 10:37:21] [stack]: ‘Error: Child process errored attempting to transform xml\n at ChildProcess.xsltproc.on.err (/srv/software/medic-api/md5-COhU+vzfKxP6IcVH7UFAQ==/src/services/generate-xform.js:43:21)\n at emitOne (events.js:116:13)\n at ChildProcess.emit (events.js:211:7)\n at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:196:12)\n at onErrorNT (internal/child\_process.js:372:16)\n at \_combinedTickCallback (internal/process/next\_tick.js:138:11)\n at process.\_tickCallback (internal/process/next\_tick.js:180:9)’,  
[2021-11-30 10:37:21] [message]: ‘Child process errored attempting to transform xml’ }  
[2021-11-30 10:37:24] Node Environment Options: ‘–max\_old\_space\_size=20000’  
[2021-11-30 10:37:24] Node Version: 8.11.4 in production mode  
[2021-11-30 10:37:24] COUCH\_URL [http://medic-api:\*\*\*\*\*@localhost:5984/medic](http://medic-api: ***** @localhost:5984/medic)  
[2021-11-30 10:37:24] COUCH\_NODE\_NAME couchdb@localhost  
[2021-11-30 10:37:24] CouchDB Version: 2.3.0  
[2021-11-30 10:37:24] 2021-11-30 10:37:24 INFO: Extracting ddoc…  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 INFO: DDoc extraction completed successfully  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 INFO: Extracting resources…  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 INFO: Extracting resources completed successfully  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 INFO: Extracting initial documents…  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 INFO: Extracting initial documents completed successfully  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 INFO: Loading configuration…  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 WARN: Disabled transition “update\_clinics”  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 WARN: Disabled transition “registration”  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 WARN: Disabled transition “accept\_patient\_reports”  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 WARN: Disabled transition “generate\_patient\_id\_on\_people”  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 WARN: Disabled transition “default\_responses”  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 WARN: Disabled transition “update\_sent\_by”  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 WARN: Disabled transition “update\_sent\_forms”  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 INFO: Loading transition “death\_reporting”  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 WARN: Disabled transition “conditional\_alerts”  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 INFO: Loading transition “multi\_report\_alerts”  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 INFO: Skipping asynchronous transition “multi\_report\_alerts”  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 WARN: Disabled transition “update\_notifications”  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 WARN: Disabled transition “update\_scheduled\_reports”  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 WARN: Disabled transition “resolve\_pending”  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 INFO: Loading transition “muting”  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 INFO: Skipping asynchronous transition “muting”  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 WARN: Disabled transition “mark\_for\_outbound”  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 INFO: Configuration loaded successfully  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 INFO: Merging translations…  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 INFO: Translations merged successfully  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 INFO: Running db migrations…  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 INFO: Database migrations completed successfully  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 INFO: Updating xforms…  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 ERROR: spawn xsltproc ENOENT Error: spawn xsltproc ENOENT  
[2021-11-30 10:37:25] at \_errnoException (util.js:992:11)  
[2021-11-30 10:37:25] at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:190:19)  
[2021-11-30 10:37:25] at onErrorNT (internal/child\_process.js:372:16)  
[2021-11-30 10:37:25] at \_combinedTickCallback (internal/process/next\_tick.js:138:11)  
[2021-11-30 10:37:25] at process.\_tickCallback (internal/process/next\_tick.js:180:9)  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 ERROR: spawn xsltproc ENOENT Error: spawn xsltproc ENOENT  
[2021-11-30 10:37:25] at \_errnoException (util.js:992:11)  
[2021-11-30 10:37:25] at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:190:19)  
[2021-11-30 10:37:25] at onErrorNT (internal/child\_process.js:372:16)  
[2021-11-30 10:37:25] at \_combinedTickCallback (internal/process/next\_tick.js:138:11)  
[2021-11-30 10:37:25] at process.\_tickCallback (internal/process/next\_tick.js:180:9)  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 ERROR: Fatal error initialising medic-api  
[2021-11-30 10:37:25] 2021-11-30 10:37:25 ERROR: { Error: Child process errored attempting to transform xml  
[2021-11-30 10:37:25] at ChildProcess.xsltproc.on.err (/srv/software/medic-api/md5-COhU+vzfKxP6IcVH7UFAQ==/src/services/generate-xform.js:43:21)  
[2021-11-30 10:37:25] at emitOne (events.js:116:13)  
[2021-11-30 10:37:25] at ChildProcess.emit (events.js:211:7)  
[2021-11-30 10:37:25] at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:196:12)  
[2021-11-30 10:37:25] at onErrorNT (internal/child\_process.js:372:16)  
[2021-11-30 10:37:25] at \_combinedTickCallback (internal/process/next\_tick.js:138:11)  
[2021-11-30 10:37:25] at process.\_tickCallback (internal/process/next\_tick.js:180:9)  
[2021-11-30 10:37:25] [stack]: ‘Error: Child process errored attempting to transform xml\n at ChildProcess.xsltproc.on.err (/srv/software/medic-api/md5-COhU+vzfKxP6IcVH7UFAQ==/src/services/generate-xform.js:43:21)\n at emitOne (events.js:116:13)\n at ChildProcess.emit (events.js:211:7)\n at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:196:12)\n at onErrorNT (internal/child\_process.js:372:16)\n at \_combinedTickCallback (internal/process/next\_tick.js:138:11)\n at process.\_tickCallback (internal/process/next\_tick.js:180:9)’,  
[2021-11-30 10:37:25] [message]: ‘Child process errored attempting to transform xml’ }  
[2021-11-30 10:37:27] Node Environment Options: ‘–max\_old\_space\_size=20000’  
[2021-11-30 10:37:27] Node Version: 8.11.4 in production mode  
[2021-11-30 10:37:27] COUCH\_URL [http://medic-api:\*\*\*\*\*\*\*\*@localhost:5984/medic](http://medic-api: ******** @localhost:5984/medic)  
[2021-11-30 10:37:27] COUCH\_NODE\_NAME couchdb@localhost  
[2021-11-30 10:37:27] CouchDB Version: 2.3.0  
[2021-11-30 10:37:28] 2021-11-30 10:37:28 INFO: Extracting ddoc…  
[2021-11-30 10:37:28] 2021-11-30 10:37:28 INFO: DDoc extraction completed successfully  
[2021-11-30 10:37:28] 2021-11-30 10:37:28 INFO: Extracting resources…  
[2021-11-30 10:37:28] 2021-11-30 10:37:28 INFO: Extracting resources completed successfully  
[2021-11-30 10:37:28] 2021-11-30 10:37:28 INFO: Extracting initial documents…  
[2021-11-30 10:37:28] 2021-11-30 10:37:28 INFO: Extracting initial documents completed successfully  
[2021-11-30 10:37:28] 2021-11-30 10:37:28 INFO: Loading configuration…  
[2021-11-30 10:37:28] 2021-11-30 10:37:28 WARN: Disabled transition “update\_clinics”  
[2021-11-30 10:37:28] 2021-11-30 10:37:28 WARN: Disabled transition “registration”  
[2021-11-30 10:37:28] 2021-11-30 10:37:28 WARN: Disabled transition “accept\_patient\_reports”  
[2021-11-30 10:37:28] 2021-11-30 10:37:28 WARN: Disabled transition “generate\_patient\_id\_on\_people”  
[2021-11-30 10:37:28] 2021-11-30 10:37:28 WARN: Disabled transition “default\_responses”  
[2021-11-30 10:37:28] 2021-11-30 10:37:28 WARN: Disabled transition “update\_sent\_by”  
[2021-11-30 10:37:28] 2021-11-30 10:37:28 WARN: Disabled transition “update\_sent\_forms”  
[2021-11-30 10:37:28] 2021-11-30 10:37:28 INFO: Loading transition “death\_reporting”  
[2021-11-30 10:37:28] 2021-11-30 10:37:28 WARN: Disabled transition “conditional\_alerts”  
[2021-11-30 10:37:28] 2021-11-30 10:37:28 INFO: Loading transition “multi\_report\_alerts”  
[2021-11-30 10:37:28] 2021-11-30 10:37:28 INFO: Skipping asynchronous transition “multi\_report\_alerts”  
[2021-11-30 10:37:28] 2021-11-30 10:37:28 WARN: Disabled transition “update\_notifications”  
[2021-11-30 10:37:28] 2021-11-30 10:37:28 WARN: Disabled transition “update\_scheduled\_reports”  
[2021-11-30 10:37:28] 2021-11-30 10:37:28 WARN: Disabled transition “resolve\_pending”  
[2021-11-30 10:37:28] 2021-11-30 10:37:28 INFO: Loading transition “muting”  
[2021-11-30 10:37:28] 2021-11-30 10:37:28 INFO: Skipping asynchronous transition “muting”  
[2021-11-30 10:37:28] 2021-11-30 10:37:28 WARN: Disabled transition “mark\_for\_outbound”  
[2021-11-30 10:37:28] 2021-11-30 10:37:28 INFO: Configuration loaded successfully  
[2021-11-30 10:37:28] 2021-11-30 10:37:28 INFO: Merging translations…  
[2021-11-30 10:37:29] 2021-11-30 10:37:29 INFO: Translations merged successfully  
[2021-11-30 10:37:29] 2021-11-30 10:37:29 INFO: Running db migrations…  
[2021-11-30 10:37:29] 2021-11-30 10:37:29 INFO: Database migrations completed successfully  
[2021-11-30 10:37:29] 2021-11-30 10:37:29 INFO: Updating xforms…  
[2021-11-30 10:37:29] 2021-11-30 10:37:29 ERROR: spawn xsltproc ENOENT Error: spawn xsltproc ENOENT  
[2021-11-30 10:37:29] at \_errnoException (util.js:992:11)  
[2021-11-30 10:37:29] at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:190:19)  
[2021-11-30 10:37:29] at onErrorNT (internal/child\_process.js:372:16)  
[2021-11-30 10:37:29] at \_combinedTickCallback (internal/process/next\_tick.js:138:11)  
[2021-11-30 10:37:29] at process.\_tickCallback (internal/process/next\_tick.js:180:9)  
[2021-11-30 10:37:29] 2021-11-30 10:37:29 ERROR: spawn xsltproc ENOENT Error: spawn xsltproc ENOENT  
[2021-11-30 10:37:29] at \_errnoException (util.js:992:11)  
[2021-11-30 10:37:29] at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:190:19)  
[2021-11-30 10:37:29] at onErrorNT (internal/child\_process.js:372:16)  
[2021-11-30 10:37:29] at \_combinedTickCallback (internal/process/next\_tick.js:138:11)  
[2021-11-30 10:37:29] at process.\_tickCallback (internal/process/next\_tick.js:180:9)  
[2021-11-30 10:37:29] 2021-11-30 10:37:29 ERROR: Fatal error initialising medic-api  
[2021-11-30 10:37:29] 2021-11-30 10:37:29 ERROR: { Error: Child process errored attempting to transform xml  
[2021-11-30 10:37:29] at ChildProcess.xsltproc.on.err (/srv/software/medic-api/md5-COhU+vzfKxP6IcVH7UFAQ==/src/services/generate-xform.js:43:21)  
[2021-11-30 10:37:29] at emitOne (events.js:116:13)  
[2021-11-30 10:37:29] at ChildProcess.emit (events.js:211:7)  
[2021-11-30 10:37:29] at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:196:12)  
[2021-11-30 10:37:29] at onErrorNT (internal/child\_process.js:372:16)  
[2021-11-30 10:37:29] at \_combinedTickCallback (internal/process/next\_tick.js:138:11)  
[2021-11-30 10:37:29] at process.\_tickCallback (internal/process/next\_tick.js:180:9)  
[2021-11-30 10:37:29] [stack]: ‘Error: Child process errored attempting to transform xml\n at ChildProcess.xsltproc.on.err (/srv/software/medic-api/md5-COhU+vzfKxP6IcVH7UFAQ==/src/services/generate-xform.js:43:21)\n at emitOne (events.js:116:13)\n at ChildProcess.emit (events.js:211:7)\n at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:196:12)\n at onErrorNT (internal/child\_process.js:372:16)\n at \_combinedTickCallback (internal/process/next\_tick.js:138:11)\n at process.\_tickCallback (internal/process/next\_tick.js:180:9)’,  
[2021-11-30 10:37:29] [message]: ‘Child process errored attempting to transform xml’ }  
[2021-11-30 10:37:31] Node Environment Options: ‘–max\_old\_space\_size=20000’  
[2021-11-30 10:37:31] Node Version: 8.11.4 in production mode  
[2021-11-30 10:37:31] COUCH\_URL [http://medic-api:\*\*\*\*\*\*@localhost:5984/medic](http://medic-api: ****** @localhost:5984/medic)  
[2021-11-30 10:37:31] COUCH\_NODE\_NAME couchdb@localhost  
[2021-11-30 10:37:31] CouchDB Version: 2.3.0  
[2021-11-30 10:37:31] 2021-11-30 10:37:31 INFO: Extracting ddoc…  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 INFO: DDoc extraction completed successfully  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 INFO: Extracting resources…  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 INFO: Extracting resources completed successfully  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 INFO: Extracting initial documents…  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 INFO: Extracting initial documents completed successfully  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 INFO: Loading configuration…  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 WARN: Disabled transition “update\_clinics”  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 WARN: Disabled transition “registration”  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 WARN: Disabled transition “accept\_patient\_reports”  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 WARN: Disabled transition “generate\_patient\_id\_on\_people”  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 WARN: Disabled transition “default\_responses”  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 WARN: Disabled transition “update\_sent\_by”  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 WARN: Disabled transition “update\_sent\_forms”  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 INFO: Loading transition “death\_reporting”  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 WARN: Disabled transition “conditional\_alerts”  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 INFO: Loading transition “multi\_report\_alerts”  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 INFO: Skipping asynchronous transition “multi\_report\_alerts”  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 WARN: Disabled transition “update\_notifications”  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 WARN: Disabled transition “update\_scheduled\_reports”  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 WARN: Disabled transition “resolve\_pending”  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 INFO: Loading transition “muting”  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 INFO: Skipping asynchronous transition “muting”  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 WARN: Disabled transition “mark\_for\_outbound”  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 INFO: Configuration loaded successfully  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 INFO: Merging translations…  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 INFO: Translations merged successfully  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 INFO: Running db migrations…  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 INFO: Database migrations completed successfully  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 INFO: Updating xforms…  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 ERROR: spawn xsltproc ENOENT Error: spawn xsltproc ENOENT  
[2021-11-30 10:37:32] at \_errnoException (util.js:992:11)  
[2021-11-30 10:37:32] at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:190:19)  
[2021-11-30 10:37:32] at onErrorNT (internal/child\_process.js:372:16)  
[2021-11-30 10:37:32] at \_combinedTickCallback (internal/process/next\_tick.js:138:11)  
[2021-11-30 10:37:32] at process.\_tickCallback (internal/process/next\_tick.js:180:9)  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 ERROR: spawn xsltproc ENOENT Error: spawn xsltproc ENOENT  
[2021-11-30 10:37:32] at \_errnoException (util.js:992:11)  
[2021-11-30 10:37:32] at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:190:19)  
[2021-11-30 10:37:32] at onErrorNT (internal/child\_process.js:372:16)  
[2021-11-30 10:37:32] at \_combinedTickCallback (internal/process/next\_tick.js:138:11)  
[2021-11-30 10:37:32] at process.\_tickCallback (internal/process/next\_tick.js:180:9)  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 ERROR: Fatal error initialising medic-api  
[2021-11-30 10:37:32] 2021-11-30 10:37:32 ERROR: { Error: Child process errored attempting to transform xml  
[2021-11-30 10:37:32] at ChildProcess.xsltproc.on.err (/srv/software/medic-api/md5-COhU+vzfKxP6IcVH7UFAQ==/src/services/generate-xform.js:43:21)  
[2021-11-30 10:37:32] at emitOne (events.js:116:13)  
[2021-11-30 10:37:32] at ChildProcess.emit (events.js:211:7)  
[2021-11-30 10:37:32] at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:196:12)  
[2021-11-30 10:37:32] at onErrorNT (internal/child\_process.js:372:16)  
[2021-11-30 10:37:32] at \_combinedTickCallback (internal/process/next\_tick.js:138:11)  
[2021-11-30 10:37:32] at process.\_tickCallback (internal/process/next\_tick.js:180:9)  
[2021-11-30 10:37:32] [stack]: ‘Error: Child process errored attempting to transform xml\n at ChildProcess.xsltproc.on.err (/srv/software/medic-api/md5-COhU+vzfKxP6IcVH7UFAQ==/src/services/generate-xform.js:43:21)\n at emitOne (events.js:116:13)\n at ChildProcess.emit (events.js:211:7)\n at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:196:12)\n at onErrorNT (internal/child\_process.js:372:16)\n at \_combinedTickCallback (internal/process/next\_tick.js:138:11)\n at process.\_tickCallback (internal/process/next\_tick.js:180:9)’,  
[2021-11-30 10:37:32] [message]: ‘Child process errored attempting to transform xml’ }  
[2021-11-30 10:37:35] Node Environment Options: ‘–max\_old\_space\_size=20000’  
[2021-11-30 10:37:35] Node Version: 8.11.4 in production mode  
[2021-11-30 10:37:35] COUCH\_URL [http://medic-api:\*\*\*\*\*\*\*@localhost:5984/medic](http://medic-api: ******* @localhost:5984/medic)  
[2021-11-30 10:37:35] COUCH\_NODE\_NAME couchdb@localhost  
[2021-11-30 10:37:35] CouchDB Version: 2.3.0  
[2021-11-30 10:37:35] 2021-11-30 10:37:35 INFO: Extracting ddoc…  
[2021-11-30 10:37:36] 2021-11-30 10:37:36 INFO: DDoc extraction completed successfully  
[2021-11-30 10:37:36] 2021-11-30 10:37:36 INFO: Extracting resources…  
[2021-11-30 10:37:36] 2021-11-30 10:37:36 INFO: Extracting resources completed successfully  
[2021-11-30 10:37:36] 2021-11-30 10:37:36 INFO: Extracting initial documents…  
[2021-11-30 10:37:36] 2021-11-30 10:37:36 INFO: Extracting initial documents completed successfully  
[2021-11-30 10:37:36] 2021-11-30 10:37:36 INFO: Loading configuration…  
[2021-11-30 10:37:36] 2021-11-30 10:37:36 WARN: Disabled transition "update\_clinic

---

<div class="post-metadata">

**Author:** ![diana](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/diana/32/2049_2.png) [@diana](https://forum.communityhealthtoolkit.org/u/diana)\
**Post date:** [November 30, 2021, 11:23am UTC](https://forum.communityhealthtoolkit.org/t/troubleshooting-medic-api-thats-failing/1600/6 "2021-11-30T11:23:53Z")

</div>

It seems that your installation is missing a required dependency `xsltproc`, which is used to generate xmls for forms.

> I do have logs for an instance where the API is failing after a server restart

It’s not clear if these are logs from the same instance being discussed in the original post or not.

---

<div class="post-metadata">

**Author:** ![diana](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/diana/32/2049_2.png) [@diana](https://forum.communityhealthtoolkit.org/u/diana)\
**Post date:** [November 30, 2021, 11:25am UTC](https://forum.communityhealthtoolkit.org/t/troubleshooting-medic-api-thats-failing/1600/7 "2021-11-30T11:25:33Z")

</div>

> There is nothing in the medic-api logs just the medic-core logs

If API never started in this case, I suggest checking the links that @mrjones has provided.
