When running the gpcopy utility, the process fails with the following error even if a specific port is provided via the --rpc-port flag:
gpcopy rpc listen failed listen tcp 0.0.0.0:####: bind: address already in use
Users may also observe a warning indicating that the utility has switched to 'edge mode' despite being executed on the coordinator node:
[WARNING]:-It is recommended to run gpcopy on the coordinator node of the source gpdb cluster. If not on the recommended node, some operations will be run through the executable external table.
This issue is typically caused by one of two factors:
gpcopy process or system service is already using the specified RPC port. Starting with gpcopy 2.7.0, the utility binds to a port (default 7667) for job management and monitoring. If the port is occupied, the bind fails.gpcopy determines if it is running on the coordinator by comparing the local hostname to the hostname recorded in gp_segment_configuration (where content = -1). If these do not match, gpcopy defaults to edge mode, which can lead to unexpected port binding attempts or permission issues.To resolve the port conflict and ensure gpcopy recognizes the coordinator node, follow these steps:
lsof or netstat:gpcopy instances must run concurrently, assign a unique, available port to each instance using the --rpc-port flag:Also, to resolve the run gpcopy on the coordinator node error:
gpcopy from switching to edge mode when run on the coordinator. Note: The issue is fixed in gpcopy 2.9.5 now, we can also upgrade the gpcopy to avoid this issue.
For more details on managing parallel jobs, refer to the .
To be updated on fix status for this issue, please subscribe to this article (see ).
If you need to speak with a customer representative or a Support Engineer, see . Scroll to the bottom of the page and click on your respective region.