Error running app on windows server 2022

Hello all. I am trying to run the anvil-app-server on windows server (not as root), but getting this error.

(venv) C:\Anvil>anvil-app-server --app CustomBusinessApp
Found Anvil App Server JAR in package directory
Failed to start built-in Postgres database: java.lang.IllegalStateException: Process [.anvil-data\db-bin\PG-3ecc125de4870fe95f7f29f11aba3613\bin\initdb.exe, -A, trust, -U, postgres, -D, .anvil-data\db, -E, UTF-8] failed
More logs are available in .anvil-data\postgres.log.
Some common causes of this problem:

  • Are you launching this server as ‘root’ on a UNIX system?
    Postgres will not run as root; try launching the server as an ordinary user.
  • Are you running this server on an unusual architecture or OS? (Windows Server 2022/amd64)

Is Windows Server 2022 not supported, or is there a step I am missing? Appreciate the help!

Thanks,

Peter

It turned out, because Anvil is using embedded PostgreSql, you need to install Microsoft Visual C++ Redistributable packages for Visual Studio 2013, download link below. See this post : Anvil App Server; Failed to start built-in Postgres database - #5 by tomaz.turk

1 Like