Community Health Toolkit

Upgrading CHT Core from 3.6.0 to 3.9.0 using medic-OS

Trying to upgrade to CHT 3.9.0 from 3.6.0, using this guide (cht-infrastructure/3.9_CHT_Upgrade.md at master · medic/cht-infrastructure · GitHub). After going through the process(attached link), when i check the admin panel I can see an upgrade has been initiated but instead of 3.9.0 i can see 3.2.1 (see attached screenshot). Also it has already taken 18 hours with no success. What could be the issue.
Also does the number of docs also affect how long the upgrade will take?

Hi @waok2 ,
Kindly share what the tail of horticulturalist logs at /srv/storage/horticulturalist/log/horticulturalist.log say. Also please make sure you installed new packages in step 5 of the guide you quoted.

Thanks,
yeah i went through step five, below are the logs requested

2021-06-25T06:03:27.091Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:03:27.091Z horti:debug _design/:staged:medic-sms [3%]
2021-06-25T06:03:37.409Z horti:debug View indexer progress
2021-06-25T06:03:37.409Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:03:37.409Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:03:37.409Z horti:debug _design/:staged:medic-sms [3%]
2021-06-25T06:03:47.838Z horti:debug View indexer progress
2021-06-25T06:03:47.838Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:03:47.838Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:03:47.838Z horti:debug _design/:staged:medic-sms [3%]
2021-06-25T06:03:58.176Z horti:debug View indexer progress
2021-06-25T06:03:58.176Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:03:58.177Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:03:58.177Z horti:debug _design/:staged:medic-sms [3%]
2021-06-25T06:04:08.582Z horti:debug View indexer progress
2021-06-25T06:04:08.582Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:04:08.582Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:04:08.582Z horti:debug _design/:staged:medic-sms [3%]
2021-06-25T06:04:18.926Z horti:debug View indexer progress
2021-06-25T06:04:18.926Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:04:18.926Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:04:18.926Z horti:debug _design/:staged:medic-sms [3%]
2021-06-25T06:04:29.283Z horti:debug View indexer progress
2021-06-25T06:04:29.283Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:04:29.283Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:04:29.283Z horti:debug _design/:staged:medic-sms [3%]
2021-06-25T06:04:39.621Z horti:debug View indexer progress
2021-06-25T06:04:39.621Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:04:39.621Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:04:39.621Z horti:debug _design/:staged:medic-sms [3%]
2021-06-25T06:04:49.975Z horti:debug View indexer progress
2021-06-25T06:04:49.976Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:04:49.976Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:04:49.976Z horti:debug _design/:staged:medic-sms [3%]
2021-06-25T06:05:00.329Z horti:debug View indexer progress
2021-06-25T06:05:00.329Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:05:00.329Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:05:00.329Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:05:10.727Z horti:debug View indexer progress
2021-06-25T06:05:10.727Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:05:10.727Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:05:10.727Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:05:21.253Z horti:debug View indexer progress
2021-06-25T06:05:21.253Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:05:21.253Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:05:21.253Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:05:31.635Z horti:debug View indexer progress
2021-06-25T06:05:31.635Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:05:31.635Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:05:31.635Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:05:42.145Z horti:debug View indexer progress
2021-06-25T06:05:42.145Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:05:42.145Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:05:42.145Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:05:52.558Z horti:debug View indexer progress
2021-06-25T06:05:52.558Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:05:52.558Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:05:52.558Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:06:02.971Z horti:debug View indexer progress
2021-06-25T06:06:02.971Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:06:02.971Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:06:02.971Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:06:13.397Z horti:debug View indexer progress
2021-06-25T06:06:13.397Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:06:13.397Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:06:13.397Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:06:23.774Z horti:debug View indexer progress
2021-06-25T06:06:23.774Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:06:23.774Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:06:23.774Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:06:34.234Z horti:debug View indexer progress
2021-06-25T06:06:34.234Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:06:34.234Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:06:34.234Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:06:44.624Z horti:debug View indexer progress
2021-06-25T06:06:44.624Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:06:44.624Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:06:44.624Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:06:55.094Z horti:debug View indexer progress
2021-06-25T06:06:55.094Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:06:55.094Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:06:55.094Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:07:05.546Z horti:debug View indexer progress
2021-06-25T06:07:05.546Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:07:05.546Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:07:05.546Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:07:15.903Z horti:debug View indexer progress
2021-06-25T06:07:15.903Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:07:15.903Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:07:15.903Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:07:26.230Z horti:debug View indexer progress
2021-06-25T06:07:26.230Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:07:26.230Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:07:26.230Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:07:36.578Z horti:debug View indexer progress
2021-06-25T06:07:36.578Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:07:36.578Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:07:36.578Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:07:47.043Z horti:debug View indexer progress
2021-06-25T06:07:47.043Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:07:47.043Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:07:47.043Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:07:57.457Z horti:debug View indexer progress
2021-06-25T06:07:57.457Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:07:57.457Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:07:57.457Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:08:07.872Z horti:debug View indexer progress
2021-06-25T06:08:07.872Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:08:07.872Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:08:07.872Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:08:18.334Z horti:debug View indexer progress
2021-06-25T06:08:18.334Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:08:18.334Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:08:18.334Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:08:28.695Z horti:debug View indexer progress
2021-06-25T06:08:28.695Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:08:28.695Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:08:28.695Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:08:39.184Z horti:debug View indexer progress
2021-06-25T06:08:39.184Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:08:39.184Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:08:39.184Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:08:49.563Z horti:debug View indexer progress
2021-06-25T06:08:49.563Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:08:49.563Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:08:49.563Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:09:00.062Z horti:debug View indexer progress
2021-06-25T06:09:00.062Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:09:00.062Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:09:00.062Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:09:10.374Z horti:debug View indexer progress
2021-06-25T06:09:10.374Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:09:10.374Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:09:10.374Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:09:20.772Z horti:debug View indexer progress
2021-06-25T06:09:20.772Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:09:20.772Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:09:20.772Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:09:31.258Z horti:debug View indexer progress
2021-06-25T06:09:31.258Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:09:31.258Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:09:31.258Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:09:41.621Z horti:debug View indexer progress
2021-06-25T06:09:41.621Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:09:41.621Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:09:41.621Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:09:52.021Z horti:debug View indexer progress
2021-06-25T06:09:52.021Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:09:52.021Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:09:52.021Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:10:02.381Z horti:debug View indexer progress
2021-06-25T06:10:02.381Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:10:02.381Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:10:02.381Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:10:12.834Z horti:debug View indexer progress
2021-06-25T06:10:12.834Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:10:12.834Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:10:12.834Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:10:23.130Z horti:debug View indexer progress
2021-06-25T06:10:23.130Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:10:23.130Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:10:23.130Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:10:33.452Z horti:debug View indexer progress
2021-06-25T06:10:33.452Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:10:33.452Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:10:33.452Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:10:43.939Z horti:debug View indexer progress
2021-06-25T06:10:43.939Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:10:43.939Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:10:43.939Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:10:54.447Z horti:debug View indexer progress
2021-06-25T06:10:54.447Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:10:54.447Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:10:54.447Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:11:04.780Z horti:debug View indexer progress
2021-06-25T06:11:04.780Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:11:04.780Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:11:04.780Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:11:15.149Z horti:debug View indexer progress
2021-06-25T06:11:15.149Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:11:15.149Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:11:15.149Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:11:25.533Z horti:debug View indexer progress
2021-06-25T06:11:25.533Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:11:25.533Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:11:25.533Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:11:35.975Z horti:debug View indexer progress
2021-06-25T06:11:35.975Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:11:35.975Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:11:35.975Z horti:debug _design/:staged:medic-sms [4%]
2021-06-25T06:11:46.293Z horti:debug View indexer progress
2021-06-25T06:11:46.293Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:11:46.293Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:11:46.293Z horti:debug _design/:staged:medic-sms [5%]
2021-06-25T06:11:56.699Z horti:debug View indexer progress
2021-06-25T06:11:56.699Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:11:56.699Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:11:56.699Z horti:debug _design/:staged:medic-sms [5%]
2021-06-25T06:12:07.056Z horti:debug View indexer progress
2021-06-25T06:12:07.056Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:12:07.056Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:12:07.056Z horti:debug _design/:staged:medic-sms [5%]
2021-06-25T06:12:17.423Z horti:debug View indexer progress
2021-06-25T06:12:17.423Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:12:17.423Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:12:17.423Z horti:debug _design/:staged:medic-sms [5%]
2021-06-25T06:12:27.775Z horti:debug View indexer progress
2021-06-25T06:12:27.776Z horti:debug _design/:staged:medic [0%]
2021-06-25T06:12:27.776Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T06:12:27.776Z horti:debug _design/:staged:medic-sms [5%]

