[FileBot Node] --optimize_for_size causes Bus error (core dumped) crash

Support for Ubuntu and other Desktop Linux distributions
Post Reply
JamesS
Posts: 7
Joined: 17 Oct 2021, 18:44

[FileBot Node] --optimize_for_size causes Bus error (core dumped) crash

Post by JamesS »

Hello,

I can't start the filebot-node docker and I'm completely lost, as there is not output anywhere.
I use a Pi 4 and run a non-root docker.

I tried the following commands:

Code: Select all

docker run --rm -it -v /mnt/exthdd/plexLibrary:/volume1 -v data:/data -p 5452:5452 rednoah/filebot:node

Code: Select all

docker run --rm -it -v ${HOME}/FileBot:/volume1 -v data53:/data -p 5452:5452 rednoah/filebot:node

Code: Select all

docker run --rm -it -v $PWD:/volume1 -v data:/data -p 5452:5452 rednoah/filebot:node

Code: Select all

 sudo docker run --rm -it -v $PWD:/volume1 -v data51:/data -p 5452:5452 rednoah/filebot:node

Code: Select all

docker run --rm -it rednoah/filebot:node

Code: Select all

docker run -it rednoah/filebot:node

Code: Select all

docker run --rm -it -e PUID=1000 -e PGID=1000 -p 5452:5452 rednoah/filebot:node
After pressing enter, the terminal is busy for a few second and just requests a new input, in all cases. For example:

Code: Select all

ubuntu@ubuntu:~/tmp$ docker run --rm -it -v /mnt/exthdd/plexLibrary:/volume1 -v data:/data -p 5452:5452 rednoah/filebot:node
ubuntu@ubuntu:~/tmp$
Additionally, I tried tried it with the following docker-compose.yml:

Code: Select all

# docker-compose.yml
version: '3.3'
services:
  filebot-node:
    container_name: filebot-node
    image: rednoah/filebot:node
    restart: unless-stopped
    volumes:
      - ${HOME}/FileBot:/data
      - /mnt/exthdd/plexLibrary:/volume1
    environment:
      - PUID=1000
      - PGID=1000
    ports:
      - 5452:5452
In this case, the container is constantly restarting and the docker log for this container is empty.

I'm totally aware that I do not provide any useful information to debug the problem. However, the reason is simply that the scripts do not return anything. It might be a permission issue somewhere, but I have nothing to go on.

The only related thing that I can report is that

Code: Select all

docker run --rm -it -v $PWD:/volume1 -v data:/data rednoah/filebot -script fn:sysinfo
and even a complete renaming/moving process work like a charm.

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

Re: Can't start filebot-node docker

Post by rednoah »

You could use docker exec to run bash then then execute the ENTRYPOINT command manually from there:
https://github.com/filebot/filebot-dock ... e.node#L40



:idea: If nothing makes sense, make sure to clear all the docker images you have cached, to make sure you're running the very latest image, to make sure we're all on the same page. There were some in-between revisions of the image where passing along environment variables didn't work, and thus neither HTTP nor HTTPS servers were started.



Here's the command and expected output:

Code: Select all

docker run --rm -it -v $PWD:/volume1 -v data:/data -p 5452:5452 rednoah/filebot:node

Code: Select all

ENVIRONMENT { ... }
STATUS { ... }
USER { UID: 1000, GID: 1000 }
filebot-node listening at http://0.0.0.0:5452/
:idea: Please read the FAQ and How to Request Help.
JamesS
Posts: 7
Joined: 17 Oct 2021, 18:44

Re: Can't start filebot-node docker

Post by JamesS »

First, thank you very much for your response.

I deleted all images using :

Code: Select all

docker rmi -f $(docker images -a -q)
Afterwards, I also checked that all images are gone.

Then, I tried:

Code: Select all

docker run --rm -it -v $PWD:/volume1 -v data:/data -p 5452:5452 rednoah/filebot:node

The behavior did not change - there is simply no output.
This was expected, as yesterday was the first time ever I downloaded a filebot docket image.

I do not really know how it is possible to follow your docker exec tip.
It's clear to me what to run once I'm in the container, but docker exec only works with an already running container.
This is not possible in this case as the container will shutdown instantly.

Therefore, I created a slight variation of the dockerfile you mentioned in which I set:

Code: Select all

ENTRYPOINT []
After building this dockerfile, I could start a bash inside the container with

Code: Select all

docker run --rm -it -v $PWD:/volume1 -v data:/data -p 5452:5452 filebot_test /bin/bash
Inside the container, the following happend:

Code: Select all

root@3095791c9bf7:/# /opt/filebot-node/start
Bus error (core dumped)
root@3095791c9bf7:/#
root@3095791c9bf7:/# /opt/bin/run-as-user /opt/filebot-node/start
Bus error
root@3095791c9bf7:/#
I just tested the docker on another machine in WSL and it worked perfectly.
Tomorrow, I'll check if it works on my Pi 4 with docker in root mode.
Afterwards, I'll post an update.
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Can't start filebot-node docker

Post by rednoah »

I guess that means that the node executable crashes:

Code: Select all

Bus error (core dumped)
I guess the amd64 arch container works, and the aarch64 container doesn't, but googling Bus error (core dumped) didn't reveal anything. You could try with a custom dockerfile and replace the nodejs binary from the Ubuntu package repository with some newer version from elsewhere.
:idea: Please read the FAQ and How to Request Help.
JamesS
Posts: 7
Joined: 17 Oct 2021, 18:44

Re: Can't start filebot-node docker

Post by JamesS »

Via some further experimenting, I found a solution.

I only had to do one change in the file node/opt/filebot-node/start:

Code: Select all

-exec node --optimize_for_size "/opt/filebot-node/server/app.js"
+exec node "/opt/filebot-node/server/app.js"
However, I did not try to find out why the optimize_for_size flag is a problem.
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Can't start filebot-node docker

Post by rednoah »

Fixed. I'm not attached to that particular option. Thank you for tracking down the problem and finding a workaround.

https://github.com/filebot/filebot-dock ... 8c34fc1130
:idea: Please read the FAQ and How to Request Help.
Post Reply