[SYMLINK] Failure: java.nio.file.FileSystemException

All your suggestions, requests and ideas for future development
Post Reply
foo
Posts: 4
Joined: 04 Mar 2019, 08:33

[SYMLINK] Failure: java.nio.file.FileSystemException

Post by foo » 04 Mar 2019, 09:00

Hi,

I bought a license a few minutes ago, and would like to apply for a refund should there not be a solution to the below problem, as this is my sole use-case.


Actual Behaviour
- filebot errors out when trying to create a symlink on a CIFS share
- hardlinks work

Expected Behaviour
- filebot successfully creates a symlink on a CIFS share


Symlink Example

Code: Select all

~/filebot/filebot.sh -rename "/home/file.mkv" --output "/home/files/" --action symlink --format "{plex}" --db TheTVDB -non-strict -no-xattr --conflict override
Picked up _JAVA_OPTIONS: -Dsun.io.useCanonCaches=false,sun.io.useCanonPrefixCache=false,-Dsun.jnu.encoding=UTF-8
Rename episodes using [TheTVDB]
Auto-detected query: [Last Week Tonight with John Oliver]
Fetching episode data for [Last Week Tonight with John Oliver]
[SYMLINK] from [/home/file.mkv] to [/home/files/file.mkv]
[SYMLINK] Failure: java.nio.file.FileSystemException: /home/file.mkv: Operation not supported
Processed 0 files
/home/file.mkv: Operation not supported
java.nio.file.FileSystemException: /home/file.mkv: Operation not supported
	at net.filebot.util.FileUtilities.createRelativeSymlink(FileUtilities.java:136)
	at net.filebot.StandardRenameAction$4.rename(StandardRenameAction.java:62)
	at net.filebot.cli.CmdlineOperations.renameAll(CmdlineOperations.java:635)
	at net.filebot.cli.CmdlineOperations.renameSeries(CmdlineOperations.java:250)
	at net.filebot.cli.CmdlineOperations.rename(CmdlineOperations.java:96)
	at net.filebot.cli.ArgumentProcessor.runCommand(ArgumentProcessor.java:115)
	at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:32)
	at net.filebot.Main.main(Main.java:131)

Failure (°_°)
Hardlink Example

Code: Select all

~/filebot/filebot.sh -rename "/home/file.mkv" --output "/home/files/" --action hardlink --format "{plex}" --db TheTVDB -non-strict -no-xattr --conflict override
Picked up _JAVA_OPTIONS: -Dsun.io.useCanonCaches=false,sun.io.useCanonPrefixCache=false,-Dsun.jnu.encoding=UTF-8
Rename episodes using [TheTVDB]
Auto-detected query: [Last Week Tonight with John Oliver]
Fetching episode data for [Last Week Tonight with John Oliver]
[HARDLINK] from [/home/file.mkv] to [/home/files/file.mkv]
Processed 1 files
fn:sysinfo

Code: Select all

Picked up _JAVA_OPTIONS: -Dsun.io.useCanonCaches=false,sun.io.useCanonPrefixCache=false,-Dsun.jnu.encoding=UTF-8
FileBot 4.8.2 (r5789)
JNA Native: 5.2.2
MediaInfo: 18.05
7-Zip-JBinding: 9.20
Chromaprint: java.io.IOException: Cannot run program "fpcalc": error=2, No such file or directory
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2019-02-26 (r552)
Groovy: 2.5.1
JRE: OpenJDK Runtime Environment 1.8.0_191
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 4 Core / 1 GB Max Memory / 14 MB Used Memory
OS: Linux (amd64)
HW: Linux bytes-vm 4.18.0-15-generic #16-Ubuntu SMP Thu Feb 7 10:56:39 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
DATA: /home/xxxxx
Package: TAR
License: FileBot License XXXXXXXXX (Valid-Until: 2069-03-04)
Done ヾ(@⌒ー⌒@)ノ

Would be much appreciated if you could kindly get back to me.

