Updated on 2024-06-19 GMT+08:00

Handling Migration Errors

This section provides solutions to common migration errors.

Restart data sync failed.

Solution:

  1. Check whether the source Redis has big keys. If it does, split the big keys into small keys before migration.
  2. Check the specifications of the target Redis instance and whether other tasks are being performed on the instance.
    • If the memory of the target Redis instance is smaller than the size of the data to be migrated, the memory will be used up during the migration and the migration will fail.
    • If a master/standby switchover is being performed on the target Redis instance, contact technical support to stop the master/standby switchover task and start it only after the data migration is completed.
  3. Send the error information to technical support.

Redis authentication failed.

Solution:

Ensure that the passwords of the source and target Redis databases are correct and are not changed during the migration.

If you forget the password, reconfigure the migration task after resetting the password.

RDB parsing failed.

Analysis:

Check the source Redis logs. Generally, this error is resulted from full output buffer when full synchronization takes too long or the size of incremental data is too large. You can use the following methods to solve this error:

  • Increase the output buffer limit by modifying the output-buffer-limit parameter. This method is recommended.
  • Increase the concurrency of redis-shake full synchronization by modifying the parallel parameter.
  • Synchronize data during off-peak hours.

IP address and port number of Redis are invalid.

Send the error information to technical support.

Job failed.

Send the error information to technical support.

Failed to download the file.

Solution:

See Why Am I Unable to Download an Object?

The cluster does not support import of AOF files.

Analysis:

Redis Cluster instances only support .rdb files.

Failed to decompress the file.

Solution:

  1. Ensure that the file is not damaged and the file format is correct.
  2. Check whether the specifications of the migration ECS are too small and the disk space is full. In this case, expand the specifications of the migration ECS.

The file format is not supported.

Analysis:

Only .rdb, .aof, .zip, and .tar.gz files are supported.

No such file or directory.

Solution:

  1. Check whether the specifications of the migration ECS are too small and the disk space is full. In this case, expand the specifications of the migration ECS.
  2. Send the error information to technical support.

Failed to connect to the source Redis.

Solution:

  1. See Troubleshooting Redis Connection Failures.
  2. Check the specifications of the source Redis and the memory size of the migration ECS. If the memory of the migration server is small and the data volume of the source Redis is large, migration will be slow and data will be stacked on the migration ECS. To solve this error, you can expand the specifications of the migration ECS.
  3. Run the route - n command on the migration ECS to check whether its route is normal.
  4. Send the error information to technical support.

Failed to modify the redis-shake-conf configuration file due to incorrect parameters.

Solution:

  1. Check whether the specifications of the migration ECS are too small and the disk space is full. In this case, expand the specifications of the migration ECS.
  2. Send the error information to technical support.

Data synchronization failed. Source node: {0}; target node: {1}.

Solution:

  1. Check whether the source Redis has big keys. If it does, split the big keys into small keys before migration.
  2. Ensure that the specifications of the target Redis instance are not smaller than those of the source Redis. For details about how to view specifications, see Viewing Instance Details.
  3. See Troubleshooting Redis Connection Failures.
  4. Check the specifications of the source Redis and the memory size of the migration ECS. If the memory of the migration server is small and the data volume of the source Redis is large, migration will be slow and data will be stacked on the migration ECS. To solve this error, you can expand the specifications of the migration ECS.

Failed to deploy the migration tool.

Solution:

  1. Check whether the network between the data plane and OBS is normal.
  2. Send the error information to technical support.

Online migration failed.

Send the error information to technical support.

Failed to bind the port to the ECS.

Solution:

The underlying resources are insufficient to support the migration task. Contact technical support.

Failed to create the migration ECS.

Send the error information to technical support.

File operation exception.

Solution:

  1. Check the specifications of the source Redis and the memory size of the migration ECS. If the memory of the migration server is small and the data volume of the source Redis is large, migration will be slow and data will be stacked on the migration ECS. To solve this error, you can expand the specifications of the migration ECS.
  2. Send the error information to technical support.

Command execution exception.

