Closed rbrowning85 closed 2 weeks ago
I would probably check to make sure the database has the correct user record (and also sources). I use this https://sqlitebrowser.org/. It's possible that your docker setup may not have had the database saved anywhere?
Thanks. I will check tonight. I just used the Unraid app template from IBRACORP.
So you are correct. It appears that the database file isn't being created or saved anywhere. I added a db path to my docker, but I'm not sure how to create the database.
It should create a database file on boot if the file does not exist.
It does not appear to be creating the database file. Here is a copy of the logs. Each time I restart the container, it prompts me to create a new user.
time="2024-08-26T22:33:06-04:00" level=info msg="172.17.0.1 - db7aec5b05dc [26/Aug/2024:22:33:06 -0400] \"POST /api/secure/query\" 200 26 \"http://192.168.0.83:9090/web/dashboard\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36\" (1ms)" clientIP=172.17.0.1 hostname=db7aec5b05dc latency=1 method=POST path=/api/secure/query referer="http://192.168.0.83:9090/web/dashboard" respLength=26 statusCode=200 type=web userAgent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"
2024/08/26 22:33:00 /go/src/github.com/fastenhealth/fasten-onprem/backend/pkg/database/gorm_common.go:1011 record not found
[0.147ms] [rows:0] SELECT * FROM fhir_patient
WHERE fhir_patient
.user_id
= "5e895ed9-8672-441b-af12-5db5b2bb63a0" AND fhir_patient
.source_id
= "3a3fc8f9-b4db-4081-af88-483bb2d20982" AND fhir_patient
.source_resource_type
= "Patient" ORDER BY fhir_patient
.id
LIMIT 1
time="2024-08-26T22:33:06-04:00" level=info msg="172.17.0.1 - db7aec5b05dc [26/Aug/2024:22:33:06 -0400] \"POST /api/secure/query\" 200 26 \"http://192.168.0.83:9090/web/dashboard\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36\" (2ms)" clientIP=172.17.0.1 hostname=db7aec5b05dc latency=2 method=POST path=/api/secure/query referer="http://192.168.0.83:9090/web/dashboard" respLength=26 statusCode=200 type=web userAgent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"
Just to check, you've got /opt/fasten/db
mapped to a volume outside of the container?
Good catch. My mistake. I had /fasten/db mapped, not /opt/fasten/db... It created the database file. I will continue to play with the app tonight after work to make sure everything is working. I appreciate the help and the quick feedback.
Hey @rbrowning85 it sounds like @dwradcliffe was able to help you with this issue, I'm going to close it :)
Contact Details
What happened?
I performed an update to the pull the newest docker container. When I tried to log back in, it had lost my user account, so i created a new one. However, I keep getting the error shown in the logs. (Note: I redacted the username and IP address)
Flavor
Docker
Version
main
Relevant log output