• Some files not accessible through WebDAV

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #42503  by MKochS
 
System: Debian Wheezy, OKM 6.3.1 (upgraded from 6.3.0)

For backup purposes, I have mounted okm_root read-only to a directory with davfs2 on Debian Wheezy. I am backing up this directory, in my case it is called /var/import/localhost/okm_root.

For some reason, most files in this directory are readable and get backed up while a few are not. I am unable to find out what causes some files to be unreadable. I have double-checked for file corruption, file ownership and access rights and they seem to be ok.

I. e., the taxonomy root contains a folder hierarchy like Ablage/2013/MLS/2013-11-08/
Code: Select all
# cat /etc/mtab|grep dav
https://localhost/OpenKM/webdav/ /var/import/localhost fuse rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,max_read=16384 0 0
All files in this folder are accessible from OKM, I can perform any operation with them. But I am getting errors when accessing them on the filesystem level. Listing them with
Code: Select all
# ls -l /var/import/localhost/okm_root/Ablage/2013/MLS/2013-11-08
shows the files with ownership root/root and rights 644, as they are supposed to be.
Code: Select all
# ls -l /var/import/localhost/okm_root/Ablage/2013/MLS/2013-11-08
insgesamt 1779
-rw-r--r-- 1 root root 337101 Nov  8  2013 2013-11-08_19-16-16.gpx
-rw-r--r-- 1 root root 186293 Nov 26  2013 2013-11-08 Fahrtbericht.pdf
-rw-r--r-- 1 root root   3114 Nov  9  2013 2013-11-08 FB.docx
-rw-r--r-- 1 root root 155763 Nov  9  2013 2013-11-08 FB.pdf
-rw-r--r-- 1 root root 239649 Nov  9  2013 2013-11-09 00 44 48.png
-rw-r--r-- 1 root root    138 Jan 28  2015 5-447921
-rw-r--r-- 1 root root  21502 Jan 28  2015 6-gelandet 20 54
-rw-r--r-- 1 root root 438095 Jan 28  2015 7-Neues Dokument 11 - Scanned by CamScanner
-rw-r--r-- 1 root root 437240 Nov 20  2013 NeuesDokument11.pdf
One file is for some reason not readable, I cannot copy it:
Code: Select all
# cp NeuesDokument11.pdf /temp
cp: „NeuesDokument11.pdf“ kann nicht zum Lesen geöffnet werden: Eingabe-/Ausgabefehler
(cannot read: input/output error)

Consequently, it is not backed up - rsync breaks with error "no data (5)".

This is the relevant section from catalina.log:
Code: Select all
2016-10-31 14:37:29,114 [http-bio-127.0.0.1-8080-exec-308] INFO  com.bradmcevoy.http.HttpManager- GET :: http://127.0.0.1:8080/OpenKM/webdav/okm_root/Ablage/2013/MLS/2013-11-08/NeuesDokument11.pdf - http://127.0.0.1:8080/OpenKM/webdav/okm_root/Ablage/2013/MLS/2013-11-08/NeuesDokument11.pdf
I have a lot of files in the whole root that are unaccessible on the file system level, although they appear to be fine from within OKM. So far, I cannot see an obvious pattern why most of the files are being readable and a few are not.

Wondered if anybody had an idea what's going wrong here?

Edit: loads of typos
 #42509  by jllort
 
I suspect can be some hidden whitespace or similar. Go to Administration > Database query and execute
Code: Select all
// query for mysql for detecting possible white spaces or any other strange character in doc name
select concat(,'[',NBS_NAME,']') from OKM_NODE_BASE WHERE NBS_UUID='doc uuid here';
 #42512  by MKochS
 
OKM-Screenshot.png
OKM-Screenshot.png (26.28 KiB) Viewed 6121 times
The file in question did have whitespaces in it's name, but the problem persisted after removing them.
 #42517  by jllort
 
Which database are you using, what comes by default with OpenKM or did you connected to MySQL or other database ( concat is supported by MySQL but not HSQL )
 #42763  by jllort
 
This is the correct query ( there is an extra coma what made it going with error ) :
Code: Select all
select concat('[',NBS_NAME,']') from OKM_NODE_BASE WHERE NBS_UUID='doc uuid here';
Can you show us some screenshot comparing OpenKM UI and webdav indicating two files ( one which is going right and another what fails ).
Also I would like at the same time you test it, take a look at catalina.log file looking for some possible error message.
 #42801  by MKochS
 
First, here is the result of the rectified database query. The query points to the correct file.
Database query
Database query
Bildschirmfoto20.12.2016103224_1.png (106.86 KiB) Viewed 6059 times
The next screenshot shows the file in question on the regular OKM desktop.
The file in question on the regular OKM surface
The file in question on the regular OKM surface
Bildschirmfoto20.12.2016 1036051.png (174.61 KiB) Viewed 6056 times
The third screenshot shows the directory through webdav.
The directory through webdav
The directory through webdav
Bildschirmfoto20.12.20161041381.png (64.15 KiB) Viewed 6059 times
When clicking the file in the webdav surface, a download is tried, but no data is transferred, and the download finally times out with 0 bytes transferred. Downloading the file through the regular OKM surface is possible.
Download through webdav times out
Download through webdav times out
Bildschirmfoto20.12.20161042011.png (112.35 KiB) Viewed 6059 times
The fifth screenshot shows successful file operations through the regular OKM surface (note the previously failed download in the download window in the upper right. The download through the OKM surface however worked well).
Successful file operations through the regular OKM surface
Successful file operations through the regular OKM surface
Bildschirmfoto20.12.20161045081.png (384.27 KiB) Viewed 6051 times
Copying the file from a terminal session isn't possible either.

