When an Agent participates in a job, it creates a hidden service directory .sync in the root of the folder. It's created by each agent in a Sync or Script job, and by destination agents in Consolidation & Distribution job.
The crucial file inside .sync is the identifier of the folder - ID file, by which the agent knows that it's the directory that shall be synced. All agents in one job have different ID file.If anything happens with the ID file, an error is raised by an agent and data delivery stops.
Agent won't recover from ID-related errors. To fix these errors, admin needs to restart the agent in a job run affected. However, the problem may re-appear - when some third party tool or a script changes or deletes the ID file periodically. This requires eliminating the causing factor - discover the process that changes or deletes the ID file, see at the bottom of the article for some guidelines.
1. Not enough permissions to create identifying .sync/ID file for this shared folder (in v.3.8.2 text was updated to Failed to create identifying .sync/ID file for this shared folder)
Reason: The error means that agent was not even able to create ID file. Basically, it means that the user that runs the agent may be lacking read-write access in the selected folder.
Fix: Revise the folder preferences and fix permissions. If this is a mounted folder - revise mount permissions, too.
However, agent won't recover from the error itself- after fixing permissions remove the agent from the job and add it back again; or use "Restart on agents" button in the job run.
Reason: If reported by the Agent which synchronizes a Sharepoint site, the error may indicate that there's invalid Client secret it Sharepoint connection configuration.
Fix: in MC go to Storage Connectors -> your Sharepoint configuration and check the Client secret. Update the secret and save. Launch rescan of the job on the Agent.
2. Share's identifying .sync/ID file is missing
At the same time, error "Service files missing" appears in Agent UI and means the same
Reason: the error means that ID is simply deleted. Unfortunately, the Agent cannot know what might have deleted it. To discover the process that deleted the ID file, use any third party tools, for example, the ones mentioned at the bottom of the article.
Fix: The best fix here is to remove the agent from the job and add it again so that it creates new ID, or restart the job run on the Agent, which is basically the same. Do not attempt to copy ID file from another job or another peer.
Reason: Another possible reason for missing ID file is that the job was created BEFORE mounting the drive where job should keep the data. As a result, the ID file is hidden below the mount point.
Fix: It is recommended to unmount the drive, remove .sync/ID file, mount it again and re-add agent to the job; or use "Restart on agents" button in the job run.
3. Share's identifying .sync/ID file is broken
Basically it means that the content of ID file has changed for the agent.
Reason: This folder is used for another job by this agent and thus ID file has new job's identifier recorded there.
Fix: It's highly advisable not to to use same folder for two different jobs on same Agent. Reorganize the jobs so that agent syncs different directories with each job. You might want to contact support to get help on how to achieve your setup goals.
Reason: Some other tool or process changes the file.
Fix: See below to discover such process.
Reason: It's also possible that the ID file was just corrupt and is now filled with rubbish symbols or zeroes.
Fix: Remove the agent from the job and add it back again for ID file to be recreated; or use "Restart on agents" button in the job run.
Discover the process that changes or deleted the .sync/ID file
Below are some guidelines to find what is altering the ID file causing the error message. Note, the tools mentioned track file access in real time and don't show access history. You will need to keep them running in background to capture the moment.
You might want to use any other tools of your choice though.
Windows
One of the simples tools is Process Monitor utility. Once installed click on Filter and choose filter "Path contains" and select the path to the job's folder's .sync. In the example belowD:\RESILIO FOLDER STORAGE\test\.sync\ID is opened with Notepad++
Linux
Open Terminal and run command sudo lsof -r 1 +D /home/rslagent/Resilio\ Connect\
Agent/test/.sync/
. Be sure to use the correct path to the job.“-r”
parameter will keep lsof on checking the path every 1 sec. In the example lsof shows that .sync/ID is opened with vim
macOS
Open Terminal and run command sudo lsof -r 1 +D /Users/user/Downloads/test/.sync
. Be sure to use the correct path to the job.“-r”
parameter will keep lsof on checking the path every 1 sec. In the example lsof shows that .sync/ID is opened with TextEdit
Alternatively, run command sudo fs_usage | grep /Users/helen/Downloads/upload/.sync/ID
. In the example below the ID file was deleted using Finder
Error codes
SE_SYNC_ID_ACCESS_DENIED
SE_SYNC_ID_DELETED
SE_SYNC_ID_CORRUPTED