msupply-foundation / open-msupply

Open mSupply represents our most recent advancement in the Logistics Management Information System (LMIS), expanding on more than two decades of development inherited from the well-established legacy of the original mSupply.
https://msupply.foundation/open-msupply/
Other
23 stars 14 forks source link

Windows service - postgres version fails silently (troubleshoot installer postgres checks) #4718

Open mark-prins opened 2 months ago

mark-prins commented 2 months ago

What went wrong? 😲

If the postgres binaries cannot be found, then the postgres version of the windows service will fail to start, with no exception added to the windows event log, and no entry in the open mSupply log.

The path of the postgres binaries needs to be added to the path environment variable - but how to know this?

Expected behaviour 🤔

Starting at line 4517 in omsupply_server.suf we check for installed versions of postgres, and add the binpath and libpath to the environment variables if they don't exist. This doesn't appear to be working anymore.. some investigation is required here

It would be good if the service notified of an error when starting - can we also investigate if this is possible too?

How to Reproduce 🔨

Steps to reproduce the behaviour:

  1. On a windows server, install the postgres version
  2. Check that the path environment variable doesn't have the postgres bin path
  3. Start service - it should stop, with the omsupply binary panicking

Your environment 🌱

lache-melvin commented 2 months ago

Setting as high, if we can't start the service, we really want as much troubleshooting info as possible... ideally adding the lib/bin paths would still work too though 🙈

andreievg commented 2 months ago

Candidate for common support queries.

We install central servers just once and by our support so not very likely to cause wide spread problem, thus can post pone to Refactor fortnight