In all cases, the catalina.log only logs a file access, but no error:
Code: Select all
2016-12-20 10:41:35,359 [http-bio-127.0.0.1-8080-exec-27] INFO  com.bradmcevoy.http.HttpManager- GET :: http://127.0.0.1:8080/OpenKM/webdav/okm_root/Ablage/2013/MLS/2013-11-08/NeuesDokument11.pdf - http://127.0.0.1:8080/OpenKM/webdav/okm_root/Ablage/2013/MLS/2013-11-08/NeuesDokument11.pdf
 #42819  by jllort
 
Now I understood. I do not suggest browser navigation etc... why you do not check the webdrive application https://wiki.openkm.com/index.php/WebDAV_access ( and you connect as network resource https://southrivertech.com/products/webdrive/ )

If you are on linux have other tools for it, you will find information in the previous link.
 #42842  by MKochS
 
The directory is mounted on the server locally through davfs2:
Code: Select all
# cat /etc/mtab
https://localhost/OpenKM/webdav/ /var/import/localhost fuse rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,max_read=16384 0 0
#
Code: Select all
# ls -l /var/import/localhost/
insgesamt 3
drwx------  2 root root   0 Sep 26 16:37 lost+found
drwxr-xr-x 26 root root 936 Jan  8  2015 okm_categories
drwxr-xr-x  5 root root 160 Jan  8  2015 okm_mail
drwxr-xr-x  5 root root 160 Jan  8  2015 okm_personal
drwxr-xr-x  5 root root 168 Jan  8  2015 okm_root
drwxr-xr-x  4 root root 320 Jan  8  2015 okm_templates
#
This is the directory I am working in. I am backing up the subdirectory okm_root with rsync. Almost all of the files are perfectly readable, just a few are not.


The same directory is mounted with davfs2 on another Debian machine (the one I'm normally working on):
Code: Select all
# cat /etc/fstab
https://<my_remote_host>/OpenKM/webdav/ /var/import/ davfs uid=root,gid=bacula,ro,user,noauto 0 0

# cat /etc/mtab
https://<my_remote_host>/OpenKM/webdav/ /var/import/ fuse ro,nosuid,nodev,noexec,relatime,user_id=0,group_id=139,allow_other,max_read=28672 0 0
and the situation is precisely the same there, with the same files not being readable.
 #42848  by jllort
 
Try stupid thing, rename .PDF file to .pdf
The icon associated for this document in OpenKM is the pdf icon ? can you check in properties tab the mime-type value ?
 #42890  by MKochS
 
jllort wrote:Try stupid thing, rename .PDF file to .PDF
The icon associated for this document in OpenKM is the PDF icon ? can you check in properties tab the mime-type value ?
I have renamed the document in question from NeuesDokument11.pdf (extension "pdf" with small letters) to NeuesDokument11.PDF (extension with capital letters), if this is what you mean. It has no effect.

The file has the correct icon, the MIME type is "application/pdf".
 #42892  by jllort
 
No I was talking about rename UpperCase to LowerCase. The mime type should be "application/pdf"all lowercase ( for some reason this forum is writing pdf as uppercase althought we write in lowecase with the editor.
 #42894  by MKochS
 
I have changed the name to all-lowercase now. It makes no difference.

This is written to catalina.log when I am trying to access (i. e. copy) the file:
Code: Select all
2016-12-30 10:20:28,044 [http-bio-127.0.0.1-8080-exec-93] INFO  com.bradmcevoy.http.HttpManager- GET :: http://127.0.0.1:8080/OpenKM/webdav/okm_root/Ablage/2013/MLS/2013-11-08/neuesdokument11.pdf - http://127.0.0.1:8080/OpenKM/webdav/okm_root/Ablage/2013/MLS/2013-11-08/neuesdokument11.pdf
Please note that the file extension again shows up in uppercase letters, even in the quoted logfile excerpt. It is in fact all lowercase.
 #42895  by MKochS
 
For a moment, by the way, I was thinking about whether davfs (as shipped with Debian) could be the culprit; but the problem appears also when I am trying to access the file through the webdav URL with a webbrowser. Maybe it's a problem with the webdav implementation on the server side.
 #42897  by jllort
 
Probably should be something with server side. Arrived at this point the only solution I think is debugging. For it you can download the OpenKMN portable development edition at https://sourceforge.net/projects/openkmportabledev/ and try to replicate the same folders and documents structure ( I think with problematic folder hierarchical structure should be enought ). Try export and import to be sure you are on the most similar scenario.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.