Guest User

Untitled

a guest
Jul 18th, 2025
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.06 KB | None | 0 0
  1. For Joplin, how do I solve error "PUT info.json: “/…/info.json” is locked, existing lock on file"?
  2. ChatGPT said:
  3.  
  4. The error in Joplin:
  5.  
  6. PUT info.json: “/…/info.json” is locked, existing lock on file
  7.  
  8. means that Joplin tried to write to the info.json file (which is part of its sync metadata), but it’s currently locked by another process — usually another instance of Joplin syncing with the same target (like a cloud provider, WebDAV, or local file system).
  9. ✅ How to Solve the "info.json is locked" Error
  10. 1. Wait and Retry
  11.  
  12. This is often a temporary lock caused by another sync in progress.
  13.  
  14. Wait a minute or two, then try syncing again.
  15.  
  16. Do not manually delete any files unless you're sure the process is stuck.
  17.  
  18. 2. Check for Another Joplin Instance
  19.  
  20. Are you syncing from another device (phone, tablet, laptop)?
  21.  
  22. Ensure another Joplin instance isn't actively syncing at the same time.
  23.  
  24. If possible, sync one device at a time.
  25.  
  26. 3. Force Sync (Advanced)
  27.  
  28. If the lock file is stuck and you're confident no other device is syncing:
  29. 📍 For file system sync (e.g., Dropbox folder, local folder):
  30.  
  31. Go to your sync target (e.g., Dropbox folder or local sync directory).
  32.  
  33. Locate .sync/lock or info.json.lock (or similar lock-related files).
  34.  
  35. If you're sure no other device is syncing:
  36.  
  37. Delete the lock file manually.
  38.  
  39. Restart Joplin and sync again.
  40.  
  41. ⚠️ WARNING: Only delete lock files if you're absolutely certain that no other Joplin client is syncing. Otherwise, you can corrupt the sync state.
  42. 4. Reboot the Device
  43.  
  44. Sometimes the lock is left due to an unexpected crash or improper shutdown. A reboot ensures all processes are cleared.
  45. 5. Use the "Re-upload local data to sync target" Option
  46.  
  47. If sync is consistently broken:
  48.  
  49. Go to Joplin → Tools → Options → Synchronisation.
  50.  
  51. At the bottom, choose: "Delete local data and re-download from sync target" or "Re-upload local data to sync target", depending on what you want to keep.
  52.  
  53. Be cautious — this affects your notes.
  54.  
  55. Final Tip
  56.  
  57. If you're syncing across devices, always ensure time is synchronized on all systems and Joplin is updated to the latest version — mismatched time or versions can cause sync issues too.
  58.  
  59. Would you like help checking your specific sync setup (e.g. Dropbox, Nextcloud, etc.)?
  60. You said:
  61. Nextcloud
  62. ChatGPT said:
  63.  
  64. Great — since you're using Nextcloud with Joplin, the info.json is locked error is often caused by one of the following:
  65.  
  66. Joplin is trying to sync while another client (Joplin or Nextcloud itself) is still writing to the file.
  67.  
  68. Nextcloud's internal file locking system (especially when Redis or database locking is enabled) has left a stale lock.
  69.  
  70. Your Nextcloud server has a misconfigured or stuck locking mechanism.
  71.  
  72. ✅ Step-by-Step Fix for Joplin + Nextcloud info.json Lock Error
  73. 🧩 1. Wait a Few Minutes and Retry
  74.  
  75. If you just synced from another device, wait at least 5 minutes. Sometimes locks are held briefly.
  76. 🧰 2. Manually Remove the Lock File on Nextcloud
  77.  
  78. ⚠️ Only do this if you’re sure no other Joplin instance is syncing right now.
  79.  
  80. Steps:
  81.  
  82. Log in to your Nextcloud Web UI or via WebDAV/FTP/SSH.
  83.  
  84. Navigate to your Joplin sync directory:
  85.  
  86. /remote.php/webdav/Joplin/
  87.  
  88. Look for:
  89.  
  90. info.json.lock
  91.  
  92. Or a .sync/lock directory or file
  93.  
  94. Delete the lock file (info.json.lock) or clear the .sync/lock folder.
  95.  
  96. Then: Open Joplin again and try syncing.
  97. ⚙️ 3. Restart Your Nextcloud Server (If Self-Hosted)
  98.  
  99. If you’re running your own Nextcloud instance, do this:
  100.  
  101. sudo systemctl restart apache2
  102. # or if you're using nginx:
  103. sudo systemctl restart php-fpm nginx
  104.  
  105. Sometimes restarting clears stale locks.
  106. 🔧 4. Clear Nextcloud File Locks from the Database (Advanced)
  107.  
  108. If locks persist after server restarts, and you're self-hosting with database-level locking:
  109.  
  110. Steps for MySQL/MariaDB:
  111.  
  112. USE nextcloud;
  113. DELETE FROM oc_file_locks WHERE 1;
  114.  
  115. Replace nextcloud with your actual DB name.
  116.  
  117. Then restart your server. This clears all stale file locks.
  118. 🚫 5. Avoid Multiple Devices Syncing at the Same Time
  119.  
  120. Best practice when using Joplin with Nextcloud:
  121.  
  122. Sync only one device at a time.
  123.  
  124. Don't run Joplin in the background on multiple devices while syncing.
  125.  
  126. 🔄 6. Enable Safe Locking in Joplin (if disabled)
  127.  
  128. Joplin has an option to avoid sync conflicts by checking for locks properly:
  129.  
  130. Go to Tools → Options → Synchronisation
  131.  
  132. Enable any options related to "safe sync" or "conflict resolution".
  133.  
  134. Make sure you're using the latest Joplin version (desktop and mobile).
  135.  
  136. 🧼 Optional: Reset Sync State (If It's Still Broken)
  137.  
  138. If the error doesn't go away:
  139.  
  140. In Joplin, go to:
  141. Tools → Options → Synchronisation → Advanced
  142.  
  143. Choose: “Re-upload local data to sync target”
  144.  
  145. This clears and rebuilds the sync state from your current local notes.
  146.  
  147. If you'd like, I can help walk through your Nextcloud setup (e.g., hosted, Docker, Snap, etc.) to check for any deeper config issues. Just let me know.
  148. You said:
  149. How I fix this if I am using a managed instance of Nextcloud?
  150. ChatGPT said:
  151.  
  152. If you're using a managed instance of Nextcloud (like from a provider such as Nextcloud.com, Hetzner, IONOS, etc.), you won’t have direct server or database access, so your options are more limited — but the issue is still solvable.
  153.  
  154. Here’s what you can do:
  155. ✅ How to Fix info.json Locked on a Managed Nextcloud Instance
  156. 🧩 1. Wait a Few Minutes and Retry
  157.  
  158. This is usually a temporary lock — Joplin will try again later.
  159.  
  160. Wait 3–5 minutes and press Sync again in Joplin.
  161.  
  162. If it works afterward, the issue was just a short-lived sync conflict.
  163.  
  164. 🧼 2. Clear the Lock via Web Interface (if accessible)
  165.  
  166. Some managed Nextcloud providers allow file access through:
  167.  
  168. WebDAV (via Joplin's sync URL)
  169.  
  170. Web UI (via nextcloud.yourdomain.com or the provider’s portal)
  171.  
  172. Steps:
  173.  
  174. Log in to your Nextcloud web interface.
  175.  
  176. Navigate to the Joplin sync folder (usually just a folder called Joplin in your root directory).
  177.  
  178. Look for any file named:
  179.  
  180. info.json.lock
  181.  
  182. .sync/lock or .lock
  183.  
  184. Delete it manually, if possible.
  185.  
  186. If you don’t see the .sync folder, enable hidden files (usually with a settings gear icon).
  187.  
  188. 📱 3. Ensure No Other Devices Are Syncing Joplin
  189.  
  190. Make sure:
  191.  
  192. No other device (phone/laptop/tablet) is syncing at the same time.
  193.  
  194. Each device completes its sync before another starts.
  195.  
  196. Even a background Joplin app can trigger this error — especially on mobile.
  197. 🔄 4. Use “Re-upload Local Data to Sync Target” (Safe Rebuild)
  198.  
  199. In Joplin Desktop:
  200.  
  201. Go to Tools → Options → Synchronisation → Advanced.
  202.  
  203. Click “Re-upload local data to sync target”.
  204.  
  205. This tells Joplin to:
  206.  
  207. Clear what’s in the sync target (Nextcloud),
  208.  
  209. Push your local notes again,
  210.  
  211. Rebuild metadata files like info.json.
  212.  
  213. ⚠️ This should only be done on one device to avoid sync conflicts. After syncing, let other devices download the data anew.
  214. 💬 5. Contact Your Managed Nextcloud Provider (if all else fails)
  215.  
  216. If the lock persists for hours or is repeatedly getting stuck, you should:
  217.  
  218. Contact your provider's support team.
  219.  
  220. Ask them to remove any stale file locks on info.json in your Joplin sync directory.
  221.  
  222. Sample message:
  223. "Hi, I use Joplin with my Nextcloud account. I’m getting a persistent sync error: 'PUT info.json is locked'. Can you help clear the file lock on /Joplin/info.json or check if your system is holding a stale lock?"
  224.  
  225. ✅ Summary: What You Can Do on Managed Nextcloud
  226. Option What to Do Risk
  227. ✅ Wait and Retry Easiest; usually works None
  228. ✅ Delete Lock via Web UI If provider allows Low
  229. ✅ Re-upload Data from Joplin Safe if you're syncing one device Moderate
  230. ✅ Contact Provider If you're stuck None
  231. Let me know which managed provider you're using — I can give more specific steps or instructions based on that.
Advertisement
Add Comment
Please, Sign In to add comment