1. Make sure the Task Service is running. If the task immediately stops, you'll need to restart the Task Service and check connections if the Task Service does not start properly.
To see how to start the Task Service, please see article here.
2. A number of times when a reindex task errors or shows warnings is generally when there are images and thumbnails generation is turned on or the data is not prepared for the operating system to process the files.
a) Thumbnail Generation. When there is a multitude of images/image sequences, we recommend turning off thumbnail generation and then running the task again.
To see how to turn off Thumbnail Generation. please see article here.
b) If there are any illegal characters within the storage, the server will not be able to interpret these files. Apple workstations can generate a number of illegal characters within files and folders and the server will not know how to handle these files as they are illegal.
How do I find illegal characters in my data? Please see article here for the search tool.
What are the illegal characters to look for? Please see article here for complete list.
How do I remove these illegal characters? Please see article here.