Following the YugabyteDB Voyager database migration steps (https://docs.yugabyte.com/preview/migrate/migrate-steps/) going from PostgreSQL to YugabyteDB on a local Kubernetes, on Docker Desktop, on WSL2, on Windows. Using Ubuntu 22.04 on WSL2 to run yb-voyager, I get an error on the Import Data step:
import of data in "postgres" database started
Target YugabyteDB version: 11.2-YB-2.15.2.1-b0
Error Resolving name=yb-tserver-1.yb-tservers.yb-demo.svc.cluster.local: lookup yb-tserver-1.yb-tservers.yb-demo.svc.cluster.local: no such host
The Import Schema step worked correctly (from using pgAdmin connected to the YugabyteDB), so I know that the database can be connected to. Command used:
yb-voyager import schema --export-dir ${EXPORT_DIR} --target-db-host ${TARGET_DB_HOST} --target-db-user ${TARGET_DB_USER} --target-db-password ${TARGET_DB_PASSWORD} --target-db-name ${TARGET_DB_NAME}
The command used to import the data, which fails:
yb-voyager import data --export-dir ${EXPORT_DIR} --target-db-host ${TARGET_DB_HOST} --target-db-user ${TARGET_DB_USER} --target-db-password ${TARGET_DB_PASSWORD} --target-db-name ${TARGET_DB_NAME}
ENV variables:
EXPORT_DIR=/home/abc/db-export
TARGET_DB_HOST=127.0.0.1
TARGET_DB_USER=ybvoyager
TARGET_DB_PASSWORD=password
TARGET_DB_NAME=postgres
Why does the import data fail when the import schema works connecting to the same database?