Thanks!

User avatar
rednoah
The Source
Posts: 16940
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [SYMLINK] Failure: java.nio.file.FileSystemException

Post by rednoah » 04 Mar 2019, 09:38

1.
This output seems unlikely. Presumably, you have changed the actual file paths?

Code: Select all

[SYMLINK] from [/home/file.mkv] to [/home/files/file.mkv]

:?: Can you confirm that symlinks actually work on the target filesystem the way you want?


e.g. absolute symlink:

Code: Select all

ln -s "/home/file.mkv" "/home/files/file.mkv"
e.g. relative symlink

Code: Select all

ln -s "../../file.mkv" "/home/files/file.mkv"

:idea: SMB / CIFS is kind of a Windows thing, so Unix features don't work well. If you use NFS then things will likely just work just like on your local Unix flavor filesystem.

:idea: The solution is likely in how you mount your remote filesystem. If FileBot can't create a symlink, then ln -s probably can't either, and that would tell us that the operating system / file system just can't due to some technical limitation.



2.
At best, this does nothing. At worst, it breaks things. "," is typically not a field separator, " " (blank) is.

Code: Select all

-Dsun.io.useCanonCaches=false,sun.io.useCanonPrefixCache=false,-Dsun.jnu.encoding=UTF-8
The correct usage would be this:

Code: Select all

export JAVA_OPTIONS="-Dsun.io.useCanonCaches=false sun.io.useCanonPrefixCache=false -Dsun.jnu.encoding=UTF-8"
:idea: Worth a try, but I'd be surprised if that's actually the solution.
:idea: Please read the FAQ and How to Request Help.

foo
Posts: 4
Joined: 04 Mar 2019, 08:33

Re: [SYMLINK] Failure: java.nio.file.FileSystemException

Post by foo » 04 Mar 2019, 10:08

Cheers, appreciate the quick response.

Unfortunately, you are right--and the solution is so obvious that it did not even occur to me :/

https://askubuntu.com/questions/416334/ ... -over-cifs
You can't create symlinks on CIFS/samba shares. Symbolic links are intrinsic parts of the filesystem where the files are stored (aka the remote physical disk) and you can't modify the inodes of those unless you have direct access to the drive, which you don't due the characteristics of the CIFS protocol.
Would you please be able to provide me with a refund?

Seems like I have to look around for another solution...

User avatar
rednoah
The Source
Posts: 16940
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [SYMLINK] Failure: java.nio.file.FileSystemException

Post by rednoah » 04 Mar 2019, 10:21

Assuming that your SAMBA server is running Unix, you might be able to use NFS (probably harder) or SSHFS (probably easier) to get more direct access to the host filesystem.

Since FileBot supports pretty much any OS, you can also just run FileBot directly on the host server.
:idea: Please read the FAQ and How to Request Help.

foo
Posts: 4
Joined: 04 Mar 2019, 08:33

Re: [SYMLINK] Failure: java.nio.file.FileSystemException

Post by foo » 04 Mar 2019, 10:29

Ha! Managed to get it to work via an NFS export.

Thanks so much for your hard work on this project, and the detailed support. Those USD60 are well-deserved :)

Have a great week!

User avatar
rednoah
The Source
Posts: 16940
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [SYMLINK] Failure: java.nio.file.FileSystemException

Post by rednoah » 04 Mar 2019, 10:53

Much appreciated! Glad it was an easy fix! :)

Can you possibly share your solution in a small tutorial maybe with screenshots? So that others my find your solution via Google in the future. ;)
:idea: Please read the FAQ and How to Request Help.

foo
Posts: 4
Joined: 04 Mar 2019, 08:33

Re: [SYMLINK] Failure: java.nio.file.FileSystemException

Post by foo » 04 Mar 2019, 17:22

I just needed to create an NFS share, vs a CIFS share. There are plenty of tutorials for this online, one is https://linuxconfig.org/how-to-configur ... etch-linux.

Post Reply