troubleshooting.rst 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. Appendix C: Troubleshooting
  2. ===========================
  3. The following two general issues can result in failed synchronization:
  4. - The server setup is incorrect.
  5. - The client contains a bug.
  6. When reporting bugs, it is helpful if you first determine what part of the
  7. system is causing the issue.
  8. Identifying Basic Functionality Problems
  9. ----------------------------------------
  10. :Performing a general Nextcloud Server test:
  11. The first step in troubleshooting synchronization issues is to verify that
  12. you can log on to the Nextcloud web application. To verify connectivity to the
  13. Nextcloud server try logging in via your Web browser.
  14. If you are not prompted for your username and password, or if a red warning
  15. box appears on the page, your server setup requires modification. Please verify
  16. that your server installation is working correctly.
  17. :Ensure the WebDAV API is working:
  18. If all desktop clients fail to connect to the Nextcloud Server, but access
  19. using the Web interface functions properly, the problem is often a
  20. misconfiguration of the WebDAV API.
  21. The Nextcloud Client uses the built-in WebDAV access of the server content.
  22. Verify that you can log on to Nextcloud's WebDAV server. To verify connectivity
  23. with the Nextcloud WebDAV server:
  24. - Open a browser window and enter the address to the Nextcloud WebDAV server.
  25. For example, if your Nextcloud instance is installed at
  26. ``http://yourserver.com/nextcloud``, your WebDAV server address is
  27. ``http://yourserver.com/nextcloud/remote.php/webdav``.
  28. If you are prompted for your username and password but, after providing the
  29. correct credentials, authentication fails, please ensure that your
  30. authentication backend is configured properly.
  31. :Use a WebDAV command line tool to test:
  32. A more sophisticated test method for troubleshooting synchronization issues
  33. is to use a WebDAV command line client and log into the Nextcloud WebDAV server.
  34. One such command line client -- called ``cadaver`` -- is available for Linux
  35. distributions. You can use this application to further verify that the WebDAV
  36. server is running properly using PROPFIND calls.
  37. As an example, after installing the ``cadaver`` app, you can issue the
  38. ``propget`` command to obtain various properties pertaining to the current
  39. directory and also verify WebDAV server connection.
  40. "CSync unknown error"
  41. ---------------------
  42. If you see this error message stop your client, delete the
  43. ``._sync_xxxxxxx.db`` file, and then restart your client.
  44. There is a hidden ``._sync_xxxxxxx.db`` file inside the folder of every account
  45. configured on your client.
  46. .. NOTE::
  47. Please note that this will also erase some of your settings about which
  48. files to download.
  49. See https://github.com/owncloud/client/issues/5226 for more discussion of this
  50. issue.
  51. Isolating other issues
  52. ----------------------
  53. Other issues can affect synchronization of your Nextcloud files:
  54. - If you find that the results of the synchronizations are unreliable, please
  55. ensure that the folder to which you are synchronizing is not shared with
  56. other synchronization applications.
  57. - Synchronizing the same directory with Nextcloud and other synchronization
  58. software such as Unison, rsync, Microsoft Windows Offline Folders, or other
  59. cloud services such as Dropbox or Microsoft SkyDrive is not supported and
  60. should not be attempted. In the worst case, it is possible that synchronizing
  61. folders or files using Nextcloud and other synchronization software or
  62. services can result in data loss.
  63. - If you find that only specific files are not synchronized, the
  64. synchronization protocol might be having an effect. Some files are
  65. automatically ignored because they are system files, other files might be
  66. ignored because their filename contains characters that are not supported on
  67. certain file systems. For more information about ignored files, see
  68. :ref:`ignored-files-label`.
  69. - If you are operating your own server, and use the local storage backend (the
  70. default), make sure that Nextcloud has exclusive access to the directory.
  71. .. warning:: The data directory on the server is exclusive to Nextcloud and must not be modified manually.
  72. - If you are using a different file backend on the server, you can try to exclude a bug in the
  73. backend by reverting to the built-in backend.
  74. - If you are experiencing slow upload/download speed or similar performance issues
  75. be aware that those could be caused by on-access virus scanning solutions, either
  76. on the server (like the files_antivirus app) or the client.
  77. Log Files
  78. ---------
  79. Effectively debugging software requires as much relevant information as can be
  80. obtained. To assist the Nextcloud support personnel, please try to provide as
  81. many relevant logs as possible. Log output can help with tracking down
  82. problems and, if you report a bug, log output can help to resolve an issue more
  83. quickly.
  84. Obtaining the Client Log File
  85. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  86. To obtain the client log file:
  87. 1. Open the Nextcloud Desktop Client.
  88. 2. Press F12 on your keyboard.
  89. The Log Output window opens.
  90. .. image:: images/log_output_window.png
  91. 3. Click the 'Save' button.
  92. The Save Log File window opens.
  93. .. image:: images/save_log_file.png
  94. 4. Migrate to a location on your system where you want to save your log file.
  95. 5. Name the log file and click the 'Save' button.
  96. The log file is saved in the location specified.
  97. Alternatively, you can launch the Nextcloud Log Output window using the
  98. ``--logwindow`` command. After issuing this command, the Log Output window
  99. opens to show the current log. You can then follow the same procedures
  100. mentioned above to save the log to a file.
  101. .. note:: You can also open a log window for an already running session, by
  102. restarting the client using the following command:
  103. * Windows: ``C:\Program Files (x86)\Nextcloud\nextcloud.exe --logwindow``
  104. * macOS: ``/Applications/nextcloud.app/Contents/MacOS/nextcloud --logwindow``
  105. * Linux: ``nextcloud --logwindow``
  106. Saving Files Directly
  107. ~~~~~~~~~~~~~~~~~~~~~
  108. The Nextcloud client enables you to save log files directly to a predefined file
  109. or directory. This is a useful option for troubleshooting sporadic issues as
  110. it enables you to log large amounts of data and bypass the limited buffer
  111. settings associated with the log window.
  112. To enable logging to a directory, stop the client and add the following to the General section in the configuration file:
  113. ```
  114. [General]
  115. logDebug=true
  116. logExpire=<hours>
  117. logDir=<dir>
  118. ```
  119. .. note:: Independent of platform you must use slash (/) as a path reparator:
  120. * Correct: C:/Temp
  121. * Not correct: C:\Temp
  122. As an example, to keep log data for two days in a directory called temp:
  123. ```
  124. [General]
  125. logDebug=true
  126. logExpire=48
  127. logDir=C:/Temp
  128. ```
  129. Once you restart the client, you will find the log file in the ``<dir>`` defined in ``logDir``.
  130. .. note:: You will find the configuration file in the following locations:
  131. * Microsoft Windows systems: ``%APPDATA%\Nextcloud\nextcloud.cfg``
  132. * macOS systems: ``$HOME/Library/Preferences/Nextcloud/nextcloud.cfg``
  133. * Linux distributions: ``$HOME/.config/Nextcloud/nextcloud.cfg``
  134. Alternatively, you can start the client in the command line with parameters:
  135. 1. To save to a file, start the client using the ``--logfile <file>`` command,
  136. where ``<file>`` is the filename to which you want to save the file.
  137. 2. To save to a directory, start the client using the ``--logdir <dir>`` command, where ``<dir>``
  138. is an existing directory.
  139. When using the ``--logdir`` command, each sync run creates a new file. To limit
  140. the amount of data that accumulates over time, you can specify the
  141. ``--logexpire <hours>`` command. When combined with the ``--logdir`` command,
  142. the client automatically erases saved log data in the directory that is older
  143. than the specified number of hours.
  144. As an example, to define a test where you keep log data for two days, you can
  145. issue the following command:
  146. ```
  147. nextcloud --logdir /tmp/nextcloud_logs --logexpire 48
  148. ```
  149. Nextcloud server Log File
  150. ~~~~~~~~~~~~~~~~~~~~~~~~~
  151. The Nextcloud server also maintains an Nextcloud specific log file. This log file
  152. must be enabled through the Nextcloud Administration page. On that page, you can
  153. adjust the log level. We recommend that when setting the log file level that
  154. you set it to a verbose level like ``Debug`` or ``Info``.
  155. You can view the server log file using the web interface or you can open it
  156. directly from the file system in the Nextcloud server data directory.
  157. .. todo:: Need more information on this. How is the log file accessed?
  158. Need to explore procedural steps in access and in saving this file ... similar
  159. to how the log file is managed for the client. Perhaps it is detailed in the
  160. Admin Guide and a link should be provided from here. I will look into that
  161. when I begin heavily editing the Admin Guide.
  162. Webserver Log Files
  163. ~~~~~~~~~~~~~~~~~~~
  164. It can be helpful to view your webserver's error log file to isolate any
  165. Nextcloud-related problems. For Apache on Linux, the error logs are typically
  166. located in the ``/var/log/apache2`` directory. Some helpful files include the
  167. following:
  168. - ``error_log`` -- Maintains errors associated with PHP code.
  169. - ``access_log`` -- Typically records all requests handled by the server; very
  170. useful as a debugging tool because the log line contains information specific
  171. to each request and its result.
  172. You can find more information about Apache logging at
  173. ``http://httpd.apache.org/docs/current/logs.html``.
  174. Core Dumps
  175. ----------
  176. On macOS and Linux systems, and in the unlikely event the client software
  177. crashes, the client is able to write a core dump file. Obtaining a core dump
  178. file can assist Nextcloud Customer Support tremendously in the debugging
  179. process.
  180. To enable the writing of core dump files, you must define the
  181. ``OWNCLOUD_CORE_DUMP`` environment variable on the system.
  182. For example:
  183. ```
  184. OWNCLOUD_CORE_DUMP=1 nextcloud
  185. ```
  186. This command starts the client with core dumping enabled and saves the files in
  187. the current working directory.
  188. .. note:: Core dump files can be fairly large. Before enabling core dumps on
  189. your system, ensure that you have enough disk space to accommodate these files.
  190. Also, due to their size, we strongly recommend that you properly compress any
  191. core dump files prior to sending them to Nextcloud Customer Support.