Closed itn3rd77 closed 7 years ago
I just tried to change my sitemap using vi on the command line and immediately after saving the file the reload was successful. I have tested it with Eclipse SmartHome and also on openHAB.
What kind of linux distribution are you using? How did you install openHAB? Your folder structure /var/packages/openHAB2/target/src/conf
sounds "strange", i.e. why is there a target/src
in there?.
Can you reproduce the exception with a fresh installation of openHAB?
Hi,
thanks for looking into this. I am using openHAB on a Synology NAS (x86-based). openHAB is installed with a proper Synology package I maintain for myself. Synology packages install under /var/packages/<name-of-the-package>
. The /target
folder is a fixed folder added by the Synology installer. Within the /target
folder lives the content of the package e.g. the openHAB "sources" and some other stuff.
Maybe it is a problem with symbolic links. The conf
folder is a symbolic link.
I am using openHAB on my Synology NAS for over a year now and I can not remember have seen this behaviour before. It´s not a big issue as the reload is successful after the two exceptions are thrown.
With a fresh installation of the Synology package I can reproduce the exception.
If I move my conf folder into conf-target
and set up a symlink conf
pointing to conf-target
and then edit my sitemap with vim on the console, the reload is successful for me without any exception.
Is your symlink pointing to a different file-system, maybe on NFS where it is sometimes not available?
The symlink is pointing to a Btrfs-Volume which is on the same physical hard disk.
From the code I can see that this exception is thrown when "canRead" is checked on a file. As you seem to have 4 subsequent notifications from the OS, I would assume that the OS updates the file in multiple steps and not as a single transaction. I could imagine that this is caused by editing a file through Samba, so that the Samba server actually ajusts the file permissions only after writing the file.
There isn't really much we can do about it. But I think we definitely should not log an error including stacktrace in such a case. My suggestion would be to reduce this to a warning and remove the stacktrace - this would be less intrusive, but still inform the user that something fishy is going on in the file system.
I'am fine with that. Just wanted to bring this to your attention.
Hi,
when I edit and save a config file inside the conf folder I see two IOExceptions before the reload is successful.
I am editing the files directly from command line using vi.
Regards Ingo