Error: Failed to initialize TiDB environment on remote host (task.env_init.failed)

Error: Failed to initialize TiDB environment on remote host ‘10.57.44.174’ (task.env_init.failed)
caused by: Failed to write public keys to ‘/dev/null’ for user ‘tidb’
caused by: Failed to execute command over SSH for ‘tidb@10.57.44.174:22’
caused by: exit status 1

chmod: changing permissions of ‘/dev/null’: Operation not permitted

This error message indicates that there was a failure in initializing the TiDB environment on the remote host. Specifically, it failed to write public keys to ‘/dev/null’ for the ‘tidb’ user, and the ‘chmod’ command encountered an “Operation not permitted” error.

To troubleshoot this issue, you can try the following steps:

  1. Check the SSH configuration: Ensure that the SSH configuration on the remote host is properly set up. Make sure that the SSH server is running and accessible, and that the ‘tidb’ user has the necessary permissions to execute commands over SSH.

  2. Check the permissions of ‘/dev/null’: The error message mentions that the ‘chmod’ command encountered an “Operation not permitted” error when trying to change the permissions of ‘/dev/null’. This could indicate a permission issue with the ‘/dev/null’ file. You can try checking the permissions of ‘/dev/null’ and make sure that the ‘tidb’ user has the necessary permissions to access and modify it.

  3. Verify the user and host information: Double-check the user and host information specified in the command. Ensure that the ‘tidb’ user exists on the remote host and that the IP address or hostname is correct.

If the issue persists, you may need to provide more details or consult the official documentation for further troubleshooting steps.