I also found this error on the logs

2021-06-25T02:24:33.849Z horti:debug View indexer progress
2021-06-25T02:24:33.849Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T02:24:33.849Z horti:debug _design/:staged:medic-sms [9%]
2021-06-25T02:24:33.849Z horti:debug _design/:staged:medic [0%]
FATAL
{ FetchError: invalid json response body at http://localhost:5984/medic/_design/:staged:medic/_view/contacts_by_depth?limit=1 reason: Unexpected token < in JSON at position 0
at /srv/software/horticulturalist/node_modules/node-fetch/lib/index.js:241:32
at
at process._tickCallback (internal/process/next_tick.js:188:7)
message: ‘invalid json response body at http://localhost:5984/medic/_design/:staged:medic/_view/contacts_by_depth?limit=1 reason: Unexpected token < in JSON at position 0’,
type: ‘invalid-json’ }
[2021-06-25 02:24:47] Starting Horticulturalist 0.12.7 daemon in Medic OS mode
2021-06-25T02:24:47.352Z horti:debug Running pre-boot checks
2021-06-25T02:24:47.505Z horti:debug Pre-boot checks OK
[2021-06-25 02:24:47] Doing install to medic:medic:3.2.1
2021-06-25T02:24:47.551Z horti:debug Bootstrapping upgrade doc
2021-06-25T02:24:48.017Z horti:stage Horticulturalist deployment of ‘medic:medic:3.2.1’ initialising
[2021-06-25 02:24:48] Deploying new build: medic:medic:3.2.1
2021-06-25T02:24:48.362Z horti:stage Pre-deploy cleanup
2021-06-25T02:24:48.672Z horti:debug Clear existing staged DBs
2021-06-25T02:24:48.778Z horti:debug Deleting staged ddocs: ["_design/:staged:medic","_design/:staged:medic-admin","_design/:staged:medic-client","_design/:staged:medic-conflicts","_design/:staged:medic-scripts","_design/:staged:medic-sms"]
2021-06-25T02:24:49.184Z horti:debug Starting compact and view cleanup
2021-06-25T05:36:47.586Z horti:stage Downloading and staging install
2021-06-25T05:36:47.797Z horti:debug Downloading medic:medic:3.2.1, this may take some time…
2021-06-25T05:36:52.708Z horti:debug Got medic:medic:3.2.1, staging
2021-06-25T05:37:00.671Z horti:debug Staged as _design/:staged:medic
2021-06-25T05:37:00.672Z horti:stage Extracting ddocs
2021-06-25T05:37:00.802Z horti:debug Storing staged: ["_design/:staged:medic-admin","_design/:staged:medic-client","_design/:staged:medic-conflicts","_design/:staged:medic-scripts","_design/:staged:medic-sms","_design/:staged:medic"]
2021-06-25T05:37:15.123Z horti:stage Warming views
2021-06-25T05:37:15.205Z horti:debug Got 6 staged ddocs
[2021-06-25 05:37:15] Beginning view warming
2021-06-25T05:37:25.281Z horti:debug View indexer progress
2021-06-25T05:37:25.281Z horti:debug _design/:staged:medic [0%]
2021-06-25T05:37:25.282Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T05:37:25.282Z horti:debug _design/:staged:medic-sms [0%]
2021-06-25T05:37:35.875Z horti:debug View indexer progress
2021-06-25T05:37:35.875Z horti:debug _design/:staged:medic [0%]
2021-06-25T05:37:35.875Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T05:37:35.875Z horti:debug _design/:staged:medic-sms [0%]
2021-06-25T05:37:46.167Z horti:debug View indexer progress
2021-06-25T05:37:46.167Z horti:debug _design/:staged:medic [0%]
2021-06-25T05:37:46.167Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T05:37:46.167Z horti:debug _design/:staged:medic-sms [0%]
2021-06-25T05:37:56.506Z horti:debug View indexer progress
2021-06-25T05:37:56.506Z horti:debug _design/:staged:medic [0%]
2021-06-25T05:37:56.506Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T05:37:56.506Z horti:debug _design/:staged:medic-sms [0%]
2021-06-25T05:38:06.823Z horti:debug View indexer progress
2021-06-25T05:38:06.823Z horti:debug _design/:staged:medic [0%]
2021-06-25T05:38:06.823Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T05:38:06.823Z horti:debug _design/:staged:medic-sms [0%]
2021-06-25T05:38:17.167Z horti:debug View indexer progress
2021-06-25T05:38:17.167Z horti:debug _design/:staged:medic [0%]
2021-06-25T05:38:17.167Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T05:38:17.167Z horti:debug _design/:staged:medic-sms [0%]
2021-06-25T05:38:27.494Z horti:debug View indexer progress
2021-06-25T05:38:27.494Z horti:debug _design/:staged:medic [0%]
2021-06-25T05:38:27.494Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T05:38:27.494Z horti:debug _design/:staged:medic-sms [0%]
2021-06-25T05:38:38.073Z horti:debug View indexer progress
2021-06-25T05:38:38.073Z horti:debug _design/:staged:medic [0%]
2021-06-25T05:38:38.073Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T05:38:38.073Z horti:debug _design/:staged:medic-sms [0%]
2021-06-25T05:38:48.373Z horti:debug View indexer progress
2021-06-25T05:38:48.373Z horti:debug _design/:staged:medic [0%]
2021-06-25T05:38:48.373Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T05:38:48.373Z horti:debug _design/:staged:medic-sms [0%]
2021-06-25T05:38:58.725Z horti:debug View indexer progress
2021-06-25T05:38:58.725Z horti:debug _design/:staged:medic [0%]
2021-06-25T05:38:58.725Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T05:38:58.725Z horti:debug _design/:staged:medic-sms [0%]
2021-06-25T05:39:09.093Z horti:debug View indexer progress
2021-06-25T05:39:09.093Z horti:debug _design/:staged:medic [0%]
2021-06-25T05:39:09.093Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T05:39:09.093Z horti:debug _design/:staged:medic-sms [0%]
2021-06-25T05:39:19.598Z horti:debug View indexer progress
2021-06-25T05:39:19.598Z horti:debug _design/:staged:medic [0%]
2021-06-25T05:39:19.598Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T05:39:19.598Z horti:debug _design/:staged:medic-sms [0%]
2021-06-25T05:39:30.012Z horti:debug View indexer progress
2021-06-25T05:39:30.012Z horti:debug _design/:staged:medic [0%]
2021-06-25T05:39:30.012Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T05:39:30.012Z horti:debug _design/:staged:medic-sms [0%]
2021-06-25T05:39:40.365Z horti:debug View indexer progress
2021-06-25T05:39:40.365Z horti:debug _design/:staged:medic [0%]
2021-06-25T05:39:40.365Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T05:39:40.365Z horti:debug _design/:staged:medic-sms [0%]
2021-06-25T05:39:50.755Z horti:debug View indexer progress
2021-06-25T05:39:50.755Z horti:debug _design/:staged:medic [0%]
2021-06-25T05:39:50.755Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T05:39:50.755Z horti:debug _design/:staged:medic-sms [0%]
2021-06-25T05:40:01.138Z horti:debug View indexer progress
2021-06-25T05:40:01.138Z horti:debug _design/:staged:medic [0%]
2021-06-25T05:40:01.138Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T05:40:01.138Z horti:debug _design/:staged:medic-sms [0%]
2021-06-25T05:40:11.518Z horti:debug View indexer progress
2021-06-25T05:40:11.518Z horti:debug _design/:staged:medic [0%]
2021-06-25T05:40:11.518Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T05:40:11.518Z horti:debug _design/:staged:medic-sms [0%]
2021-06-25T05:40:21.865Z horti:debug View indexer progress
2021-06-25T05:40:21.865Z horti:debug _design/:staged:medic [0%]
2021-06-25T05:40:21.865Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T05:40:21.866Z horti:debug _design/:staged:medic-sms [0%]
2021-06-25T05:40:32.154Z horti:debug View indexer progress
2021-06-25T05:40:32.154Z horti:debug _design/:staged:medic [0%]
2021-06-25T05:40:32.154Z horti:debug _design/:staged:medic-client [0%]
2021-06-25T05:40:32.154Z horti:debug _design/:staged:medic-sms [0%]
2021-06-25T05:40:42.506Z horti:debug View indexer progress
2021-06-25T05:40:42.506Z horti:debug _design/:staged:medic [0%]

