Java Not Found

Support for Synology NAS, QNAP NAS and other Embedded Linux systems
Post Reply
negenergy
Posts: 7
Joined: 12 Jul 2015, 13:29

Java Not Found

Post by negenergy »

Hi,

I am having trouble getting Filebot Node working on my NAS, I have read through the forums, and followed the video for installing Java, and didnt have any problems installing it, but I still get the "/usr/local/bin/filebot: line 41: java: not found" error.

Linux NASBOX 2.6.32.12 #5592 Mon Jun 29 17:28:07 CST 2015 armv5tel GNU/Linux synology_88f6282_413j


filebot -script fn:sysinfo

Code: Select all

FileBot 4.6 (r3052)
JNA Native: 4.0.0
MediaInfo: java.lang.UnsatisfiedLinkError: Unable to load library 'mediainfo': Native library (linux-arm/libmediainfo.so) not found in resource path ([file:/volume1/@appstore/filebot/FileBot.jar])
p7zip: Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,1 CPU)
chromaprint-tools: java.io.IOException: Cannot run program "/usr/local/chromaprint/bin/fpcalc": error=2, No such file or directory
Extended Attributes: OK
Groovy Engine: 2.4.3
JRE: Java(TM) SE Embedded Runtime Environment 1.8.0_33 (headless)
JVM: 32-bit Java HotSpot(TM) Embedded Client VM
CPU/MEM: 1 Core / 121 MB Max Memory / 10 MB Used Memory
OS: Linux (arm)
uname: Linux NASBOX 2.6.32.12 #5592 Mon Jun 29 17:28:07 CST 2015 armv5tel GNU/Linux synology_88f6282_413j
Done ヾ(@⌒ー⌒@)ノ
Java -version

Code: Select all

java version "1.8.0_33"
Java(TM) SE Embedded Runtime Environment (build 1.8.0_33-b05, headless)
Java HotSpot(TM) Embedded Client VM (build 25.33-b05, mixed mode)
Which Java

Code: Select all

/usr/local/bin/java
The only thing I can think of is I had to ssh with root account, as admin account didnt have permissions to create the local folder, could that be the issue?

Thanks for the package, hopefully I can get it working soon.
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Java Not Found

Post by rednoah »

That's weird. /usr/local/bin should be in the PATH by default. Have you tried linking to /usr/bin and see if that works? Or putting the absolute path for java in the filebot.sh script?
:idea: Please read the FAQ and How to Request Help.
negenergy
Posts: 7
Joined: 12 Jul 2015, 13:29

Re: Java Not Found

Post by negenergy »

Linking to /usr/bin has not made any difference, I get the error executing System Info through the GUI.

I have not attempted to use it yet, as I expect there is something wrong with Java, based on the error.

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

Re: Java Not Found

Post by rednoah »

The error indicates that it can't find the java executable. But it seems to work if you run via SSH. I guess your $PATH variables is making the difference. I'd check what's different in your login shell environment compared to the environment in which filebot is called by FileBot Node.
:idea: Please read the FAQ and How to Request Help.
negenergy
Posts: 7
Joined: 12 Jul 2015, 13:29

Re: Java Not Found

Post by negenergy »

Thank you very much for your help, I am new to linux, and am having trouble. I have googled as much as I can to try and find out what I can, but am not having much luck.

My understanding from what you are saying is, the $PATH being assigned when logged in as Admin through the DSM is different than that when I am logged in as Admin through SSH.

Can you give me any pointers where I would check the configuration for the assigned $PATH whilst logged in through the DSM?

I'm happy to give you access to my NAS if you'd be so kind to check it out.

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

Re: Java Not Found

Post by rednoah »

You can do echo $PATH to see the path variable.

The latest FileBot Node should also log the environment variables on startup. (Package Center -> FileBot Node -> View Log)

Send me the two outputs please.
:idea: Please read the FAQ and How to Request Help.
negenergy
Posts: 7
Joined: 12 Jul 2015, 13:29

Re: Java Not Found

Post by negenergy »

echo $PATH

Code: Select all

/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin:/volume1/@appstore/java8/ejdk1.8.0_33/linux_arm_sflt/jre/bin
Log File

Code: Select all

ENVIRONMENT { USER: 'admin',
  FILEBOT_CMD_UID: '1024',
  FILEBOT_NODE_HTTPS_CRT: '/usr/syno/etc/ssl/ssl.crt/server.crt',
  FILEBOT_NODE_HTTPS_KEY: '/usr/syno/etc/ssl/ssl.key/server.key',
  OLDPWD: '/',
  SYNOPKG_DSM_VERSION_MAJOR: '5',
  FILEBOT_NODE_AUTH: 'SYNO',
  SYNOPKG_TEMP_LOGFILE: '/volume2/@tmp/55A2873C26B018E2',
  SYNOPKG_PKGDEST: '/volume1/@appstore/filebot-node',
  SYNOPKG_DSM_ARCH: '88f6282',
  FILEBOT_NODE_HTTP_PORT: '5452',
  FILEBOT_NODE_HTTPS_PORT: '5453',
  SYNOPKG_DSM_VERSION_MINOR: '2',
  FILEBOT_NODE_HOST: '0.0.0.0',
  PATH: '/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin',
  FILEBOT_NODE_HTTP: 'YES',
  SYNOPKG_PKGVER: '0.1.6',
  FILEBOT_CMD_GID: '101',
  FILEBOT_NODE_HTTPS: 'YES',
  FILEBOT_NODE_CLIENT: '',
  FILEBOT_CMD: 'filebot',
  PWD: '/volume1/@appstore/filebot-node',
  SYNOPKG_DSM_LANGUAGE: 'def',
  SYNOPKG_PKGDEST_VOL: '/volume1',
  SYNOPKG_PKGNAME: 'filebot-node',
  FILEBOT_CMD_CWD: '/volume1',
  SYNOPKG_DSM_VERSION_BUILD: '5592' }
USER { UID: 1024, GID: 101 }
filebot-node listening at http://0.0.0.0:5452
filebot-node listening at https://0.0.0.0:5453
AUTH_CACHE: {"id=uzDhcLHrOk6k6D8KVN00695":"admin"}
Cheers
neg
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Java Not Found

Post by rednoah »

So /usr/local/bin is definitely in the $PATH. But it's probably not working. The reason java is working via SSH is because /volume1/@appstore/java8/ejdk1.8.0_33/linux_arm_sflt/jre/bin is in the PATH as well.

Are you sure that /usr/local/bin/java works?
:idea: Please read the FAQ and How to Request Help.
negenergy
Posts: 7
Joined: 12 Jul 2015, 13:29

Re: Java Not Found

Post by negenergy »

if I type Java whilst logged in through ssh I get the following, so it appears to be working

Code: Select all

NASBOX> java
Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)
where options include:
    -d32          use a 32-bit data model if available
    -d64          use a 64-bit data model if available
    -client       to select the "client" VM
    -minimal      to select the "minimal" VM
    -server       is a synonym for the "client" VM  [deprecated]
                  The default VM is client.

    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
                  A : separated list of directories, JAR archives,
                  and ZIP archives to search for class files.
    -D<name>=<value>
                  set a system property
    -verbose:[class|gc|jni]
                  enable verbose output
    -version      print product version and exit
    -version:<value>
                  require the specified version to run
    -showversion  print product version and continue
    -jre-restrict-search | -no-jre-restrict-search
                  include/exclude user private JREs in the version search
    -? -help      print this help message
    -X            print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
                  enable assertions with specified granularity
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
                  disable assertions with specified granularity
    -esa | -enablesystemassertions
                  enable system assertions
    -dsa | -disablesystemassertions
                  disable system assertions
    -agentlib:<libname>[=<options>]
                  load native agent library <libname>, e.g. -agentlib:hprof
                  see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
                  load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
                  load Java programming language agent, see java.lang.instrument
    -splash:<imagepath>
                  show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Java Not Found

Post by rednoah »

Yep. That's what I said.

Remove /volume1/@appstore/java8/ejdk1.8.0_33/linux_arm_sflt/jre/bin from the PATH (check .bashrc, .profile, etc, google it) and see what happens.

That's why I said try running /usr/local/bin/java NOT java and see what happens.
:idea: Please read the FAQ and How to Request Help.
negenergy
Posts: 7
Joined: 12 Jul 2015, 13:29

Re: Java Not Found

Post by negenergy »

I have spent two and a half hours trying to remove it from the PATH, with no luck, when I reboot the NAS it comes back, I cannot work out which file I need to edit to remove it.

I'm sorry to waste your time, I guess Ill just have to give up, I am new to linux, its been a pretty big learning curve so far.

Thanks for your help
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Java Not Found

Post by rednoah »

1.
Yeah, I'm out of ideas, the output `which` seems somewhat misleading.

2.
So what happens if you run this command?

Code: Select all

/usr/local/bin/java -version
:idea: Please read the FAQ and How to Request Help.
negenergy
Posts: 7
Joined: 12 Jul 2015, 13:29

Re: Java Not Found

Post by negenergy »

Atemptiing that gives me

-ash: /usr/local/bin/java: not found

I will post up on the Synology forums and see if I can get any info there on how to sort out the path.

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

Re: Java Not Found

Post by rednoah »

You simply didn't install java correctly... the manual does explain that, and there's a video tutorial.

@see viewtopic.php?f=3&t=1802
@see https://www.youtube.com/watch?v=8N6hYNj_QzY
:idea: Please read the FAQ and How to Request Help.
Post Reply