Fullaxx / biglybt-extreme

An Ubuntu docker image running BiglyBT with Extreme Mod
MIT License
5 stars 3 forks source link

Container always reinstall from scratch on each reboot #2

Closed nitz-tech closed 1 year ago

nitz-tech commented 1 year ago

Hello Fullaxx,

It's been several hours now that I try to make your dockers work, unfortunately, without success.

Here's my problem: The initial installation well, I manage to map the /data and /root/.bigybt folders without problems, the docker starts the installation and everything works.

However, if I close or restart the container, the installation starts again from scratch and the end, biglybt does not start again.

I noticed that if I don't put the folder persistent, the installation works, but I lose all the configurations every time.

I tried to do the test with a non-root user "guest", in this case, the installation starts again, but it finishes and I have the configurations I made, but impossible to launch a download, as if the user did not have access to the backend of bigly...

In any case, I checked the rights on the different folders and they are indeed root:root when I test in root and 200:2000 and I test in root.

The is the stack:

torrent: image: fullaxx/biglybt-extreme:3.3.0.0 container_name: BiglyBT environment:

There is the log of the container:

Your help will be very appreciated!

Thank you!

Fullaxx commented 1 year ago

What are you using to manipulate your containers? docker-compose? portainer? If you are using docker-compose "up" and "down" this is the intended behavior. If you are "stopping" and "starting" the stack, this is the intended behavior.

It looks like your container in being removed instead of being restarted. The BiglyBT Software is not installed in the Dockerfile. When a new container is spawned the autostart script will install the BiglyBT software. When a container is properly restarted, that installation will persist, but when a container is removed and re-created, the software will once again install in that new container.

You can see that behavior with the following commands: docker run -d --name bbtex -p 127.0.0.1:5901:5901 fullaxx/biglybt-extreme:3.3.0.0 docker restart bbtex This will restart the existing container w/o reinstall.

If you use these commands, you will see the reinstall: docker run -d --name bbtex -p 127.0.0.1:5901:5901 fullaxx/biglybt-extreme:3.3.0.0 docker rm bbtex docker run -d --name bbtex -p 127.0.0.1:5901:5901 fullaxx/biglybt-extreme:3.3.0.0

nitz-tech commented 1 year ago

Hello Fullaxx, thank you for the quick feedback, it's appreciated!

It is indeed the conclusion that I had made after my many tests, that when you stop or update a stack, the containers were pull again.

However, unlike all the other containers to which I add a persistent folder for their configurations and data and which start as if they had never been deleted, the BiglyBT application does not launch at the end of the installation as shown (Capture #1) (Container log Capture #2).

But if I remove the persistent folder "- /DATA/AppData/BiglyBT/bbtconfig:/root/.biglybt", the reinstallation ends normally (Capture #3), but I lose all the configurations with each stack update, which is not viable.

Is it me who does not understand well, do we have to make a particular command to launch the software by VNC afterwards?

The reason why I stack it with Portainer is that I use a NordLynx container for the connection and dependency on the "vpn" service.

Other containers work normally under this configuration.

I attach the screenshots and my docker-compose with two or three less info.

The only thing that I think is maybe that the new root doesn't have the same ID or something like that, that block the access to the config folder. But, when I try with this code following, the container start after it's "refresh install", but it's like that the guest account doen't have access to the BiglyBT backend, the download doesn't start, the xmwebui can't show what is in the "download list", etc.: torrent: image: fullaxx/biglybt-extreme:3.3.0.0 container_name: BiglyBT environment:

Seem to be some rights problems, but I'm unable to figure how to fix them...

Your help is welcome.

Thanks in advance!

Capture#1 Capture#1 Capture #2 Capture#2 Capture #3 Capture#3 docker compose.txt

Fullaxx commented 1 year ago

I will try to re-create your issue tomorrow, hopefully I can find a real solution.

In the mean time, could you provide the output of the BiglyBT log file? If you open an xterm and type cat /opt/biglybt/biglybt.log See LogImage: log

Also try this and tell me if this works: When BiglyBT fails to launch automatically, can you then launch it manually? By opening an xterm and typing

/app/scripts/biglybt.sh

Does that work?

nitz-tech commented 1 year ago

Hope that this screenshots will help you to figure why it's not work! Thank you for fast anwser and have a nice day!

Root + xterm script that can't start BiglyBT Root + xterm script that can't start BiglyBT

Guest with start of BiglyBT, but nothing start I the torrent list... Guest with start of BiglyBT

Fullaxx commented 1 year ago

Well, I do see a problem: /opt/biglybt/biglybt: line 109: Error: command not found /opt/biglybt/biglybt: line 110: Cannot: command not found I have not idea what that is, or how that could be happening. I have never seen that before. It almost looks like something is changing your biglybt installation?

I added some extra error checking to help debug Would you try this for me: 1) docker pull fullaxx/biglybt-extreme

Launch a new container from command line: 2) docker run -d --name bbtex -p 5901:5901 -e TZ=America/New_York -e VNCRES=1920x1080 -e VNCPASS=Extreme -e VNCUSER=guest -e VNCUID=2000 -e VNCGROUP=guests -e VNCGID=2000 -v /DATA/AppData/BiglyBT/bbtconfig:/home/guest/.biglybt -v /mnt/HDD/DATA_HDD/BiglyBT/data:/data fullaxx/biglybt-extreme

Let it install and startup, then quit Bigly: exit_biglybt

Then exit Openbox: exit_docker_image

Then restart your container: 3) docker start bbtex

This works on my machine, does it work on yours? If it still fails, please provide the output from docker logs bbtex and the output from cat /opt/biglybt/biglybt.log

nitz-tech commented 1 year ago

Hi Fullaxx,

When I use your code and that I restart the container, it's not reinstall from scratch like you said, but, when I use the "guest" account, impossible to start download. The torrent is there in waiting, but nothing append and some plugins are not shows.

If I try in root without "guest..ing", it's download, and it's start when I reboot.

When I try to check the cat /opt/biglybt/biglybt.log with the "guest" account, this is the results: P1 P2 P3

When I try to "update" or "redeploy" the root container, the same error append that the last post appear or by stack update deploy: docker rm

So, I'm partially fonctionnal, but I prefer to use a stack to link all the container needed for download and easelly update it.

If I need to use the cli, I can use it, but if I need to clear all persistantes datas and redone all of the config on each new version... I will, but it's not perfect....

If a another way to achieve that is needed, I'm open!

Thank for your help!

Fullaxx commented 1 year ago

Thank you for your help. I believe I found the bug you were experiencing #4 Please test the latest image. It should be working now.

nitz-tech commented 1 year ago

I will try it! Thank for your help. Do you think that I can use it now in a stack? The webui plugin will be disponible fir the non root user? Thank you!

Fullaxx commented 1 year ago

Yes, that is the plan. And yes the plugins should be working also.

nitz-tech commented 1 year ago

Hi Fullaxx!

The manual command doesn't work too... 2023-04-11 15_23_38-192 168 2 25_5901 (cb099c9ec100_1 (guest)) - VNC Viewer

Thank you!

Fullaxx commented 1 year ago

wow, Thanks for the tip, I would have never seen that one. Please pull latest and See #6

nitz-tech commented 1 year ago

Seem to work A1, your are the best!

Thank you for your fast responses in the resolving of my problem, I appreciate it!

Fullaxx commented 1 year ago

Welcome, I'm glad you find this useful!