So the instance is currently warming views. And it indeed installed 3.2.1 which is strange. I have a hunch that you probably skipped step 4 or you selected the wrong version to upgrade to. Please share the contents of /srv/scripts/horticulturalist/postrun/horticulturalist . For now, You have to wait till the view warming is done. Ensure that you follow the steps and upgrade through the web view.

thanks, (for step 4 i did as instructed (this is after updating the docker-compose file and building the container a new )
this is the contents of /srv/scripts/horticulturalist/postrun/horticulturalist

#!/bin/sh

source ‘/boot/include/utility’
source ‘/boot/include/logger’

bootstrap()
{
local self="realpath "$0""
local base="dirname -- "$self""

source “$base/…/env” &&
merge_environment /srv || return 255

If bootstrapping is already done, do nothing

if [ -f “$BOOTSTRAP_COMPLETE_FILE” ]; then
info “Horticulturalist has already bootstrapped”
return 0
fi

If bootstrapping is already disabled, do nothing

if [ “$DOCKER_HORTI_BOOTSTRAP_DISABLED” ]; then
warn “Horticulturalist bootstraping is disabled”
return 0
fi

wait_for_file “$COUCH_PASSWD_FILE” &&
local passwd="cat "$COUCH_PASSWD_FILE"" &&

source “$base/…/…/medic-core/env” &&
merge_environment /srv ‘path-only’ &&

info ‘Horticulturalist is now bootstrapping’ &&

export COUCH_NODE_NAME=‘couchdb@127.0.0.1’ &&
export COUCH_URL=“http://${PACKAGE_NAME}:${passwd}@localhost:5984/medic” &&

local script=“src/index.js” &&
local run_cmd="’which node’ ‘$script’ --medic-os --install=3.2.1 --no-daemon" &&

if [ “$DOCKER_HORTI_BOOTSTRAP” ]; then
run_cmd="$run_cmd=’$DOCKER_HORTI_BOOTSTRAP’"
info “Horticulturalist is bootstrapping to ‘$DOCKER_HORTI_BOOTSTRAP’”
fi

local command_line=“cd ‘$PACKAGE_SOFTWARE’ && exec $run_cmd” &&

su -c “$command_line” “$HORTICULTURALIST_USER”
>> “$PACKAGE_STORAGE/logs/horticulturalist.log” 2>&1 &&

touch “$BOOTSTRAP_COMPLETE_FILE” &&
info ‘Horticulturalist bootstrapping complete’
}

bootstrap “$@”
exit “$?”

Indeed you did not run the steps as seen. The script has version 3.2.1 . Once view warming is done. Please run the steps listed and ensure that you have a new version of this script. Then do an upgrade. Step 4 output may not allow you to run step 5, you will need to open a new terminal to execute it. If you follow the steps diligently that file should look like the one below.

#!/bin/sh

source '/boot/include/utility'
source '/boot/include/logger'

bootstrap()
{
  local self="`realpath "$0"`"
  local base="`dirname -- "$self"`"

  source "$base/../env" &&
  merge_environment /srv || return 255

  # If bootstrapping is already done, do nothing
  if [ -f "$BOOTSTRAP_COMPLETE_FILE" ]; then
    info "Horticulturalist has already bootstrapped"
    return 0
  fi

  # If bootstrapping is already disabled, do nothing
  if [ "$DOCKER_HORTI_BOOTSTRAP_DISABLED" ]; then
    warn "Horticulturalist bootstraping is disabled"
    return 0
  fi

  wait_for_file "$COUCH_PASSWD_FILE" &&
  local passwd="`cat "$COUCH_PASSWD_FILE"`" &&
  \
  source "$base/../../medic-core/env" &&
  merge_environment /srv 'path-only' &&
  \
  info 'Horticulturalist is now bootstrapping' &&
  \
  export COUCH_NODE_NAME='couchdb@127.0.0.1' &&
  export COUCH_URL="http://${PACKAGE_NAME}:${passwd}@$DOCKER_NETWORK_NAME:5984/medic" &&
  \

  local script="src/index.js" &&
  local run_cmd="'`which node`' '$script' --medic-os --complete-install --no-daemon" &&

  \
  if [ "$DOCKER_HORTI_BOOTSTRAP" ]; then
    run_cmd="$run_cmd='$DOCKER_HORTI_BOOTSTRAP'"
    info "Horticulturalist is bootstrapping to '$DOCKER_HORTI_BOOTSTRAP'"
  fi
  \
  local command_line="cd '$PACKAGE_SOFTWARE' && exec $run_cmd" &&
  \
  su -c "$command_line" "$HORTICULTURALIST_USER" \
    >> "$PACKAGE_STORAGE/logs/horticulturalist.log" 2>&1 &&
  \
  touch "$BOOTSTRAP_COMPLETE_FILE" &&
  info 'Horticulturalist bootstrapping complete'
}

bootstrap "$@"
exit "$?"

this is actually the second attempt(staging instance) going through the steps, I will do it once more with this in mind,
Thank you

Hi, i started the process a new from a snapshot, went through the steps one by one confirming ,
from horticulturalist/logs i get this error

FATAL
Error: Cannot locate app db
at dbs.app.info.catch (/srv/software/horticulturalist/node_modules/horticulturalist/src/checks.js:4:62)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
[2021-06-25 08:43:08] Starting Horticulturalist 0.13.1 daemon in Medic OS mode
2021-06-25T08:43:08.299Z horti:debug Running pre-boot checks
FATAL
Error: Cannot locate app db
at dbs.app.info.catch (/srv/software/horticulturalist/node_modules/horticulturalist/src/checks.js:4:62)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
[2021-06-25 08:43:13] Starting Horticulturalist 0.13.1 daemon in Medic OS mode
2021-06-25T08:43:13.784Z horti:debug Running pre-boot checks
FATAL
Error: Cannot locate app db
at dbs.app.info.catch (/srv/software/horticulturalist/node_modules/horticulturalist/src/checks.js:4:62)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
[2021-06-25 08:43:19] Starting Horticulturalist 0.13.1 daemon in Medic OS mode
2021-06-25T08:43:19.228Z horti:debug Running pre-boot checks

Session terminated, terminating shell… …terminated.

Couchdb is down. Please ensure that CouchDB is running. You can do that by running /boot/svc-restart medic-core couchdb inside the container

did that , though no change;

found out the problem is the connection to the database, still looking on how i can solve this(this could be from the medic-os docker compose file) (logs are UTC/GMT +0)

ap.afterConnect [as oncomplete] (net.js:1186:14)’,
[2021-06-25 08:39:38] [message]: ‘connect ECONNREFUSED 127.0.0.1:5984’,
[2021-06-25 08:39:38] code: ‘ECONNREFUSED’,
[2021-06-25 08:39:38] errno: ‘ECONNREFUSED’,
[2021-06-25 08:39:38] syscall: ‘connect’,
[2021-06-25 08:39:38] address: ‘127.0.0.1’,
[2021-06-25 08:39:38] port: 5984 }
[2021-06-25 08:39:40] Node Environment Options: ‘–max_old_space_size=20000’
[2021-06-25 08:39:40] Node Version: 8.11.4 in production mode
[2021-06-25 08:39:40] 2021-06-25 08:39:40 ERROR: UNCAUGHT EXCEPTION!
[2021-06-25 08:39:40] 2021-06-25 08:39:40 ERROR: Error: { Error: connect ECONNREFUSED 127.0.0.1:5984
[2021-06-25 08:39:40] at Object._errnoException (util.js:992:11)
[2021-06-25 08:39:40] at _exceptionWithHostPort (util.js:1014:20)
[2021-06-25 08:39:40] at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1186:14)
[2021-06-25 08:39:40] [stack]: ‘Error: connect ECONNREFUSED 127.0.0.1:5984\n at Object._errnoException (util.js:992:11)\n at _exceptionWithHostPort (util.js:1014:20)\n at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1186:14)’,
[2021-06-25 08:39:40] [message]: ‘connect ECONNREFUSED 127.0.0.1:5984’,
[2021-06-25 08:39:40] code: ‘ECONNREFUSED’,
[2021-06-25 08:39:40] errno: ‘ECONNREFUSED’,
[2021-06-25 08:39:40] syscall: ‘connect’,
[2021-06-25 08:39:40] address: ‘127.0.0.1’,
[2021-06-25 08:39:40] port: 5984 }
[2021-06-25 08:39:42] Node Environment Options: ‘–max_old_space_size=20000’
[2021-06-25 08:39:42] Node Version: 8.11.4 in production mode
[2021-06-25 08:39:42] 2021-06-25 08:39:42 ERROR: UNCAUGHT EXCEPTION!
[2021-06-25 08:39:42] 2021-06-25 08:39:42 ERROR: Error: { Error: connect ECONNREFUSED 127.0.0.1:5984
[2021-06-25 08:39:42] at Object._errnoException (util.js:992:11)
[2021-06-25 08:39:42] at _exceptionWithHostPort (util.js:1014:20)
[2021-06-25 08:39:42] at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1186:14)
[2021-06-25 08:39:42] [stack]: ‘Error: connect ECONNREFUSED 127.0.0.1:5984\n at Object._errnoException (util.js:992:11)\n at _exceptionWithHostPort (util.js:1014:20)\n at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1186:14)’,
[2021-06-25 08:39:42] [message]: ‘connect ECONNREFUSED 127.0.0.1:5984’,
[2021-06-25 08:39:42] code: ‘ECONNREFUSED’,
[2021-06-25 08:39:42] errno: ‘ECONNREFUSED’,
[2021-06-25 08:39:42] syscall: ‘connect’,
[2021-06-25 08:39:42] address: ‘127.0.0.1’,
[2021-06-25 08:39:42] port: 5984 }
root@medic-os:/srv/storage/medic-api/logs#

