While the above Kb refers to a known issue affecting VMware vRealize Automation 7.0.x, I also encountered this issue on vRA 7.1 and the resolution in the Kb worked successfully.
Sync displays as a running indefinitely:
Save and sync button is grayed out and you are unable to start a new sync:
Resolution: Per Kb login as Root and run the following cmd to restart the affected service:
service horizon-workspace restart
Log back into vRA, navigate to ‘Directories’ and run the Sync again:
Click ‘Refresh Page’ after a couple of minutes and Sync has completed successfully: