Page 1 of 1

[FileBot Node] The server is temporarily unable to service your request

Posted: 01 Aug 2018, 20:17
by mrknx
Hi all,

I won't open a new tread for my problem and so i post it here. I have a Qnap TS469L and want to rename my Videofiles for Plex using automatically.

If I will start the Filebot Node, a window appears with the response "The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later."

Apache Ant 1.10.5, Filebot 4.2.8, Filebot Node 0.2.8.1 and Java 8 Installer 1.8 is already installed


Can anyone help me, what I did wrong

Sorry for my english


Greats MrKnx

Re: Installing FileBot on QNAP NAS

Posted: 01 Aug 2018, 20:57
by rednoah
1.
Sounds like the FileBot Node Service is not running. Did you install NodeJS as well?

2.
What does the log say?

3.
Where is the log? How do I view the log?

Code: Select all

find / -type f -name filebot-node.log

Code: Select all

cat /path/to/filebot-node.log

Re: [FileBot Node] The server is temporarily unable to service your request

Posted: 02 Aug 2018, 14:35
by mrknx
Hello,

yes Node.Js v8 8.9.4.0 ist already installed.

the response

Code: Select all

cat /path/to/filebot-node.log

No such file or directory

Re: [FileBot Node] The server is temporarily unable to service your request

Posted: 02 Aug 2018, 15:18
by rednoah
/path/to/filebot-node.log is obviously not the actual path... :lol: I don't always have a QNAP NAS ready for testing so I can't always give you a copy & paste solution. A bit of critical thinking is always recommended. ;)


1.

Code: Select all

# find / -name filebot-node.log
/share/CACHEDEV1_DATA/.qpkg/filebot-node/filebot-node.log
2.

Code: Select all

# cat /share/CACHEDEV1_DATA/.qpkg/filebot-node/filebot-node.log
...
filebot-node listening at http://127.0.0.1:5452/

:!: Actual paths my differ on your device, that's why we use find to find the log file first.

Re: [FileBot Node] The server is temporarily unable to service your request

Posted: 02 Aug 2018, 16:55
by mrknx
Oh hoppla, now I understand
path to ...... 😂

I test it this evening.

Thanks

Re: [FileBot Node] The server is temporarily unable to service your request

Posted: 02 Aug 2018, 21:41
by mrknx

Code: Select all

 
# cat /share/CACHEDEV1_DATA/.qpkg/filebot-node/filebot-node.log
+ export FILEBOT_NODE_HOST=127.0.0.1
+ FILEBOT_NODE_HOST=127.0.0.1
+ export FILEBOT_NODE_AUTH=QNAP
+ FILEBOT_NODE_AUTH=QNAP
+ export FILEBOT_NODE_HTTP=YES
+ FILEBOT_NODE_HTTP=YES
+ export FILEBOT_NODE_HTTP_PORT=5452
+ FILEBOT_NODE_HTTP_PORT=5452
+ export USER=admin
+ USER=admin
++ free
++ awk -vm=1024 -vp=0.7 '/Mem:/ {printf "-Xmx%dm", ($2*p)/m; exit}'
+ export JAVA_OPTS=-Xmx2100m
+ JAVA_OPTS=-Xmx2100m
+ export FILEBOT_TASK_CMD=/opt/filebot-node/task
+ FILEBOT_TASK_CMD=/opt/filebot-node/task
+ export FILEBOT_CMD=filebot
+ FILEBOT_CMD=filebot
+ export FILEBOT_CMD_CWD=/share/CACHEDEV1_DATA
+ FILEBOT_CMD_CWD=/share/CACHEDEV1_DATA
++ id -u admin
+ export FILEBOT_CMD_UID=0
+ FILEBOT_CMD_UID=0
++ cat /etc/group
++ cut -d: -f3
++ grep administrators
+ export FILEBOT_CMD_GID=0
+ FILEBOT_CMD_GID=0
+ export FILEBOT_NODE_CLIENT=client
+ FILEBOT_NODE_CLIENT=client
+ cd /share/CACHEDEV1_DATA/.qpkg/filebot-node
+ node --optimize_for_size --use_idle_notification server/app.js
/share/CACHEDEV1_DATA/.qpkg/filebot-node/start: line 26: node: command not found

Re: [FileBot Node] The server is temporarily unable to service your request

Posted: 03 Aug 2018, 07:11
by rednoah
:?: How did you install node? Are you sure that you have installed node?


:!: node is not in the $PATH:

Code: Select all

+ node --optimize_for_size --use_idle_notification server/app.js
/share/CACHEDEV1_DATA/.qpkg/filebot-node/start: line 26: node: command not found

:idea: /usr/local/bin/node must symlink to a valid node executable, otherwise the node command won't work.

Re: [FileBot Node] The server is temporarily unable to service your request

Posted: 03 Aug 2018, 08:06
by mrknx
Hello,

I installed it over the QNAP Appcenter. There it shows that everything is Ok and installed.

How can I post screenshots?

Re: [FileBot Node] The server is temporarily unable to service your request

Posted: 03 Aug 2018, 08:48
by rednoah
1.
There are many screenshot sharing websites you can choose from:
2.
Most QNAP apps always show "OK" without actually checking if anything is actually OK. The first step is to figure out where node is and the second step is to figure out if it works.


find node:

Code: Select all

# find /share -type f -name node
/share/CACHEDEV1_DATA/.qpkg/QDMS/bin/node
/share/CACHEDEV1_DATA/.qpkg/nodejsv8/node/bin/node
run node to see if it works:

Code: Select all

# /share/CACHEDEV1_DATA/.qpkg/nodejsv8/node/bin/node -v
v8.9.4
check if the node command now correctly resolves to our node executable:

Code: Select all

# ls -l `which node`
lrwxrwxrwx 1 admin administrators 50 2018-08-03 00:22 /usr/local/bin/node -> /share/CACHEDEV1_DATA/.qpkg/nodejsv8/node/bin/node

:!: Actual paths my differ on your machine. DO NOT just copy & paste these commands without critical thinking. Read and understand what it does first, find a few tutorial via Google if needed, and then run it for yourself.


If your package doesn't symlink node automatically (the NodeJS v8 package I've got does this though), then you can do it yourself:
symlink node:

Code: Select all

ln -sf /path/to/node /usr/bin/node

EDIT: I wrote a tutorial for this kind of thing: viewtopic.php?f=4&t=6084

Re: [FileBot Node] The server is temporarily unable to service your request

Posted: 05 Aug 2018, 12:34
by mrknx
Hello Noah,

let me show you the results
rednoah wrote: ↑03 Aug 2018, 08:48
find node:

Code: Select all

# find /share -type f -name node
/share/CACHEDEV1_DATA/.qpkg/QDMS/bin/node
/share/CACHEDEV1_DATA/.qpkg/nodejsv8/node/bin/node
in these two folders, node is still there
rednoah wrote: ↑03 Aug 2018, 08:48 run node to see if it works:

Code: Select all

# /share/CACHEDEV1_DATA/.qpkg/nodejsv8/node/bin/node -v
v8.9.4
works
rednoah wrote: ↑03 Aug 2018, 08:48 check if the node command now correctly resolves to our node executable:

Code: Select all

# ls -l `which node`
lrwxrwxrwx 1 admin administrators 50 2018-08-03 00:22 /usr/local/bin/node -> /share/CACHEDEV1_DATA/.qpkg/nodejsv8/node/bin/node
works

Sorry, but i didn't know what i did wrong.

Re: [FileBot Node] The server is temporarily unable to service your request

Posted: 05 Aug 2018, 12:44
by rednoah
:?: So you're saying you still get node: command not found?

Please run these commands and then send the output:

Code: Select all

node -v

Code: Select all

/usr/local/bin/node -v

Re: [FileBot Node] The server is temporarily unable to service your request

Posted: 05 Aug 2018, 13:02
by mrknx
Output

Code: Select all

# node -v
v8.9.4
[~] # /usr/local/bin/node -v
v8.9.4
[~] #

Re: [FileBot Node] The server is temporarily unable to service your request

Posted: 05 Aug 2018, 13:13
by rednoah
The node: command not found issue is solved then. If something still doesn't work, then there's another issue.

Let's check the log. Try to start filebot-node via the QTS WebUI and then run this command and post the output:

Code: Select all

cat /share/CACHEDEV1_DATA/.qpkg/filebot-node/filebot-node.log

Re: [FileBot Node] The server is temporarily unable to service your request

Posted: 05 Aug 2018, 13:17
by mrknx
Hi noah,

i already posted the output from the log at post #7

i tried to start it over the Web UI
output

Code: Select all

[~] # cat /share/CACHEDEV1_DATA/.qpkg/filebot-node/filebot-node.log
+ export FILEBOT_NODE_HOST=127.0.0.1
+ FILEBOT_NODE_HOST=127.0.0.1
+ export FILEBOT_NODE_AUTH=QNAP
+ FILEBOT_NODE_AUTH=QNAP
+ export FILEBOT_NODE_HTTP=YES
+ FILEBOT_NODE_HTTP=YES
+ export FILEBOT_NODE_HTTP_PORT=5452
+ FILEBOT_NODE_HTTP_PORT=5452
+ export USER=admin
+ USER=admin
++ free
++ awk -vm=1024 -vp=0.7 '/Mem:/ {printf "-Xmx%dm", ($2*p)/m; exit}'
+ export JAVA_OPTS=-Xmx2100m
+ JAVA_OPTS=-Xmx2100m
+ export FILEBOT_TASK_CMD=/opt/filebot-node/task
+ FILEBOT_TASK_CMD=/opt/filebot-node/task
+ export FILEBOT_CMD=filebot
+ FILEBOT_CMD=filebot
+ export FILEBOT_CMD_CWD=/share/CACHEDEV1_DATA
+ FILEBOT_CMD_CWD=/share/CACHEDEV1_DATA
++ id -u admin
+ export FILEBOT_CMD_UID=0
+ FILEBOT_CMD_UID=0
++ cat /etc/group
++ grep administrators
++ cut -d: -f3
+ export FILEBOT_CMD_GID=0
+ FILEBOT_CMD_GID=0
+ export FILEBOT_NODE_CLIENT=client
+ FILEBOT_NODE_CLIENT=client
+ cd /share/CACHEDEV1_DATA/.qpkg/filebot-node
+ node --optimize_for_size --use_idle_notification server/app.js
/share/CACHEDEV1_DATA/.qpkg/filebot-node/start: line 26: node: command not found
[~] #


Re: [FileBot Node] The server is temporarily unable to service your request

Posted: 05 Aug 2018, 13:24
by mrknx
There is another version of node in this folder??

Code: Select all

[~] # /share/CACHEDEV1_DATA/.qpkg/QDMS/bin/node -v
v4.4.7
[~] #

Re: [FileBot Node] The server is temporarily unable to service your request

Posted: 05 Aug 2018, 13:29
by rednoah
This doesn't make sense. Looking into it further will require some basic Linux skills on your end.


1.
Assuming that /usr/local/bin/node exists, the only explanation is that /usr/local/bin is not in the $PATH:

Modify the start script and add the printenv command at the top, then restart via QTS WebUI, then check the log again and see check the printenv output if the $PATH isn't what we expect:

Code: Select all

sudo vi /share/CACHEDEV1_DATA/.qpkg/filebot-node/start
:idea: You'll need to learn how the vi editor works first. It can be tricky.


2.
Assuming that the $PATH just doesn't work for mysterious reasons, modify start and replace the node command with the absolute path to the executable (since that can't not work, or will give us a different error at the very least).

Code: Select all

/share/CACHEDEV1_DATA/.qpkg/nodejsv8/node/bin/node --optimize_for_size --use_idle_notification "server/app.js"

3.
FileBot Node should work with either NodeJS version, but the error above has nothing to do with any particular version of node, since node isn't even called in the first place.

Re: [FileBot Node] The server is temporarily unable to service your request

Posted: 05 Aug 2018, 14:01
by mrknx
Hi noah,

/usr/local/bin/node is there.

i added the printenv command at the top of the start script

Code: Select all

#!/bin/sh -x

printenv


export FILEBOT_NODE_HOST="127.0.0.1" # bind to local apache reverse proxy
export FILEBOT_NODE_AUTH="QNAP"

export FILEBOT_NODE_HTTP="YES"
export FILEBOT_NODE_HTTP_PORT="5452"

export USER="admin"                                                                           # set admin as filebot user
export JAVA_OPTS=`free | awk -vm=1024 -vp=0.7 '/Mem:/ {printf "-Xmx%dm", ($2*p)/m; exit}'`    # set -Xmx to 0.7 of physical memory
    
export FILEBOT_TASK_CMD="/opt/filebot-node/task"

export FILEBOT_CMD="filebot" 
export FILEBOT_CMD_CWD="$QPKG_DEFAULT_VOLUME"
export FILEBOT_CMD_UID=`id -u $USER`
@
@             
"/share/CACHEDEV1_DATA/.qpkg/filebot-node/start" 29 lines, 1154 characters writt
en
then i restarted Filebot-node via WebUI and the log seems like the same as before?? Or do you mean, i have to restart the Qnap NAS??

Code: Select all

[~] # cat /share/CACHEDEV1_DATA/.qpkg/filebot-node/filebot-node.log
+ export FILEBOT_NODE_HOST=127.0.0.1
+ FILEBOT_NODE_HOST=127.0.0.1
+ export FILEBOT_NODE_AUTH=QNAP
+ FILEBOT_NODE_AUTH=QNAP
+ export FILEBOT_NODE_HTTP=YES
+ FILEBOT_NODE_HTTP=YES
+ export FILEBOT_NODE_HTTP_PORT=5452
+ FILEBOT_NODE_HTTP_PORT=5452
+ export USER=admin
+ USER=admin
++ free
++ awk -vm=1024 -vp=0.7 '/Mem:/ {printf "-Xmx%dm", ($2*p)/m; exit}'
+ export JAVA_OPTS=-Xmx2100m
+ JAVA_OPTS=-Xmx2100m
+ export FILEBOT_TASK_CMD=/opt/filebot-node/task
+ FILEBOT_TASK_CMD=/opt/filebot-node/task
+ export FILEBOT_CMD=filebot
+ FILEBOT_CMD=filebot
+ export FILEBOT_CMD_CWD=/share/CACHEDEV1_DATA
+ FILEBOT_CMD_CWD=/share/CACHEDEV1_DATA
++ id -u admin
+ export FILEBOT_CMD_UID=0
+ FILEBOT_CMD_UID=0
++ cat /etc/group
++ grep administrators
++ cut -d: -f3
+ export FILEBOT_CMD_GID=0
+ FILEBOT_CMD_GID=0
+ export FILEBOT_NODE_CLIENT=client
+ FILEBOT_NODE_CLIENT=client
+ cd /share/CACHEDEV1_DATA/.qpkg/filebot-node
+ node --optimize_for_size --use_idle_notification server/app.js
/share/CACHEDEV1_DATA/.qpkg/filebot-node/start: line 26: node: command not found
What can I see at the log file now??

Re: [FileBot Node] The server is temporarily unable to service your request

Posted: 05 Aug 2018, 15:33
by rednoah
The log doesn't show the printenv command being executed, so either the file was not saved, or the log is old, or whatever script is executed isn't the one we edited. It can only be one of these 3 things.

:idea: Restarting the NAS should not be necessary. But nothing here makes sense, so it's worth a try.

Re: [FileBot Node] The server is temporarily unable to service your request

Posted: 07 Aug 2018, 10:45
by mrknx
Hi noah,

after a system reboot, the log file shows

Code: Select all

[~] #  cat /share/CACHEDEV1_DATA/.qpkg/filebot-node/filebot-node.log
+ printenv
/share/CACHEDEV1_DATA/.qpkg/filebot-node/start: line 4: printenv: command not found
+ export FILEBOT_NODE_HOST=127.0.0.1
+ FILEBOT_NODE_HOST=127.0.0.1
+ export FILEBOT_NODE_AUTH=QNAP
+ FILEBOT_NODE_AUTH=QNAP
+ export FILEBOT_NODE_HTTP=YES
+ FILEBOT_NODE_HTTP=YES
+ export FILEBOT_NODE_HTTP_PORT=5452
+ FILEBOT_NODE_HTTP_PORT=5452
+ export USER=admin
+ USER=admin
++ free
++ awk -vm=1024 -vp=0.7 '/Mem:/ {printf "-Xmx%dm", ($2*p)/m; exit}'
+ export JAVA_OPTS=-Xmx2100m
+ JAVA_OPTS=-Xmx2100m
+ export FILEBOT_TASK_CMD=/opt/filebot-node/task
+ FILEBOT_TASK_CMD=/opt/filebot-node/task
+ export FILEBOT_CMD=filebot
+ FILEBOT_CMD=filebot
+ export FILEBOT_CMD_CWD=/share/CACHEDEV1_DATA
+ FILEBOT_CMD_CWD=/share/CACHEDEV1_DATA
++ id -u admin
+ export FILEBOT_CMD_UID=0
+ FILEBOT_CMD_UID=0
++ cat /etc/group
++ grep administrators
++ cut -d: -f3
+ export FILEBOT_CMD_GID=0
+ FILEBOT_CMD_GID=0
+ export FILEBOT_NODE_CLIENT=client
+ FILEBOT_NODE_CLIENT=client
+ cd /share/CACHEDEV1_DATA/.qpkg/filebot-node
+ node --optimize_for_size --use_idle_notification server/app.js
/share/CACHEDEV1_DATA/.qpkg/filebot-node/start: line 29: node: command not found
[~] # 


Re: [FileBot Node] The server is temporarily unable to service your request

Posted: 07 Aug 2018, 13:08
by rednoah
So QNAP doesn't even have core Linux utilities installed:

Code: Select all

printenv: command not found
We're mainly interested in the $PATH, so lets try to replace printenv with echo $PATH so we can finally see what $PATH we're working with here:

Code: Select all

echo $PATH

Re: [FileBot Node] The server is temporarily unable to service your request

Posted: 07 Aug 2018, 17:17
by mrknx
Here is the result

Code: Select all

[~] #  cat /share/CACHEDEV1_DATA/.qpkg/filebot-node/filebot-node.log
+ echo /bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/local/sbin:/usr/local/bin
/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/local/sbin:/usr/local/bin
+ export FILEBOT_NODE_HOST=127.0.0.1
+ FILEBOT_NODE_HOST=127.0.0.1
+ export FILEBOT_NODE_AUTH=QNAP
+ FILEBOT_NODE_AUTH=QNAP
+ export FILEBOT_NODE_HTTP=YES
+ FILEBOT_NODE_HTTP=YES
+ export FILEBOT_NODE_HTTP_PORT=5452
+ FILEBOT_NODE_HTTP_PORT=5452
+ export USER=admin
+ USER=admin
++ free
++ awk -vm=1024 -vp=0.7 '/Mem:/ {printf "-Xmx%dm", ($2*p)/m; exit}'
+ export JAVA_OPTS=-Xmx2100m
+ JAVA_OPTS=-Xmx2100m
+ export FILEBOT_TASK_CMD=/opt/filebot-node/task
+ FILEBOT_TASK_CMD=/opt/filebot-node/task
+ export FILEBOT_CMD=filebot
+ FILEBOT_CMD=filebot
+ export FILEBOT_CMD_CWD=/share/CACHEDEV1_DATA
+ FILEBOT_CMD_CWD=/share/CACHEDEV1_DATA
++ id -u admin
+ export FILEBOT_CMD_UID=0
+ FILEBOT_CMD_UID=0
++ cat /etc/group
++ grep administrators
++ cut -d: -f3
+ export FILEBOT_CMD_GID=0
+ FILEBOT_CMD_GID=0
+ export FILEBOT_NODE_CLIENT=client
+ FILEBOT_NODE_CLIENT=client
+ cd /share/CACHEDEV1_DATA/.qpkg/filebot-node
+ node --optimize_for_size --use_idle_notification server/app.js
ENVIRONMENT { FILEBOT_TASK_CMD: '/opt/filebot-node/task',
  QPKG_NAME: 'filebot-node',
  FILEBOT_CMD_UID: '0',
  OLDPWD: '/',
  LC_ALL: 'en_US.UTF-8',
  JAVA_OPTS: '-Xmx2100m',
  USER: 'admin',
  FILEBOT_CMD_CWD: '/share/CACHEDEV1_DATA',
  QPKG_DEFAULT_VOLUME: '/share/CACHEDEV1_DATA',
  PATH: '/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/local/sbin:/usr/local/bin',
  FILEBOT_CMD_GID: '0',
  PWD: '/share/CACHEDEV1_DATA/.qpkg/filebot-node',
  LANG: 'en_US.UTF-8',
  QNAP_QPKG: 'filebot-node',
  FILEBOT_NODE_HOST: '127.0.0.1',
  SHLVL: '2',
  FILEBOT_CMD: 'filebot',
  LC_CTYPE: 'en_US.UTF-8',
  QPKG_CONF: '/etc/config/qpkg.conf',
  FILEBOT_NODE_HTTP_PORT: '5452',
  FILEBOT_NODE_AUTH: 'QNAP',
  FILEBOT_NODE_HTTP: 'YES',
  QPKG_ROOT: '/share/CACHEDEV1_DATA/.qpkg/filebot-node',
  FILEBOT_NODE_CLIENT: 'client',
  _: '/usr/local/bin/node' }
USER { UID: 0, GID: 0 }
filebot-node listening at http://127.0.0.1:5452/
events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE 127.0.0.1:5452
    at Object._errnoException (util.js:1022:11)
    at _exceptionWithHostPort (util.js:1044:20)
    at Server.setupListenHandle [as _listen2] (net.js:1351:14)
    at listenInCluster (net.js:1392:12)
    at doListen (net.js:1501:7)
    at _combinedTickCallback (internal/process/next_tick.js:141:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
    at Function.Module.runMain (module.js:686:11)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3

Re: [FileBot Node] The server is temporarily unable to service your request

Posted: 07 Aug 2018, 17:43
by rednoah
Well, node is now working. The error oddly enough now tells us that it's running already and that you can't have two instances running at the same time. So presumably, it's already working.

Re: [FileBot Node] The server is temporarily unable to service your request

Posted: 07 Aug 2018, 17:48
by mrknx
Oh, you are right. I don`t know why, but it is already working :)

Thanks a lot

Re: [FileBot Node] The server is temporarily unable to service your request

Posted: 07 Aug 2018, 17:57
by rednoah
None of this makes any sense... Things just working is the only thing that makes sense so far. :lol: