Page 1 of 1

line 65: java: command not found but works via ssh

Posted: 26 Apr 2018, 17:01
by ralfr
Hi there,

This is not a duplication of the other post with the same error message!

My situation is as follows:

1. Installed Java and upgraded to Oracle Java 8:

Code: Select all

root@station:~# java -version
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)
2. Logging in via ssh, filebot works fine:

Code: Select all

root@station:~# filebot -version
FileBot 4.7.9 (r4984) / Java(TM) SE Runtime Environment 1.8.0_171 / Linux 4.4.15+ (amd64)
3. FileBot Node launches without any errors. I can configure folders etc. and schedule tasks.

4. However, when I hit "Execute", I get the dreaded:

Code: Select all

filebot -script 'fn:amc' /volume1/downloads --output /volume1/video/ --action duplicate -non-strict --conflict auto --lang en --def 'music=y' 'unsorted=y' 'artwork=y' 'clean=y' 'deleteAfterExtract=y' 'excludeList=.excludes' --log all --log-file '/volume1/@appstore/filebot-node/data/filebot.log'

------------------------------------------

/usr/local/bin/filebot: line 65: java: command not found
------------------------------------------
filebot -script 'fn:amc' /volume1/downloads --output /volume1/video/ --action duplicate -non-strict --conflict auto --lang en --def 'music=y' 'unsorted=y' 'artwork=y' 'clean=y' 'deleteAfterExtract=y' 'excludeList=.excludes' --log all --log-file '/volume1/@appstore/filebot-node/data/filebot.log'

------------------------------------------

/usr/local/bin/filebot: line 65: java: command not found
------------------------------------------
It seems as if Java is not available to the local user (?) used by the scheduler? I'm new to Synology, so I'm only guessing here. Any help is greatly appreciated!

Re: line 65: java: command not found but works via ssh

Posted: 26 Apr 2018, 17:35
by rednoah
rednoah wrote:Running commands from the login shell is not the same as using Synology DSM Task Scheduler or cron because they'll not initialise with ~/.profile so keep in mind that $PATH will be different.
1.
When you call "java" what "java" is executed? Where is it located? Is that folder in the default system path $PATH?

2.
Did you make sure that there's a symlink at /usr/local/bin/java? Since "filebot" is working, we know that /usr/local/bin is in the $PATH.