Trying to self-host the temporal server and UI on Windows Server using PostgreSQL. To test, this will be done on Windows first, and then it will be deployed on the server. I am running into the following error when I try to start the temporal server,
Unable to create server. Error: could not build arguments for function "go.uber.org/fx".(*module).constructCustomLogger.func2 (/home/runner/go/pkg/mod/go.uber.org/fx@v1.23.0/module.go:294): failed to build fxevent.Logger: could not build arguments for function "go.temporal.io/server/temporal".init.func6 (/home/runner/work/temporal/temporal/temporal/fx.go:1008): failed to build log.Logger: received non-nil error from function "go.temporal.io/server/temporal".ServerOptionsProvider (/home/runner/work/temporal/temporal/temporal/fx.go:159): sql schema version compatibility check failed: unable to read DB schema version keyspace/database: temporal error: pq: relation "schema_version" does not exist.
To start, I have the following folder structure in place.
ui/
ui-server.exe
config/
development.yaml
server/
temporal-server.exe
config/
development.yaml
dynamicconfig/
development-sql.yaml
The ui-server.exe
and temporal-server.exe
are from Releases · temporalio/temporal.
I am trying to test this with a PostgreSQL database running on Docker for testing.
To set up the PostgreSQL database manually, I am using the temporal/schema/postgresql/v12 at main · temporalio/temporal. This gives the necessary schema for the two databases.
Here is the server’s config, development.yaml.
log:
stdout: true
level: info
persistence:
defaultStore: postgres-default
visibilityStore: postgres-visibility
numHistoryShards: 4
datastores:
postgres-default:
sql:
pluginName: "postgres12"
databaseName: "temporal"
connectAddr: "127.0.0.1:5432"
connectProtocol: "tcp"
user: "temporal"
password: "temporal"
maxConns: 20
maxIdleConns: 20
maxConnLifetime: "1h"
postgres-visibility:
sql:
pluginName: "postgres12"
databaseName: "temporal_visibility"
connectAddr: "127.0.0.1:5432"
connectProtocol: "tcp"
user: "temporal"
password: "temporal"
maxConns: 2
maxIdleConns: 2
maxConnLifetime: "1h"
global:
membership:
maxJoinDuration: 30s
broadcastAddress: "127.0.0.1"
pprof:
port: 7936
metrics:
prometheus:
# # specify framework to use new approach for initializing metrics and/or use opentelemetry
# framework: "opentelemetry"
framework: "tally"
timerType: "histogram"
listenAddress: "127.0.0.1:8000"
services:
frontend:
rpc:
grpcPort: 7233
membershipPort: 6933
bindOnLocalHost: true
httpPort: 7243
matching:
rpc:
grpcPort: 7235
membershipPort: 6935
bindOnLocalHost: true
history:
rpc:
grpcPort: 7234
membershipPort: 6934
bindOnLocalHost: true
worker:
rpc:
grpcPort: 7239
membershipPort: 6939
bindOnLocalHost: true
clusterMetadata:
enableGlobalNamespace: false
failoverVersionIncrement: 10
masterClusterName: "active"
currentClusterName: "active"
clusterInformation:
active:
enabled: true
initialFailoverVersion: 1
rpcName: "frontend"
rpcAddress: "localhost:7233"
dcRedirectionPolicy:
policy: "noop"
archival:
history:
state: "enabled"
enableRead: true
provider:
filestore:
fileMode: "0666"
dirMode: "0766"
gstorage:
credentialsPath: "/tmp/gcloud/keyfile.json"
visibility:
state: "enabled"
enableRead: true
provider:
filestore:
fileMode: "0666"
dirMode: "0766"
namespaceDefaults:
archival:
history:
state: "disabled"
URI: "file:///tmp/temporal_archival/development"
visibility:
state: "disabled"
URI: "file:///tmp/temporal_vis_archival/development"
dynamicConfigClient:
filepath: "config/dynamicconfig/development-sql.yaml"
pollInterval: "10s"
What am I doing wrong or is the schema setup incomplete?