Bug: changing the Postgres PORT does not work properly
Closed this issue · 0 comments
mindreframer commented
Changing the port both in powersync.yml and .env leads to errors.
## powersync.yml
replication:
connections:
- type: postgresql
# The PowerSync server can access the Postgres DB via the DB's service name
uri: postgres://pg-db:5433/postgres
sslmode: disable # okay for local/private network, not for public network
hostname: pg-db # From the Docker Compose service name
port: 5433
database: postgres # TODO Match this with Docker config if changed
username: postgres # TODO Match this with Docker config if changed
password: mypassword # TODO Match this with Docker config if changed
and
# .env
# Postgres credentials
# Note that currently these need to be manually synchornized with `./config/powersync.yml`
PG_DATABASE_PORT=5433
PG_DATABASE_NAME=postgres
PG_DATABASE_USER=postgres
PG_DATABASE_PASSWORD=mypassword
It seems there are quite some things failing:
powersync-1 | {"level":"error","timestamp":"2024-04-22T13:41:19.811Z","trace_id":"336196846b10d020b11a2bd2c2bbcc31","span_id":"397aafca4833d312","category":"router","error":"JourneyError: [NO_SYNC_RULES] No sync rules available\n undefined\n at Object.handler (file:///app/powersync-service/lib/routes/sync-stream.js:54:19)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async /app/node_modules/.pnpm/@journeyapps-platform+micro-router-fastify@2.1.0/node_modules/@journeyapps-platform/micro-router-fastify/dist/router.js:115:43\n at async Object.<anonymous> (/app/node_modules/.pnpm/@journeyapps-platform+micro-router-fastify@2.1.0/node_modules/@journeyapps-platform/micro-router-fastify/dist/router.js:86:9)","code":"NO_SYNC_RULES","status":"500","description":"No sync rules available","message":"request failed"}
Its not quite clear, why it is not working. Maybe a working example with a non-standard Postgres PORT would help?