gpcopy 2.7 issue - Error: listen tcp 0.0.0.0:7667: bind: address already in use
search cancel

gpcopy 2.7 issue - Error: listen tcp 0.0.0.0:7667: bind: address already in use

book

Article ID: 401695

calendar_today

Updated On:

Products

VMware Tanzu Greenplum VMware Tanzu Data Suite VMware Tanzu Greenplum / Gemfire

Issue/Introduction

When running multiple gpcopy 2.7.0 commands without specifying different --rpc-port values, the following error occurs:

Error: listen tcp 0.0.0.0:7667: bind: address already in use

In earlier versions, such as gpcopy 2.5.0, multiple jobs could run concurrently using the default port 7667 without issue.

 

 

Environment

gpcopy version: 2.7.0

Cause

Between gpcopy versions 2.5.0 and 2.7.0, the handling of parallel jobs and port usage changed:

In gpcopy 2.7.0, the --rpc-port flag was introduced to support new job management features, including dynamic control and monitoring of parallel jobs through the gpcopy job subcommand.

This change means that only one gpcopy process can bind to a given port (default 7667) at a time. Attempting to start another gpcopy instance on the same port results in the "address already in use" error.

In contrast, gpcopy 2.5.0 did not include this port binding mechanism, so parallel jobs could run without port conflicts.

Example Output

To monitor jobs in gpcopy 2.7.0:

gpcopy job -s
workers | status
5       | running


For job management help:

gpcopy job --help

Dynamically control the number of parallel jobs

Usage:
  gpcopy job [flags]

Flags:
  -d, --decrease int      Decrease the number of parallel jobs
  -h, --help              help for job
  -i, --increase int      Increase the number of parallel jobs
  -H, --rpc-host string   The host of source cluster (default "127.0.0.1")
  -P, --rpc-port int      The port of gpcopy RPC listener (default 7667)
  -s, --status            The status of worker pool

 

Resolution

By default, gpcopy 2.7.0 uses port 7667 for job monitoring and management.

To run multiple gpcopy instances in parallel, specify a unique --rpc-port value for each instance.

For example:

gpcopy --rpc-port 7668 …
gpcopy --rpc-port 7669 …

Ensure that each gpcopy process uses a different port to avoid conflicts.

Likewise, for parallel processes running gpcopy you can increase or decrease the --jobs setting (default is 4 process per gpcopy command):

gpcopy --jobs 8

Additional Information