Solution:

  • If the error information contains "listening-port" or "REPLCONF", check whether the SYNC and PSYNC commands are enabled on the source Redis instance and whether the underlying resources of the migration task are connected to the source and target Redis instances.

    For online migration, the source and target Redis instances must be connected, and the SYNC and PSYNC commands must be enabled on the source Redis instance. Otherwise, the migration will fail.

    • Check the network.

      Check whether the source Redis instance, the target Redis instance, and the migration VM are configured with the same VPC. If they are in the same VPC, check the security group rules (for DCS Redis 3.0 instances) or whitelists (for DCS Redis 4.0 or 5.0 instances) to ensure that the IP addresses and ports of the Redis instances are accessible. If they are in different VPCs, create a VPC peering connection.

      The source and target Redis instances must be accessible to the underlying VMs used for the migration task. For details about how to configure a whitelist, see Managing IP Address Whitelist.

      If the source and target Redis instances are on different clouds, create a connection by referring to Direct Connect documentation.

    • Check the commands.

      By default, the SYNC and PSYNC commands are disabled by cloud vendors. To enable the commands, contact the O&M personnel of the cloud vendors.

      • Migration within Huawei Cloud:
        • By default, the SYNC and PSYNC commands can be used when self-hosted Redis is migrated to DCS.
        • During online migration between Huawei Cloud DCS instances in the same region under the same account, the SYNC and PSYNC commands are automatically enabled.
        • During online migration between Huawei Cloud DCS instances in different regions or under different accounts within a region, the SYNC and PSYNC commands are not automatically enabled, and online migration cannot be used. You can migrate data using backup files instead.
      • Migration from other cloud vendors to Huawei Cloud:

        Generally, cloud vendors disable the SYNC and PSYNC commands. If you want to use online migration, contact the O&M personnel of the source cloud vendor to enable the commands. For offline migration, you can import backup files.

  • If the error information contains "read error" and the migration failed during full migration due to the large data size, disable auto-reconnect before starting the migration and enable it after incremental migration starts. In addition, increase the value of repl-timeout and modify the output buffer of the source Redis based on the source memory size. For example, if the memory size of the source Redis is 24 GB, you can run the client-output-buffer-limit slave 2gb 2gb 600 command to change the buffer size to 2 GB.
  • If the error information contains "write: connection reset by peer", the target Redis memory may be too small. As a result, data cannot be synchronized when the target memory is full. In this case, set this parameter to increase the specifications of the target Redis to at least the same as the specifications of the source.
  • If the error information contains "read: connection reset by peer", the source Redis is deployed in master/standby mode, and master/standby switchover occurs frequently during the migration. In this case, check whether the source Redis has big keys. If it does, split the big keys into small keys before migration. You can also run the config set slave-priority 0 command to forcibly disable master/standby switchover and enable it after the migration is complete. If the target Redis instance is Proxy Cluster, check the size of the pipeline. Run the proxy.config set client-max-pipeline 50000 command to change this limit to 50,000 for proxies.
  • Send the error information to technical support.

Decoding or parsing failed.

Solution:

  1. Check whether the specifications of the migration ECS are too small and the disk space is full. In this case, expand the specifications of the migration ECS.
  2. Send the error information to technical support.

Unknown or unsupported command.

Solution:

Check whether the SYNC and PSYNC commands are enabled on the source Redis instance. If they are not enabled, contact technical support.

For online migration, the source and target Redis instances must be connected, and the SYNC and PSYNC commands must be enabled on the source Redis instance. Otherwise, the migration will fail.

  • Check the network.

    Check whether the source Redis instance, the target Redis instance, and the migration VM are configured with the same VPC. If they are in the same VPC, check the security group rules (for DCS Redis 3.0 instances) or whitelists (for DCS Redis 4.0 or 5.0 instances) to ensure that the IP addresses and ports of the Redis instances are accessible. If they are in different VPCs, create a VPC peering connection.

    The source and target Redis instances must be accessible to the underlying VMs used for the migration task. For details about how to configure a whitelist, see Managing IP Address Whitelist.

    If the source and target Redis instances are on different clouds, create a connection by referring to Direct Connect documentation.

  • Check the commands.

    By default, the SYNC and PSYNC commands are disabled by cloud vendors. To enable the commands, contact the O&M personnel of the cloud vendors.

    • Migration within Huawei Cloud:
      • By default, the SYNC and PSYNC commands can be used when self-hosted Redis is migrated to DCS.
      • During online migration between Huawei Cloud DCS instances in the same region under the same account, the SYNC and PSYNC commands are automatically enabled.
      • During online migration between Huawei Cloud DCS instances in different regions or under different accounts within a region, the SYNC and PSYNC commands are not automatically enabled, and online migration cannot be used. You can migrate data using backup files instead.
    • Migration from other cloud vendors to Huawei Cloud:

      Generally, cloud vendors disable the SYNC and PSYNC commands. If you want to use online migration, contact the O&M personnel of the source cloud vendor to enable the commands. For offline migration, you can import backup files.

Data synchronization failed.

Solution:

  1. If the error information contains "key name is busy", a key with the same name already exists in the target Redis. In this case, delete the key.
  2. If the error information contains "not in the same slot", reconstruct your service. Do not use cross-slot keys in a multi-key command. You can also use a master/standby instance instead of a Proxy Cluster instance as the target.
  3. If the error information contains "read: connection reset by peer", the source Redis is deployed in master/standby mode, and master/standby switchover occurs frequently during the migration. In this case, check whether the source Redis has big keys. If it does, split the big keys into small keys before migration. You can also run the config set slave-priority 0 command to forcibly disable master/standby switchover and enable it after the migration is complete. If the target Redis instance is Proxy Cluster, check the size of the pipeline. Run the proxy.config set client-max-pipeline 50000 command to change this limit to 50,000 for proxies.

Failed to import the backup file.

Send the error information to technical support.