Does'nt work anymore on QNAP

Support for Synology NAS, QNAP NAS and other Embedded Linux systems
Post Reply
pasdidee2
Posts: 3
Joined: 29 May 2021, 18:44

Does'nt work anymore on QNAP

Post by pasdidee2 »

Hello rednoah,

Filebot node used to work for a year and since a week (my guess it's because of a QNAP upgrade) when I reboot I have "service unavailable".
I can make Filebot node work by restarting the app.
But second problem and most important. Every time I try a dry run it failed
Image

Here some information :
QNAP TS-251B
Java installer 2.13
Filebot node 0.4.1.1

Code: Select all

[~] # filebot -version
FileBot 4.9.3 (r8573) / OpenJDK Runtime Environment 16.0.1 / Linux 4.14.24-qnap (amd64)

Code: Select all

[~] # node -v
v8.9.4

Code: Select all

[~] # cat /share/CACHEDEV1_DATA/.qpkg/filebot-node/filebot-node.log 
ENVIRONMENT { FILEBOT_TASK_CMD: '/opt/filebot-node/task',
  QPKG_NAME: 'filebot-node',
  FILfind: /share/CACHEDEV1_DATA/.qpkg/HD_Station/share: Permission denied
ENVIRONMENT { FILEBOT_TASK_CMD: '/opt/filebot-node/task',
  QPKG_NAME: 'filebot-node',
  FILEBOT_CMD_UID: '0',
  LC_ALL: 'en_US.UTF-8',
  JAVA_OPTS: '',
  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_DATA: '/opt/filebot-node/data',
  FILEBOT_NODE_HTTP: 'YES',
  QPKG_ROOT: '/share/CACHEDEV1_DATA/.qpkg/filebot-node',
  FILEBOT_NODE_CLIENT: 'client',
  OLDPWD: '/',
  _: '/share/CACHEDEV1_DATA/.qpkg/QDMS/bin/node' }
USER { UID: 0, GID: 0 }
filebot-node listening at http://127.0.0.1:5452/
events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE 127.0.0.1:5452
    at Object.exports._errnoException (util.js:873:11)
    at exports._exceptionWithHostPort (util.js:896:20)
    at Server._listen2 (net.js:1250:14)
    at listen (net.js:1286:10)
    at net.js:1395:9
    at nextTickCallbackWith3Args (node.js:453:9)
    at process._tickCallback (node.js:359:17)
    at Function.Module.runMain (module.js:443:11)
    at startup (node.js:139:18)
    at node.js:968:3
[~] # 
Please note that the part at the end starting with "Error: listen EADDRINUSE 127.0.0.1:5452" is not always here

Code: Select all

[~] # ls -l /usr/local/bin/node
lrwxrwxrwx 1 admin administrators 50 2021-05-29 20:28 /usr/local/bin/node -> /share/CACHEDEV1_DATA/.qpkg/nodejsv8/node/bin/node*
The only thing I have not try is to uninstall filebot(node) and re install both.
Thank you for your work and help.

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

Re: Does'nt work anymore on QNAP

Post by rednoah »

1.
This error message means that there's already a FileBot Node process running, this and second instance crashes when it can't get the port that is already in use by the first instance:

Code: Select all

Error: listen EADDRINUSE 127.0.0.1:5452
:idea: If there's issues with service start / service stop not working correctly (NOTE: QNAP WebUI may show the wrong status, a running process may incorrectly show up as stopped and vice versa) then a restart of the device might help.


2.
If the filebot command doesn't work, then there'll be a log somewhere:

Code: Select all

find /opt/filebot-node/ -name '*.log'
:!: If you get zero output in the FileBot Node WebUI, that means we don't actually know if there's anything wrong with filebot. Just tells us that FileBot Node isn't serving the log files. If filebot wasn't working, or not installed, we'd still get some kind of error message from the shell process.


3.
Make sure that /usr/local/bin/node is actually executable, since QNAP is known to publish packages with broken executable permissions:

Code: Select all

/usr/local/bin/node -v
Because the node executable that is actually running the process isn't the one you checked:

Code: Select all

  _: '/share/CACHEDEV1_DATA/.qpkg/QDMS/bin/node' 
:idea: Please read the FAQ and How to Request Help.
pasdidee2
Posts: 3
Joined: 29 May 2021, 18:44

Re: Does'nt work anymore on QNAP

Post by pasdidee2 »

Indeed, it's note the same node

Code: Select all

/share/CACHEDEV1_DATA/.qpkg/QDMS/bin/node -v
v4.4.7

Code: Select all

/usr/local/bin/node -v
v8.9.4
What should I do?

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

Re: Does'nt work anymore on QNAP

Post by rednoah »

It'll work with either. It's just something to keep in mind. We don't actually know why it's not working yet.

Restart your device. Don't force start the service manually. Startup may be slow if it has to search all of /share/CACHEDEV1_DATA/.qpkg for a node executable if the $PATH doesn't work for some reason. See what the log says.

Use ps to see what's running and not running. Don't rely on possibly misleading QNAP WebUI indicators.

If you see nothing in your browser, open More Tools ➔ Developer Tools ➔ Network in your browser so you can see the HTTP requests going back and forth and failing.
:idea: Please read the FAQ and How to Request Help.
pasdidee2
Posts: 3
Joined: 29 May 2021, 18:44

Re: Doesn't work anymore on QNAP

Post by pasdidee2 »

Hello,

Good guess! I check the HTTP request and my ad-blocker was the problem, it completely block filebot node. No idea why as it used to work for a year.
It's Ublock Origin on firefox, if that can help someone.

Quick question, to schedule FB node the prompt show "task 17" before it was "task 10" and I saw some people with an other task number on this forum.
I'm just curious to understand what that's mean and why it change?

Thank you for your help :)
Regards,
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Doesn't work anymore on QNAP

Post by rednoah »

pasdidee2 wrote: 31 May 2021, 16:53 Good guess! I check the HTTP request and my ad-blocker was the problem, it completely block filebot node. No idea why as it used to work for a year.
Your ad-blocker uses a public list of patterns which is updated on a daily basis. So a new addition of patterns might accidentally also match FileBot Node URL patterns.

pasdidee2 wrote: 31 May 2021, 16:53 Quick question, to schedule FB node the prompt show "task 17" before it was "task 10" and I saw some people with an other task number on this forum.
I'm just curious to understand what that's mean and why it change?
Every time you create a prepared task, this unique prepared task will be given a unique ID, so you can have multiple prepared tasks. Note that this prepared task is not "called on a schedule" unless you configure a cron job that makes the call.
:idea: Please read the FAQ and How to Request Help.
Post Reply