diff --git a/magda-int-test-ts/src/ServiceRunner.ts b/magda-int-test-ts/src/ServiceRunner.ts index 72b0e02c1f..0eef7970c8 100644 --- a/magda-int-test-ts/src/ServiceRunner.ts +++ b/magda-int-test-ts/src/ServiceRunner.ts @@ -125,6 +125,7 @@ export default class ServiceRunner { if (this.dockerServiceForwardHost) { return; } + this.dockerServiceForwardHost = "localhost"; const dockerHost = process?.env?.DOCKER_HOST; if (!dockerHost) { return; @@ -377,12 +378,14 @@ export default class ServiceRunner { `Port ${localPort} already has an existing port forwarding process running.` ); } - const portForwardCmd = `socat TCP4-LISTEN:${localPort},fork,reuseaddr TCP4:${hostname}:${remotePort}`; + const portForwardCmd = `socat TCP6-LISTEN:${localPort},fork,reuseaddr TCP4:${hostname}:${remotePort}`; const portForwardProcess = child_process.spawn(portForwardCmd, { stdio: "inherit", shell: true }); + console.log(`Started to portforward for ${hostname}:${remotePort}...`); + this.portForwardingProcessList[ localPort.toString() ] = portForwardProcess;