Grafana-server not starting (DB Migrations)

On Windows, I used to just click on grafana-server.exe and it would start with a nice console output.

It’s been awhile since I’ve had to startup grafana, and I’m not exactly sure what has changed, but now when I click grafana-server.exe, the console window flashes and then closes itself.

Judging by the log, it is having trouble with DB Migrations:

logger=settings t=2024-08-01T16:57:43.1694182+02:00 level=info msg="Starting Grafana" version=10.3.1 commit=00a22ff8b28550d593ec369ba3da1b25780f0a4a branch=HEAD compiled=2024-01-23T02:25:31+01:00
logger=settings t=2024-08-01T16:57:43.1694182+02:00 level=info msg="Config loaded from" file=C:\Users\rloh\grafana-v10.3.1/conf/defaults.ini
logger=settings t=2024-08-01T16:57:43.1704031+02:00 level=info msg=Target target=[all]
logger=settings t=2024-08-01T16:57:43.1704031+02:00 level=info msg="Path Home" path=C:\Users\rloh\grafana-v10.3.1
logger=settings t=2024-08-01T16:57:43.1704031+02:00 level=info msg="Path Data" path=C:\Users\rloh\grafana-v10.3.1\data
logger=settings t=2024-08-01T16:57:43.1704031+02:00 level=info msg="Path Logs" path=C:\Users\rloh\grafana-v10.3.1\data\log
logger=settings t=2024-08-01T16:57:43.1704031+02:00 level=info msg="Path Plugins" path=C:\Users\rloh\grafana-v10.3.1\data\plugins
logger=settings t=2024-08-01T16:57:43.1704031+02:00 level=info msg="Path Provisioning" path=C:\Users\rloh\grafana-v10.3.1\conf\provisioning
logger=settings t=2024-08-01T16:57:43.1704031+02:00 level=info msg="App mode production"
logger=sqlstore t=2024-08-01T16:57:43.1704031+02:00 level=info msg="Connecting to DB" dbtype=postgres
logger=migrator t=2024-08-01T16:57:43.1714214+02:00 level=info msg="Starting DB migrations"
logger=settings t=2024-08-01T16:57:44.0289024+02:00 level=info msg="Starting Grafana" version=10.3.1 commit=00a22ff8b28550d593ec369ba3da1b25780f0a4a branch=HEAD compiled=2024-01-23T02:25:31+01:00
logger=settings t=2024-08-01T16:57:44.0294229+02:00 level=info msg="Config loaded from" file=C:\Users\rloh\grafana-v10.3.1/conf/defaults.ini
logger=settings t=2024-08-01T16:57:44.0294229+02:00 level=info msg=Target target=[all]
logger=settings t=2024-08-01T16:57:44.0294229+02:00 level=info msg="Path Home" path=C:\Users\rloh\grafana-v10.3.1
logger=settings t=2024-08-01T16:57:44.0294229+02:00 level=info msg="Path Data" path=C:\Users\rloh\grafana-v10.3.1\data
logger=settings t=2024-08-01T16:57:44.0294229+02:00 level=info msg="Path Logs" path=C:\Users\rloh\grafana-v10.3.1\data\log
logger=settings t=2024-08-01T16:57:44.0294229+02:00 level=info msg="Path Plugins" path=C:\Users\rloh\grafana-v10.3.1\data\plugins
logger=settings t=2024-08-01T16:57:44.029943+02:00 level=info msg="Path Provisioning" path=C:\Users\rloh\grafana-v10.3.1\conf\provisioning
logger=settings t=2024-08-01T16:57:44.029943+02:00 level=info msg="App mode production"
logger=sqlstore t=2024-08-01T16:57:44.029943+02:00 level=info msg="Connecting to DB" dbtype=postgres
logger=migrator t=2024-08-01T16:57:44.0304674+02:00 level=info msg="Starting DB migrations"
...

I’ve checked that the connection in the “Database” section in defaults.ini is correct. What else could this be?

Thanks for the tip…

Error: ✗ failed to check table existence: dial tcp [::1]:5432: connectex: No connection could be made because the target machine actively refused it.