Please ensure that the haproxy container is running through docker ps Alternatively restart all processes by running docker-compose down then docker-compose up -d

none seems to solve this

Not sure what this means, unfortunately. Are you running this in the container?

yeah, it is a container, (using medic-os compose file)

Let me try to detail the steps you need to run.
First, you need to ensure that you have updated your docker-compose file with the latest 3.9 image medicmobile/medic-os:cht-3.9.0-rc.2

Then follow these steps:

  1. Log into the medic-os container
docker exec -it medic-os /bin/bash
  1. Stop all services
/boot/svc-stop medic-core nginx openssh && /boot/svc-stop medic-sentinel && /boot/svc-stop medic-couch2pg && /boot/svc-stop medic-rdbms && /boot/svc-stop horticulturalist && /boot/svc-stop medic-api && /boot/svc-stop medic-core couchdb && rm -rf /srv/storage/horticulturalist/.horticulturalist.lock
  1. Download a new version of horticulculatist. This is the most crucial step.
/boot/package-remove horticulturalist && /boot/package-install /mnt/startup/packages/horticulturalist-v01260-x64.vpkg
  1. Stop Horticulturalist ( the previous step will auto-start it) . You need to open a new terminal to your container as detailed in step 1
/boot/svc-stop horticulturalist
  1. Update the script to allow updates through the API.
sed -i 's/--install=3.9.0/--complete-install/g' /srv/scripts/horticulturalist/postrun/horticulturalist
  1. Update the medic-core scripts
/boot/package-remove medic-core && /boot/package-install /mnt/startup/packages/medic-core-v30000-x64.vpkg
  1. Start all services

/boot/svc-start medic-core couchdb && /boot/svc-start medic-api && /boot/svc-start medic-sentinel && /boot/svc-start horticulturalist
1 Like

Got unblocked on this, i was using the wrong docker image for haproxy , please use (https://raw.githubusercontent.com/medic/cht-core/master/docker-compose.yml).

2 Likes