# CHT Login Errors

**URL:** <https://forum.communityhealthtoolkit.org/t/cht-login-errors/1569>\
**Category:** Technical Support\
**Created:** [November 17, 2021, 11:35am UTC](https://forum.communityhealthtoolkit.org/t/cht-login-errors/1569 "2021-11-17T11:35:25Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![oyierphil](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/oyierphil/32/946_2.png) [@oyierphil](https://forum.communityhealthtoolkit.org/u/oyierphil)\
**Post date:** [November 17, 2021, 11:35am UTC](https://forum.communityhealthtoolkit.org/t/cht-login-errors/1569/1 "2021-11-17T11:35:25Z")

</div>

Hi  
We configured our environment and started collecting data, which was spread at different weeks based on the target regions for the study

I noted from last week that I cant login to the portal using any accounts both on my phone and on the desktop and laptop. Colleagues who could comfortably access the Medic App on the phone also can’t access it now, we all get the error below:

 ![image](https://communityhealthtoolkit.b-cdn.net/uploads/default/original/2X/0/0f6019b48269c1d2af0ba328d7cdd9eedb0a98aa.png)

Trying to figure out what went wrong, will appreciate any support  
Regards

---

<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 17, 2021, 11:43am UTC](https://forum.communityhealthtoolkit.org/t/cht-login-errors/1569/2 "2021-11-17T11:43:41Z")

</div>

Hi

Please check your medic-api logs for something that starts with `Error logging in: <error stack trace>`. The stack trace should provide some clues as to what is happening.  
You might also get some information from the browser console logs, when attempting to log in.

---

<div class="post-metadata">

**Author:** ![oyierphil](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/oyierphil/32/946_2.png) [@oyierphil](https://forum.communityhealthtoolkit.org/u/oyierphil)\
**Post date:** [November 17, 2021, 12:17pm UTC](https://forum.communityhealthtoolkit.org/t/cht-login-errors/1569/3 "2021-11-17T12:17:27Z")

</div>

Diana  
Thank you very much for reaching out, I have the following error from the browser console:

**rsync error: unexplained error (code 255) at io.c(235) [Receiver=3.1.3]**

Trying to check solutions online  
Regard, Philip

---

<div class="post-metadata">

**Author:** ![oyierphil](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/oyierphil/32/946_2.png) [@oyierphil](https://forum.communityhealthtoolkit.org/u/oyierphil)\
**Post date:** [November 18, 2021, 9:53am UTC](https://forum.communityhealthtoolkit.org/t/cht-login-errors/1569/4 "2021-11-18T09:53:27Z")

</div>

I share a screen shot with the errors, thank you

 ![CHT Login Errors_2](https://communityhealthtoolkit.b-cdn.net/uploads/default/original/2X/5/5fb210df1fbcf9dff7576c3a305365661f67b7aa.png)

---

<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 18, 2021, 11:03am UTC](https://forum.communityhealthtoolkit.org/t/cht-login-errors/1569/5 "2021-11-18T11:03:22Z")

</div>

This is strange. We don’t actually use `strict-dynamic` in our CSP. These are our content security policy rules: [cht-core/api/src/routing.js at master · medic/cht-core · GitHub](https://github.com/medic/cht-core/blob/master/api/src/routing.js#L136)

Are you seeing these warnings on the login page?  
What can you see if you check the browser console after you try to log in? Are there any additional log entries?

---

<div class="post-metadata">

**Author:** ![oyierphil](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/oyierphil/32/946_2.png) [@oyierphil](https://forum.communityhealthtoolkit.org/u/oyierphil)\
**Post date:** [November 18, 2021, 11:30am UTC](https://forum.communityhealthtoolkit.org/t/cht-login-errors/1569/6 "2021-11-18T11:30:23Z")

</div>

Dear Diana  
I share more log entries from the browser console, interestingly i cant access both the production server (using domain name) and test server (using ip address)

 ![CHT Login Errors_4](https://communityhealthtoolkit.b-cdn.net/uploads/default/original/2X/c/cbfe8bc539b6b798c0c47984dcdc2f5132fe078f.png)

Regards

---

<div class="post-metadata">

**Author:** ![oyierphil](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/oyierphil/32/946_2.png) [@oyierphil](https://forum.communityhealthtoolkit.org/u/oyierphil)\
**Post date:** [November 18, 2021, 12:08pm UTC](https://forum.communityhealthtoolkit.org/t/cht-login-errors/1569/7 "2021-11-18T12:08:15Z")

</div>

![CHT Login Errors_5](https://communityhealthtoolkit.b-cdn.net/uploads/default/original/2X/7/7e019a029659437fed1e8b74ce3eebd8ec354292.png)

---

<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 18, 2021, 12:14pm UTC](https://forum.communityhealthtoolkit.org/t/cht-login-errors/1569/8 "2021-11-18T12:14:47Z")

</div>

Can you please share the URL you are loading in your browser when you see these errors? For security, you could change your actual host name with a placeholder.

---

<div class="post-metadata">

**Author:** ![oyierphil](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/oyierphil/32/946_2.png) [@oyierphil](https://forum.communityhealthtoolkit.org/u/oyierphil)\
**Post date:** [November 18, 2021, 12:18pm UTC](https://forum.communityhealthtoolkit.org/t/cht-login-errors/1569/9 "2021-11-18T12:18:48Z")

</div>

[https://XXXX-YYYY.ZZZZ.ac.ke](https://XXXX-YYYY.ZZZZ.ac.ke)  
[https://XXXX-YYYY.ZZZZ.ac.ke/medic/login?redirect=https%3A%2F%2FXXXX-YYYY.ZZZZ.ac.ke%2F](https://XXXX-YYYY.ZZZZ.ac.ke/medic/login?redirect=https%3A%2F%2FXXXX-YYYY.ZZZZ.ac.ke%2F)

---

<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 18, 2021, 12:26pm UTC](https://forum.communityhealthtoolkit.org/t/cht-login-errors/1569/10 "2021-11-18T12:26:12Z")

</div>

I see, so you are getting redirected to login.  
Can you please follow the steps described here to check medic-api logs [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)?

---

<div class="post-metadata">

**Author:** ![oyierphil](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/oyierphil/32/946_2.png) [@oyierphil](https://forum.communityhealthtoolkit.org/u/oyierphil)\
**Post date:** [November 18, 2021, 12:33pm UTC](https://forum.communityhealthtoolkit.org/t/cht-login-errors/1569/11 "2021-11-18T12:33:02Z")

</div>

Dear Diana,  
Interesting the medic-os container is not running 😧  
Let me restart and see the results

 ![Medic_OS Errors](https://communityhealthtoolkit.b-cdn.net/uploads/default/original/2X/8/8ec13d4578d7a59a2a86588821375b22873b672c.png)

---

<div class="post-metadata">

**Author:** ![oyierphil](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/oyierphil/32/946_2.png) [@oyierphil](https://forum.communityhealthtoolkit.org/u/oyierphil)\
**Post date:** [November 18, 2021, 1:15pm UTC](https://forum.communityhealthtoolkit.org/t/cht-login-errors/1569/12 "2021-11-18T13:15:44Z")

</div>

Dear Diana  
Thank you very much for taking time to review our errors, containers in both servers were off, we have powered them and now we can access the portal, now I can review setting analytics from targets

Need to figure out why they both were shutdown and prevent recurrence, I suspect updates or server restarting due to power challenges

---

<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:** [January 5, 2023, 2:16pm UTC](https://forum.communityhealthtoolkit.org/t/cht-login-errors/1569/14 "2023-01-05T14:16:12Z")

</div>

4 posts were split to a new topic: [CHT Instance failing to sync](https://forum.communityhealthtoolkit.org/t/cht-instance-failing-to-sync/2384)
