# Cannot Login using medic account

**URL:** <https://forum.communityhealthtoolkit.org/t/cannot-login-using-medic-account/3022>\
**Category:** Technical Support\
**Created:** [September 12, 2023, 4:44am UTC](https://forum.communityhealthtoolkit.org/t/cannot-login-using-medic-account/3022 "2023-09-12T04:44:12Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcelo\_De\_Guzman](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/marcelo_de_guzman/32/1620_2.png) [@Marcelo\_De\_Guzman](https://forum.communityhealthtoolkit.org/u/Marcelo_De_Guzman)\
**Post date:** [September 12, 2023, 4:44am UTC](https://forum.communityhealthtoolkit.org/t/cannot-login-using-medic-account/3022/1 "2023-09-12T04:44:12Z")

</div>

Hi,

I am having a problem for logging in the medic website using medic account, but for the offline accounts and other accounts, It was able to logged in,

so, when we are doing some cht-conf/medic-conf commands, it will not able to continue to compile for the changes.

Other one is when accessing the web app, it turns out to 404 Not Found error ([https://test-flourish.caremin.com/](https://test-flourish.caremin.com/))

Do you have any idea on this one?

Thanks

---

<div class="post-metadata">

**Author:** ![Marcelo\_De\_Guzman](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/marcelo_de_guzman/32/1620_2.png) [@Marcelo\_De\_Guzman](https://forum.communityhealthtoolkit.org/u/Marcelo_De_Guzman)\
**Post date:** [September 12, 2023, 6:38am UTC](https://forum.communityhealthtoolkit.org/t/cannot-login-using-medic-account/3022/2 "2023-09-12T06:38:01Z")

</div>

@diana ,

do you know about this problem?

It was like I am using the web version and after a while it was automatically logged out and when I will log in, it cannot accept anymore, but the offline user can still access,

Is there a possible way to get the couchdb password?

@joykimmel

---

<div class="post-metadata">

**Author:** ![Marcelo\_De\_Guzman](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/marcelo_de_guzman/32/1620_2.png) [@Marcelo\_De\_Guzman](https://forum.communityhealthtoolkit.org/u/Marcelo_De_Guzman)\
**Post date:** [September 12, 2023, 6:48am UTC](https://forum.communityhealthtoolkit.org/t/cannot-login-using-medic-account/3022/3 "2023-09-12T06:48:10Z")

</div>

@diana,

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

We have production and staging web

the production is the @flourish.caremin.com, and the problem is the ECONNREFUSED

and for the staging is the @test-flourish.caremin.com, and the problem is the Invalid JSON Body.,

Please help us on this one,

Thanks and God Bless.

@joykimmel

---

<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:** [September 12, 2023, 6:52am UTC](https://forum.communityhealthtoolkit.org/t/cannot-login-using-medic-account/3022/4 "2023-09-12T06:52:08Z")

</div>

Hi @Marcelo_De_Guzman

> and for the staging is the @test-flourish.caremin.com, and the problem is the Invalid JSON Body.,

My guess here is that either API or CouchDb are down. You should check your container status to see what is going on.

> the production is the @flourish.caremin.com, and the problem is the ECONNREFUSED

My guess here is that nginx is down. Again, please check your containers for logs and errors.

---

<div class="post-metadata">

**Author:** ![Marcelo\_De\_Guzman](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/marcelo_de_guzman/32/1620_2.png) [@Marcelo\_De\_Guzman](https://forum.communityhealthtoolkit.org/u/Marcelo_De_Guzman)\
**Post date:** [September 12, 2023, 6:56am UTC](https://forum.communityhealthtoolkit.org/t/cannot-login-using-medic-account/3022/5 "2023-09-12T06:56:14Z")

</div>

How to check those?

we are really having a hard time on this, maybe more than 4 hrs that we are checking what is the problem.

---

<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:** [September 12, 2023, 6:57am UTC](https://forum.communityhealthtoolkit.org/t/cannot-login-using-medic-account/3022/6 "2023-09-12T06:57:50Z")

</div>

It depends on your setup.  
Can you run `docker ps` ?

---

<div class="post-metadata">

**Author:** ![Marcelo\_De\_Guzman](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/marcelo_de_guzman/32/1620_2.png) [@Marcelo\_De\_Guzman](https://forum.communityhealthtoolkit.org/u/Marcelo_De_Guzman)\
**Post date:** [September 12, 2023, 7:02am UTC](https://forum.communityhealthtoolkit.org/t/cannot-login-using-medic-account/3022/7 "2023-09-12T07:02:51Z")

</div>

This is the staging

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

and this is on the production,

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

---

<div class="post-metadata">

**Author:** ![Marcelo\_De\_Guzman](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/marcelo_de_guzman/32/1620_2.png) [@Marcelo\_De\_Guzman](https://forum.communityhealthtoolkit.org/u/Marcelo_De_Guzman)\
**Post date:** [September 12, 2023, 7:22am UTC](https://forum.communityhealthtoolkit.org/t/cannot-login-using-medic-account/3022/8 "2023-09-12T07:22:59Z")

</div>

This is for the staging (@test-flourish.caremin.com)

Package ‘horticulturalist’:  
Service ‘horticulturalist’:  
Status: Failure  
Up: 6 seconds, Restarts: 55  
Attributes: watched, expected  
Service PID: None, Supervisor PID: 344

Package ‘medic-api’:  
Service ‘medic-api’:  
Status: Failure  
Up: 5 seconds, Restarts: 45  
Attributes: watched, expected  
Service PID: None, Supervisor PID: 387

Package ‘medic-core’:  
Service ‘couchdb’:  
Status: Failure  
Up: 4 seconds, Restarts: 62  
Attributes: watched, expected  
Service PID: None, Supervisor PID: 427  
Service ‘nginx’:  
Status: Up  
Up: 334 seconds, Restarts: 0  
Attributes: watched, running, expected  
Service PID: 517, Supervisor PID: 486  
Service ‘openssh’:  
Status: Up  
Up: 334 seconds, Restarts: 0  
Attributes: watched, running, expected  
Service PID: 567, Supervisor PID: 553

Package ‘medic-couch2pg’:  
Service ‘medic-couch2pg’:  
Status: Failure  
Up: 1 seconds, Restarts: 128  
Attributes: watched, expected  
Service PID: None, Supervisor PID: 591

Package ‘medic-rdbms’:  
Service ‘postgresql’:  
Status: Failure  
Up: 1 seconds, Restarts: 162  
Attributes: watched, expected  
Service PID: None, Supervisor PID: 639

Package ‘medic-sentinel’:  
Service ‘medic-sentinel’:  
Status: Up  
Up: 328 seconds, Restarts: 1  
Attributes: watched, running, expected  
Service PID: 1007, Supervisor PID: 685

Package ‘system-services’:  
Service ‘cron’:  
Status: Up  
Up: 334 seconds, Restarts: 0  
Attributes: watched, running, expected  
Service PID: 747, Supervisor PID: 731  
Service ‘syslog’:  
Status: Up  
Up: 334 seconds, Restarts: 0  
Attributes: watched, running, expected  
Service PID: 775, Supervisor PID: 762

---

<div class="post-metadata">

**Author:** ![Marcelo\_De\_Guzman](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/marcelo_de_guzman/32/1620_2.png) [@Marcelo\_De\_Guzman](https://forum.communityhealthtoolkit.org/u/Marcelo_De_Guzman)\
**Post date:** [September 12, 2023, 7:44am UTC](https://forum.communityhealthtoolkit.org/t/cannot-login-using-medic-account/3022/9 "2023-09-12T07:44:44Z")

</div>

@diana , here is the supervisor-inspect on the @test-flourish.caremin.com,

What do you recommend on this to fix ?

---

<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:** [September 12, 2023, 8:26am UTC](https://forum.communityhealthtoolkit.org/t/cannot-login-using-medic-account/3022/10 "2023-09-12T08:26:15Z")

</div>

Hi @Marcelo_De_Guzman

It seems that you’re running CHT v3.  
To restart services there are a handful of commands that you can use from within the medic-os container: [GitHub - medic/medic-os: A space-efficient Linux-based operating system, designed specifically to run Medic's mHealth platform. This is the build system and source code; Docker images will be available on Medic's website.](https://github.com/medic/medic-os#service-management-scripts)

To inspect logs, there are some guides about how to obtain medic-os app logs here: [AWS Hosting in CHT 3.x | Community Health Toolkit](https://docs.communityhealthtoolkit.org/apps/guides/hosting/3.x/ec2-setup-guide/#troubleshooting)

---

<div class="post-metadata">

**Author:** ![Marcelo\_De\_Guzman](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/marcelo_de_guzman/32/1620_2.png) [@Marcelo\_De\_Guzman](https://forum.communityhealthtoolkit.org/u/Marcelo_De_Guzman)\
**Post date:** [September 12, 2023, 10:55am UTC](https://forum.communityhealthtoolkit.org/t/cannot-login-using-medic-account/3022/11 "2023-09-12T10:55:29Z")

</div>

Thanks, will check this one,

For the production ([flourish.caremin.com](http://flourish.caremin.com)),  
we have an error for this.

 ![image](https://communityhealthtoolkit.b-cdn.net/uploads/default/original/2X/5/56dc120d050adbe3e27b2ac543eddd8243d615e6.jpeg)

What is your recommendation on this one?  
For this one, it was somehow unaccessible anymore and the couchdb password is now incorrect.  
What should I do about this one?  
Is there a process to get the password from couchdb?

---

<div class="post-metadata">

**Author:** ![Marcelo\_De\_Guzman](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/marcelo_de_guzman/32/1620_2.png) [@Marcelo\_De\_Guzman](https://forum.communityhealthtoolkit.org/u/Marcelo_De_Guzman)\
**Post date:** [September 12, 2023, 11:12am UTC](https://forum.communityhealthtoolkit.org/t/cannot-login-using-medic-account/3022/12 "2023-09-12T11:12:44Z")

</div>

Is this also can show where the couchdb password is ?

---

<div class="post-metadata">

**Author:** ![Marcelo\_De\_Guzman](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/marcelo_de_guzman/32/1620_2.png) [@Marcelo\_De\_Guzman](https://forum.communityhealthtoolkit.org/u/Marcelo_De_Guzman)\
**Post date:** [September 12, 2023, 11:24am UTC](https://forum.communityhealthtoolkit.org/t/cannot-login-using-medic-account/3022/13 "2023-09-12T11:24:36Z")

</div>

@diana ,

I found an forum that shows the location of the passwords, and I tried every username and password, but the only one that doesn’t log in was the medic,

do you know why?

---

<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:** [September 12, 2023, 2:55pm UTC](https://forum.communityhealthtoolkit.org/t/cannot-login-using-medic-account/3022/14 "2023-09-12T14:55:58Z")

</div>

> [@Marcelo\_De\_Guzman](#):
>
> Is this also can show where the couchdb password is ?

@Marcelo_De_Guzman  
It would be a pretty serious security issue if couchdb passwords were retrievable or stored in plain text.

> [@Marcelo\_De\_Guzman](#):
>
> Is there a process to get the password from couchdb?

I don’t believe there is. If you have physical access to the instance, you can edit the config file manually. You can find some instructions here: [1.5. Security — Apache CouchDB® 3.3 Documentation](https://docs.couchdb.org/en/stable/intro/security.html#hashing-passwords)

This will overwrite your user’s password!

---

<div class="post-metadata">

**Author:** ![Marcelo\_De\_Guzman](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/marcelo_de_guzman/32/1620_2.png) [@Marcelo\_De\_Guzman](https://forum.communityhealthtoolkit.org/u/Marcelo_De_Guzman)\
**Post date:** [September 12, 2023, 11:14pm UTC](https://forum.communityhealthtoolkit.org/t/cannot-login-using-medic-account/3022/15 "2023-09-12T23:14:43Z")

</div>

@diana,

What if somehow we update our password, what are the files that we need to check and update?

I have this list to check, can you add if I forgot something,

- couch2pg.env
- medic-conf’s (compilation codes)
- docker-compose.yml

Thanks for helping us.

@joykimmel FYI

---

<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:** [September 13, 2023, 3:00am UTC](https://forum.communityhealthtoolkit.org/t/cannot-login-using-medic-account/3022/16 "2023-09-13T03:00:17Z")

</div>

The files to update should be clear from the CouchDb documentation: [3.1. Introduction To Configuring — Apache CouchDB® 3.3 Documentation](https://docs.couchdb.org/en/stable/config/intro.html#configuration-files)

If you can’t find the files in `/etc`, you can also look for them in `/opt/couchdb`.

To be extra clear, look for these files in the `medic-os` container.

---

<div class="post-metadata">

**Author:** ![Marcelo\_De\_Guzman](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/marcelo_de_guzman/32/1620_2.png) [@Marcelo\_De\_Guzman](https://forum.communityhealthtoolkit.org/u/Marcelo_De_Guzman)\
**Post date:** [September 13, 2023, 11:06pm UTC](https://forum.communityhealthtoolkit.org/t/cannot-login-using-medic-account/3022/17 "2023-09-13T23:06:47Z")

</div>

Hi @binod ,

We are having a problem in the medic (CHAMP) right now.  
As of this moment, the medic username is not able to logged in anymore in the app. And this one is like a default account right,? So, from the login, to the backend which is the syncing of couch2pg.env and the medic-conf compilation codes using username and password is also affected.

Can you help me to fix this, it is now day 4 that this is broken.

Thank you very much.

---

<div class="post-metadata">

**Author:** ![Marcelo\_De\_Guzman](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/marcelo_de_guzman/32/1620_2.png) [@Marcelo\_De\_Guzman](https://forum.communityhealthtoolkit.org/u/Marcelo_De_Guzman)\
**Post date:** [September 14, 2023, 12:11am UTC](https://forum.communityhealthtoolkit.org/t/cannot-login-using-medic-account/3022/18 "2023-09-14T00:11:56Z")

</div>

@binod ,

As of now, we have 3 problems.

1. The data is not syncing automatically from couchdb to AWS, so that, when in dbeaver it is not also updated unless, it needs to go to the terminal and login using ssh account, then go to cd /srv/cht-couch2pg and run “docker-compose --env-file couch2pg.env -d”

2. The default medic account is not working anymore when it needs to log in. So, the implication is also for the number 1, which is it needs the credentials of medic account to use for syncing, but as of now it is not working, so, it cannot do the syncing of data.

3. We have an staging website to test first the app and then once the update was approved it should be push to the production. But, right now, when we access the staging website it shows 404 Not Found nginx/1.13.6

by the way, thanks @diana for giving suggestions on fixing it. But, I am not yet good at fixing things this so much more complicated that is why I need more support from the medic team.

Please help us to fix this issue.

Thanks and God Bless.

cc. @joykimmel

---

<div class="post-metadata">

**Author:** ![Marcelo\_De\_Guzman](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/marcelo_de_guzman/32/1620_2.png) [@Marcelo\_De\_Guzman](https://forum.communityhealthtoolkit.org/u/Marcelo_De_Guzman)\
**Post date:** [September 14, 2023, 7:52am UTC](https://forum.communityhealthtoolkit.org/t/cannot-login-using-medic-account/3022/19 "2023-09-14T07:52:23Z")

</div>

Hi @mrjones,

I saw your post in the forum and I think I have the same issue as well, but maybe far more worst.  
As a introduction, we have a production web app that when I log in as medic from the administrator, it was somehow cannot be log in, which is really confusing because I didn’t do anything to update or change the password. It was somehow logged me out of the app intentionally and then once I tried to log in, the app doesn’t want to accept the medic credentials.

this is the solution you gave to someone for recover couchdb\_admin\_password

> [@Recover COUCHDB\_ADMIN\_PASSWORD](https://forum.communityhealthtoolkit.org/t/recover-couchdb-admin-password/1809/2):
>
> @Babacar_Gueye - welcome to to forum! I see this is your first post. Thanks so much for asking your question. Every time the community engages here, the more we we’re able to solve your problem as well as help those who follow with the same problem later. I assume you’re in a [self hosted](https://docs.communityhealthtoolkit.org/apps/guides/hosting/self-hosting/) or [local set](https://docs.communityhealthtoolkit.org/apps/tutorials/local-setup/) up situation, and you don’t know the password to be able to log in to the CHT web GUI as an admin. Please let me know if this isn’t correct! If you haven’t done any customizations, then the pas…

can you help me? I am really struggling about this one.

What is the harm when I will gonna update the medic admin password?  
What are the files that I need to update when I updated the medic admin password?

Thank you very much for the help.

---

<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:** [September 14, 2023, 10:37am UTC](https://forum.communityhealthtoolkit.org/t/cannot-login-using-medic-account/3022/20 "2023-09-14T10:37:05Z")

</div>

Hi @Marcelo_De_Guzman

Did you try to login into your `medic-os` container to check if you can find the CouchDb configuration files?

On the other hand, couch2pg doesn’t need an admin account to sync, so you can configure it to use any other online user account, if you have one available.  
That said, you should definitely change your CouchDb admin account password, you will need that to update upload configuration.

[Next page](https://forum.communityhealthtoolkit.org/t/cannot-login-using-medic-account/3022.md?page=2)
