Uploaded image for project: 'PUBLIC - Liferay Sync'
  1. PUBLIC - Liferay Sync
  2. SYNC-1713

Renaming a file/folder with same name but different case can interrupt syncing

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Desktop-3.4.1 GA2
    • Fix Version/s: Desktop-3.4.2 GA3
    • Component/s: General
    • Labels:
      None

      Description

      On Windows, if a file is renamed with the same name but different case (abc.txt -> Abc.txt), the file will stop syncing. No exceptions are shown in the log.

      If a folder is similarly renamed (aTestFolder -> atestfolder), the client will stop receiving updates from the server. The log below will appear.

      Mac clients can encounter similar issues when changing the case of a file/folder.

      Workaround

      1. Identify the problematic folder. (Look for the error messages in the log below to find the folder).
      2. Go to Preferences -> Manage Sites
      3. Click on the gear icon next to the site containing the problematic folder
      4. Uncheck the problematic folder and click "Select"
      5. Click "Update"
      6. Go back into "Manage Sites" and repeat steps 3-5, but this time in step 4, check the folder instead of unchecking it.

      Error Log

      18:20:11.876 TRACE [pool-11-thread-2] [SyncWatchEventProcessor:482] Processing Sync watch events
      18:20:11.876 DEBUG [pool-11-thread-2] [SyncWatchEventProcessor:677] Processing Sync watch event {"uiEvent":0,"eventType":"ENTRY_MODIFY","filePathName":"C:\\Users\\deju\\Documents\\deju-mbpro.local (3)\\Liferay\\ThisIsATest","fileType":"folder","previousFilePathName":null,"syncAccountId":4,"syncWatchEventId":28,"timestamp":1485397210171}
      18:20:11.877 DEBUG [pool-11-thread-2] [FileUtil:245] C:\Users\deju\Documents\deju-mbpro.local (3)\Liferay\ThisIsATest
      java.nio.file.AccessDeniedException: C:\Users\deju\Documents\deju-mbpro.local (3)\Liferay\ThisIsATest
              at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
              at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
              at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
              at sun.nio.fs.WindowsFileSystemProvider.newByteChannel(Unknown Source)
              at java.nio.file.Files.newByteChannel(Unknown Source)
              at java.nio.file.Files.newByteChannel(Unknown Source)
              at java.nio.file.spi.FileSystemProvider.newInputStream(Unknown Source)
              at java.nio.file.Files.newInputStream(Unknown Source)
              at com.liferay.sync.engine.util.FileUtil.getChecksum(FileUtil.java:237)
              at com.liferay.sync.engine.util.FileUtil.isModified(FileUtil.java:486)
              at com.liferay.sync.engine.util.FileUtil.isModified(FileUtil.java:426)
              at com.liferay.sync.engine.file.system.SyncWatchEventProcessor.modifyFile(SyncWatchEventProcessor.java:573)
              at com.liferay.sync.engine.file.system.SyncWatchEventProcessor.processSyncWatchEvent(SyncWatchEventProcessor.java:720)
              at com.liferay.sync.engine.file.system.SyncWatchEventProcessor.doRun(SyncWatchEventProcessor.java:499)
              at com.liferay.sync.engine.file.system.SyncWatchEventProcessor.run(SyncWatchEventProcessor.java:142)
              at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
              at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
              at java.lang.Thread.run(Unknown Source)
      18:20:11.883 DEBUG [pool-11-thread-2] [FileUtil:245] C:\Users\deju\Documents\deju-mbpro.local (3)\Liferay\ThisIsATest
      java.nio.file.AccessDeniedException: C:\Users\deju\Documents\deju-mbpro.local (3)\Liferay\ThisIsATest
              at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
              at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
              at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
              at sun.nio.fs.WindowsFileSystemProvider.newByteChannel(Unknown Source)
              at java.nio.file.Files.newByteChannel(Unknown Source)
              at java.nio.file.Files.newByteChannel(Unknown Source)
              at java.nio.file.spi.FileSystemProvider.newInputStream(Unknown Source)
              at java.nio.file.Files.newInputStream(Unknown Source)
              at com.liferay.sync.engine.util.FileUtil.getChecksum(FileUtil.java:237)
              at com.liferay.sync.engine.service.SyncFileService.updateFileSyncFile(SyncFileService.java:918)
              at com.liferay.sync.engine.file.system.SyncWatchEventProcessor.modifyFile(SyncWatchEventProcessor.java:577)
              at com.liferay.sync.engine.file.system.SyncWatchEventProcessor.processSyncWatchEvent(SyncWatchEventProcessor.java:720)
              at com.liferay.sync.engine.file.system.SyncWatchEventProcessor.doRun(SyncWatchEventProcessor.java:499)
              at com.liferay.sync.engine.file.system.SyncWatchEventProcessor.run(SyncWatchEventProcessor.java:142)
              at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
              at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
              at java.lang.Thread.run(Unknown Source)
      18:20:11.884 TRACE [pool-11-thread-2] [BaseEvent:190] Processing event UpdateFileEntryEvent file path C:\Users\deju\Documents\deju-mbpro.local (3)\Liferay\ThisIsATest
      18:20:11.888 DEBUG [pool-11-thread-2] [BatchEvent:118] C:\Users\deju\Documents\deju-mbpro.local (3)\Liferay\ThisIsATest
      java.nio.file.AccessDeniedException: C:\Users\deju\Documents\deju-mbpro.local (3)\Liferay\ThisIsATest
              at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
              at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
              at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
              at sun.nio.fs.WindowsFileSystemProvider.newByteChannel(Unknown Source)
              at java.nio.file.Files.newByteChannel(Unknown Source)
              at java.nio.file.Files.newByteChannel(Unknown Source)
              at java.nio.file.spi.FileSystemProvider.newInputStream(Unknown Source)
              at java.nio.file.Files.newInputStream(Unknown Source)
              at com.liferay.sync.engine.document.library.util.BatchEvent.writeFilePathToZip(BatchEvent.java:212)
              at com.liferay.sync.engine.document.library.util.BatchEvent.addFile(BatchEvent.java:180)
              at com.liferay.sync.engine.document.library.util.BatchEvent.addEvent(BatchEvent.java:85)
              at com.liferay.sync.engine.document.library.event.BaseEvent.processAsynchronousRequest(BaseEvent.java:204)
              at com.liferay.sync.engine.document.library.event.UpdateFileEntryEvent.processRequest(UpdateFileEntryEvent.java:61)
              at com.liferay.sync.engine.document.library.event.BaseEvent.doRun(BaseEvent.java:171)
              at com.liferay.sync.engine.document.library.event.BaseEvent.run(BaseEvent.java:152)
              at com.liferay.sync.engine.document.library.util.FileEventUtil.updateFile(FileEventUtil.java:537)
              at com.liferay.sync.engine.service.SyncFileService.updateFileSyncFile(SyncFileService.java:945)
              at com.liferay.sync.engine.file.system.SyncWatchEventProcessor.modifyFile(SyncWatchEventProcessor.java:577)
              at com.liferay.sync.engine.file.system.SyncWatchEventProcessor.processSyncWatchEvent(SyncWatchEventProcessor.java:720)
              at com.liferay.sync.engine.file.system.SyncWatchEventProcessor.doRun(SyncWatchEventProcessor.java:499)
              at com.liferay.sync.engine.file.system.SyncWatchEventProcessor.run(SyncWatchEventProcessor.java:142)
              at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
              at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
              at java.lang.Thread.run(Unknown Source)
      18:20:11.891 DEBUG [pool-43-thread-1] [BaseHandler:80] Handling exception java.lang.IllegalArgumentException: Requested permits (0) must be positive
      18:20:11.891 ERROR [pool-43-thread-1] [BaseHandler:150] Requested permits (0) must be positive
      java.lang.IllegalArgumentException: Requested permits (0) must be positive
              at com.google.common.base.Preconditions.checkArgument(Preconditions.java:146)
              at com.google.common.util.concurrent.RateLimiter.checkPermits(RateLimiter.java:435)
              at com.google.common.util.concurrent.RateLimiter.reserve(RateLimiter.java:288)
              at com.google.common.util.concurrent.RateLimiter.acquire(RateLimiter.java:276)
              at com.liferay.sync.engine.session.rate.limiter.RateLimitedOutputStream.write(RateLimitedOutputStream.java:52)
              at org.apache.http.entity.mime.AbstractMultipartForm.writeBytes(AbstractMultipartForm.java:61)
              at org.apache.http.entity.mime.AbstractMultipartForm.writeBytes(AbstractMultipartForm.java:73)
              at org.apache.http.entity.mime.AbstractMultipartForm.writeField(AbstractMultipartForm.java:80)
              at org.apache.http.entity.mime.HttpStrictMultipart.formatMultipartHeader(HttpStrictMultipart.java:67)
              at org.apache.http.entity.mime.AbstractMultipartForm.doWriteTo(AbstractMultipartForm.java:129)
              at org.apache.http.entity.mime.AbstractMultipartForm.writeTo(AbstractMultipartForm.java:157)
              at org.apache.http.entity.mime.MultipartFormEntity.writeTo(MultipartFormEntity.java:113)
              at com.liferay.sync.engine.session.SyncManagedHttpClientConnection.sendRequestEntity(SyncManagedHttpClientConnection.java:85)
              at org.apache.http.impl.conn.CPoolProxy.sendRequestEntity(CPoolProxy.java:162)
              at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:238)
              at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
              at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271)
              at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
              at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
              at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
              at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)
              at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:220)
              at com.liferay.sync.engine.session.Session.execute(Session.java:320)
              at com.liferay.sync.engine.session.Session$2.run(Session.java:288)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
              at java.lang.Thread.run(Unknown Source)
      
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  2 years, 42 weeks ago

                  Packages

                  Version Package
                  Desktop-3.4.2 GA3