Diagnostic Commands
Before diving into specific issues, these commands are your best friends:Common Issues
1. “Permission denied (publickey)”
Symptoms:sinc fails immediately when trying to connect.
Cause: The VPS is rejecting your SSH key.
Fix:
- Check which key is being used:
ssh -v user@hostname - Ensure your public key is in
~/.ssh/authorized_keyson the VPS. - If you use a specific key, make sure it’s added to your SSH agent:
ssh-add ~/.ssh/my_key.
2. “Mutagen is not installed” or “Mutagen version mismatch”
Symptoms: Error message about missing dependency. Cause:sinc relies on the mutagen binary being in your PATH.
Fix:
Run sinc --setup again to let it try installing. Or install manually:
3. Sync Conflicts (“Conflicts detected”)
Symptoms:mutagen sync list shows “Conflicts”. Files aren’t updating.
Cause: A file was modified on both the local machine and the VPS at roughly the same time. Mutagen pauses to prevent data loss.
Fix:
- List the conflicts:
mutagen sync list - Resolve them (Mutagen usually requires manual resolution). The easiest “nuclear” option if you trust your local version:
Better resolution support is coming in future versions.
4. “Session already exists”
Symptoms: You runsinc and it complains.
Cause: You detached from a session previously, and it’s still running in the background.
Fix:
- Resume it:
sinc -r - Kill it:
sinc --kill <session-name>(get name fromsinc --list)
5. High Latency / Sluggish Sync
Symptoms: Changes take 5+ seconds to appear. CPU usage is high. Cause: You are likely syncingnode_modules, .git, or other massive directories.
Fix:
- Check your ignores.
- Run
mutagen sync listand look at “Scanned files”. If it’s > 50,000, you are syncing too much. - Add heavy folders to
.syncignoreor the global config.
6. “Command not found: opencode” (on remote)
Symptoms: You connect, but the tmux session just shows an error or a plain shell. Cause: The agent is not installed on the VPS, or not in the PATH. Fix: SSH into the VPS and install the agent globally:npm bin -g is in your PATH in .bashrc.
7. File Permission Errors on Remote
Symptoms: “EACCES” or “Permission denied” when the agent tries to write files. Cause: The folder on the VPS is owned byroot or another user.
Fix:
Advanced Debugging
Inspecting the Mutagen Daemon
Mutagen runs as a background daemon. If it’s stuck:Inspecting the Sync Session
For a specific session, you can see detailed transfer info:Kill Everything
Ifsinc state gets completely desynchronized from reality:
- Kill local process: Ctrl+C
- Terminate all mutagen sessions:
mutagen sync terminate --all - Kill remote tmux (on VPS):
tmux kill-server(Warning: kills ALL tmux sessions)