tom472 / mediabox

Container based media tools configuration
MIT License
428 stars 83 forks source link

arch-delugevpn #82

Closed eddiepropane closed 5 years ago

eddiepropane commented 5 years ago

Hi,

First off thanks for the awesome work you have done here, just discovered a few days ago and its been great.

Been doing a bit of tweaking to the scripts etc. and thought I had broken it as lost connection Deluge after making a change to the volumes. Have been chasing the issue for a while and then thought to check the releases for delugevpn and it has been upgraded to v2 which must have made some changes.

Done a clean install and could not connect, if I change the docker-compose.yaml to get the previous build:

1.3.15_18_ge050905b2-1-04

It goes back to working as normal so may be a config issue, I'll try and compare the core.conf to see if there any changes but wanted to raise it now in case there is an easy fix you can see :)

tom472 commented 5 years ago

Thanks for the kind words - glad you found Mediabox and are using it.

I am not seeing any issues - and I can see from my logs that Ouroboros has updated my DelugeVPN container:

2019-06-18 18:01:59 : INFO : dockerclient : delugevpn will be updated 2019-06-19 12:00:44 : INFO : dockerclient : delugevpn will be updated 2019-06-19 18:00:40 : INFO : dockerclient : netdata will be updated 2019-06-19 18:00:49 : INFO : dockerclient : minio will be updated

And hitting the web interface - here's a screenshot showing that it is Deluge 2.0.3 inside the container, I'm connected to PIA and actively downloading.

Deluge-Mediabox

When you say "could not connect" - Do you mean the DelugeVPN container is not connecting to PIA? Or That when you go to the Muximux page you cannot access the Deluge web interface?

Let me know Thanks --Tom

eddiepropane commented 5 years ago

Thanks Tom.

Yeah it's not connecting through Muximux but I can get it from going to the IP and port directly.

When in deluge web settings incoming IP address shows as the docker IP which I think it did not used to.

Sonarr and Lidarr can connect but Radarr gives an authentication error using the same details.

I could see one of binhex's commits was to fix an IP issue but I reinstalled after that commit and that was when I tried the older version and no issues.

This was all on a clean install of 18.04 server

Also, when I run the script the first time I get a permissions error in the .env file at work but think line 287 but can confirm later.

When I ls -l after running the script a lot of onwership has changed to systemd-network and I cannot access Muximux with bad gateway until I chown it back to my user.

I'll try it again on a VM instead of the NUC when I get home and see if same results.

tom472 commented 5 years ago

You are running the script as your user correct? Not with sudo and not as root. Can you paste your .env file?

eddiepropane commented 5 years ago

Yeah using sudo on a standard user.

If I remember the permissions failed line is when chmod the content folder, I amusing a usb drive mounted with correct permissions and the same owner as user and read/write masks for all users so thought it was failing as the content folder was not there.

Be in ffrom work around 7 so will paste the env file then, thanks again.

eddiepropane commented 5 years ago

Hiya,

To be sure I've ran a fresh install of 18.04 server with full apt upgrade etc. and then followed install instructions as my user:

mediabox@media-server:~/mediabox$ ./mediabox.sh

Got the same issues with permissions in the install script:

./mediabox.sh: line 287: .env: Permission denied

Before a reboot I could actually connect to Deluge through Muximux but was still unable to get Radarr to connect to it.

Done a reboot and could not connect through the portal but could directly and was unable to connect other containers through the portal.

.env:

LOCALUSER=mediabox HOSTNAME=media-server IP_ADDRESS=192.168.0.100 PUID=1000 PGID=1000 DOCKERGRP=999 PWD=/home/mediabox/mediabox DLDIR=/mnt/storage/Downloads TVDIR=/mnt/storage/Media/TV MOVIEDIR=/mnt/storage/Media/Movies MUSICDIR=/mnt/storage/Media/Music PIAUNAME=removed PIAPASS=removed CIDR_ADDRESS=192.168.0.0/24 TZ=Europe/London PMSTAG=latest PMSTOKEN= PORTAINERSTYLE=--no-auth VPN_REMOTE=de-frankfurt.privateinternetaccess.com

This is my mount line in fstab:

UUID=AAAAF445AAF41015 /mnt/storage ntfs-3g defaults,nls=utf8,umask=000,dmask=000,fmask=000,uid=1000,gid=1000,windows_names 0 0

I've took few grabs just in case, sorry if scaling is horrible they are just from snipping tool haha

Pre-install

Post-install

Radarr - Deluge

Deluge connection

Deluge incoming

tom472 commented 5 years ago

Can you try running through it and letting the script create the folders.

I know it work be a "working" configuration for you but I'm interested in if even a default run through the script will work for you.

Also can you do an ls -lah so I can see who owns your .env file?

eddiepropane commented 5 years ago

Hi mate,

Bit of progress at my end and ran through as advised.

Letting the script create the folders still gave me the same permissions error and resulted in the .env file having the new owner:

default folders env

Looking at the owner and don't know if makes as difference but as I sign in over SSH which is network is that having any impact?

The other thing I have found is that is I comment out minio from the yaml so it does not pull then the script runs fine and does not get the permissions error and leaves me as the user of all files/folders so I do not have to chown back to access Deluge etc.

Deluge connects through the portal with correct permissions but still has issues connecting to Radarr.

For Deluge/Radarr I looked at the logs and it showed as authorised:

21:45:04 [INFO ][deluge.ui.web.auth :253 ] Login success (ClientIP 172.17.0.1) 21:45:04 [INFO ][twisted :154 ] "172.17.0.1" - - [20/Jun/2019:21:45:04 +0000] "POST /json HTTP/1.1" 200 65 "-" "Radarr/0.2.0.1344 (Linux 4.15)"

But gave an error in the UI and stopped my from saving as DL client.

I wondered if it required a newer version of Radarr after the Deluge update as both Lidarr and Sonarr could connect so I edited the yaml to pull the preview version of Radarr, which has the cool new ui as a bonus, this one can connect fine.

So not sure if the newer version if Radarr is just the fix just for my weird issue or will be required with Deluge 2.0 for new installs.

For the permission error running the install script I an not sure especially with just taking minio out stops it unless you come back and say ssh is a no no :)

Cheers for the help, Bob.

tom472 commented 5 years ago

Just curious -- any chance you can make a new user and try the process with no adjustments under that user account?

Make sure you add that user to the Docker Group: $ sudo usermod -aG docker $USER

Thanks for the heads-up on Radarr I'll take a look at that not connecting to Deluge.

SSH is fine - that is how I connect to my server so no worries there.

eddiepropane commented 5 years ago

Thanks again and yeah not a problem.

Same deal with work times but will get you an update this evening :)

tom472 commented 5 years ago

@EddiaYauMean Any chance to test with a new/different user?

Did it work any better if you were able to try that?

eddiepropane commented 5 years ago

Hiya buddy and sorry on the delay, been a mental few days at work so not had much time to test, have been intermittently but should have popped on to let you know I would be delayed.

Run through of what I have tried:

On the install with bad permissions after the script I added a new user to that install and added to the required groups. This would not run the script in already in place due to the permissions - I did not try a chown to the new user and run again as works when I do the chown on the mediabox user.

Tried cloning in to the new users home folder and running the script fresh and get the same error.

Moved from the NUC to a VM and got same results.

Tried not running apt full-upgrade after the install to see if that impacted but same result.

Removed steps that I was putting in prior to running post install (adding the USB HD in fstab and setting up a static IP by editing the 50-cloud-init.yaml) and same result, thought maybe it was due to cloud init so disabled that completely and started created a standard yaml for netplan for DHCP and static and got the same result.

I am not an expert on linux but have been messing about with it on and off for 20+ year so can normally follow instructions fine (just trial and error from your awesome work I have also managed to modify the script and env for separate DL locations for torrents and nzb and a working version with Transmission-openvpn taking a lot of env variables in the script for arm and qtorrent-openvpn as gonna see what a mini-stack runs like on my Odroid N2 and the VIM3 I just ordered) but at a loss as to why I am seeing the error...

I am basically doing below in case I have been super thick somewhere haha:

installing 18.04 sever with UK keyboard and SSH support at install stage and booting in to OS

Booting in to install and setting the timezone to Europe/London

Running sudo apt upgrade && sudo apt full-upgrade and rebooting

apt install on the 3 packages required, only ever needs 1 as 2 already installed

Running the commands to remove docker (not there on a clean install so had stopped running but started again just in case)

Running the docker install script, docker-compose install, chmod the files and testing giving me working version.

Have also tested that the user is added to the docker group with:

awk -F':' '/docker/{print $4}' /etc/group

Running the modprobe command and verifying with lsmod which shows it loaded - Should this be added to /etc/modules so loaded each boot or just required at this stage?

Rebooting then cloning, jumping in the folder and running the script with my PIA details and then latest for Plex and defaults for everything else.

I still does work if I comment out minio (found out working on the arm stuff) so may do some web searches on minio, docker and permission errors.

On a side note I think the Radarr issues may have been the Edge/Chrome dev builds and password storing!!

I was changing the default password from Deluge in the webui and can see it is also added to the auth file at setup - I was in the webui and and pressed accept on changes, I had not entered the old password and the field was blank but it gave a a notification to say password changed. If I changed just changed the container version and re-pulled it would accept it fine - Standard chrome has been working so apologies for raising that one :)

Hopefully I am being thick and you can see something I am messing up while installing, thanks again for the help and apologies on the delay, Bob.

tom472 commented 5 years ago

I cannot see what might be making this fail for you. At work now - I'll re-read this again later and see if anything jumps out.

Really sorry man that you are having this issue - I really hope we can figure it out. This is like the first and only report of Mediabox not working at all. Crazy ..

Thanks --Tom

tom472 commented 5 years ago

Also thanks for the good eye going over the directions again, and mentioning the iptable_mangle section.

I just updated the directions with an additional line to now also add the module to /etc/modules for boot time execution.

--Tom

eddiepropane commented 5 years ago

Hi Tom,

Sorry been MIA - getting geared up to announce redundancy at work and first time since I have been operations manager so quite involved!!

Not sure what the deal is or if it is software/container change as I have not changed my method but ran a fresh install last night and it now installs without the error on the NUC, VM and my little arm project :)

Thanks for looking in to it :)

tom472 commented 5 years ago

@EddiaYauMean Hey man no worries on being MIA I know how work can get. Really glad it is working for you now that is great!

Saw you forked the project - if you do anything neat please feel free to stop back here and share.

CHEERS --Tom