Comments (24)
@drinksomewhiskey I found the problem π! I have a firewall set up directly on my synolgy nas with as last rule to deny all. so to allow freyr from accesing the internet I had to add an allow rule for the docker network subnet.
from freyr-js.
@miraclx, I made a guide to install Freyr on a Synology nas. Could you please integrate this in your documentation?
freyrjs on synology.md
from freyr-js.
Hi, @ArthurHuyghe, can you retry this with the docker image built from the git HEAD?
freyrcli/freyrjs-git:master
from freyr-js.
Hello @miraclx , I just tried the git HEAD. In both bridge and host network settings, the container still cannot access the network. Even when I temporarily disable my firewall, the container cannot access the internet.
Do you have any other idea for how I could fix this issue.
I just tried using the --no-net-check
flag. Now I get a different output stating that the working directory doesn't exist.
freyrcli-freyrjs-git-2:/data$ freyr spotify:artist:6M2wZ9GZgrQXHCFfjv46we --no-net-check
____
/ __/_______ __ _______
/ /_/ ___/ _ \/ / / / ___/
/ __/ / / __/ /_/ / /
/_/ /_/ \___/\__, /_/
/____/ v0.9.1
freyr - (c) Miraculous Owonubi <[email protected]>
------------------------------------------------------
[!] Working directory [.] doesn't exist
However the folder I mounted to /data does in fact exist.
from freyr-js.
Hi @ArthurHuyghe, can you try ping google.com
from inside the container? If that works, then maybe freyr
's logic for detecting a network connection might be broken. Try downloading a file from the internet in the container. Let's make sure it can access the internet.
And for the directory, I'm not sure.
Can you try a couple of commands in there? ls
, touch file
, ls | grep file
Then make sure the file
file is in the directory you mounted.
After that, could you show me the permissions for the current folder?
$ ls -la .. | grep data
drwxr-xr-x 5 freyr freyr 160 Aug 7 09:12 data
from freyr-js.
Btw, v0.10.0
has been released with the latest updates.
https://github.com/miraclx/freyr-js/releases/tag/v0.10.0
from freyr-js.
Hi @miraclx,
I moved to the latest stable docker container and tried again. (the dockernetwork is using host)
The nas works with different shared volumes, I moved the folder Iinked to the /data folder from the container to the docker dedicated shared volume. I don't think it helped but I will leave it like that just in case.
looking at the results it think it has somthing to do with the permisions, however it might also be somthing else.
from freyr-js.
Yes! Looks like there are permission issues for the folder you mounted.
Because touch file
should've created a new empty file in the folder.
But that failed. So you need to figure out what's up with the volume.
And as for the network. ping google.com
also failed.
But perhaps it's just ping
's that have issues. Let's try an actual network request.
See #541 (comment)
from freyr-js.
I'm still searching for fixing the permissons, but in the mean time I tried an actual netwerk request. However the container doesn't accept curl as a command. Wget does work but again it gives me a permission error.
from freyr-js.
Can you try wget -O - -q icanhazip.com
So we can isolate it to just a network request, and not wget
's attempt to save to a file.
from freyr-js.
Yes, it gets me a ip ( i guess ipv6) but it is different than when i manualy go to icanhazip.com.
from freyr-js.
That's alright, we just needed confirmation on if the container could access the internet.
So freyr should be able to as well.
So the only issue here is the file system.
The container does not have write permissions to the volume you mounted.
from freyr-js.
Issue: Freyr-js unable to access the internet on Synology NAS with Docker Container Manager
Description
I encountered an issue while trying to install and run Freyr-js on a Synology NAS using Container Manager ( Docker). It seems that Freyr-js does not have internet access within the container. I have tried both the
bridge
andhost
networks, but neither option worked.Steps to Reproduce
- Install Docker Container Manager on Synology NAS.
- Pull the Freyr-js image and create a container.
- Configure the network settings using
bridge
orhost
network.- Set
docker_desktop=true
as a environment variable- Attempt to download a playlist from spotify from within the Freyr-js container.
Expected Behavior
Freyr-js should have internet access when running within the Docker container on Synology NAS.
Actual Behavior
Freyr-js is unable to access the internet, regardless of the network configuration used (
bridge
orhost
) and therefor is not able to work properly.Additional Information: Unable to use queue file
I also encountered an issue where I was unable to use a queue file because Freyr-js was not able to reach the specified location. The error message stated that the file simply didn't exist. I think this is because the container is not able to reach for the file on my nas.
Please let me know if any further information is needed to resolve these issues.
Environment:
- Synology NAS model: [DS218+]
- Docker Container Manager version: [20.10.23-1413]
- Freyr-js version: [v0.9.0]
- Operating System: [DSM 7.2]
Configuration:
- Network settings: [Specify the network configuration used (e.g.,
bridge
orhost
)]- Contents of
freyrcli-freyrjs---music-downloader.json
file:freyrcli-freyrjs---music-downloader.txt
(please note that the file's extention is changed to .txt since github does not allow that file type)
Thank you for your assistance in resolving these issues.
Hi @ArthurHuyghe,
Can you provide details on how you managed to install via container manager? I would like to try to replicate as well, but I am not sure what variables to assign.
What are your settings for "Port Settings" "Volume Settings" and "Environment" variables (besides docker_desktop=true). Other than this and setting network to bridge, did you change any other settings to get this to work?
Lastly, are you accessing the container via IP:Port address or are you using the terminal within container manager?
from freyr-js.
Hi @drinksomewhiskey,
I'll make you a docker compose file with the exact settings and a step for step guide for how to use Freyrjs on a synology nas.
from freyr-js.
Hi @drinksomewhiskey,
I'll make you a docker compose file with the exact settings and a step for step guide for how to use Freyrjs on a synology nas.
That would be great! Thank you.
from freyr-js.
@miraclx does freyr use or need any open ports? Cause when the network is in bridge mode freyr is unable to acces the internet. But if you set the network mode as host, freyr can acces the internet.
from freyr-js.
@ArthurHuyghe, no not directly.. At least not in any way that affects it's operation.
Can you follow the steps in #541 (comment) so I can gather information on what goes wrong in your case?
from freyr-js.
Both ping and wget give a bad adress error when the network is set to bridge mode, in Host mode there isn't any problem with internet acces.
from freyr-js.
@drinksomewhiskey
Here is the manual, could you please go through it and tell me where things are not clear or if any descriptions are incorrect as my NAS is not set up in English.
Note
If you would want to replicate my networkissue, you can install the container on the bridge network by removing the line network_mode: "host"
in the Docker Compose file.
Guide for Freyrjs on a Synology NAS
Warning
This guide is still in develompent and not yet ready to distribute.
Important
This guide only works for DSM 7.2 or above. Please make sure your Nas meets this requirement.
Install Freyr on your NAS
Step 1: Install container manager (previously known as Docker)
- Open Package Center and search for
Container Manager
. - Install the package following the installation wizard.
Step 2: Make a directory for Freyr
- Open File Station and go to the docker volume.
- Create a new directory called
Freyr
.
Step 3: Building the container using Docker Compose
- Go to the project tab and click create.
- Choose a Project name like Music Downloader.
- Select the path to the directory you created before.
- As source select
Create a docker-compose.yml
. - Paste the following Docker compose file inside the editor.
version: '3.4'
services:
Freyrjs:
image: freyrcli/freyrjs:latest
environment:
- PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
- DOCKER_DESKTOP=true
volumes:
- [Insert_Path_here]:/data:rw
network_mode: "host"
- Replace
[Insert_Path_here]
with the path to the Freyr directory you just created earlier. For example/volume1/docker/freyr
. - Press Next, ignore the settings for the web portal and press next again, confirm the summary of your settings and click Done to finish.
- Wait until you see
Exit Code: 0
which means the container is successfully build.
Step 4: Fixing the permissions
- Open File Station and go to the parent directory of the Freyr directory in the docker volume.
- Right-click the Freyr directory and click Properties.
- Next, click Permissions, than create.
- As user or group select
Everyone
, make sure the type is set toAllow
and it is applied toall descendants
. - Check the boxes for Read and Write and click save.
- Now reopen Container Manager and go to the container that was just build for you, first click Action, then open a terminal.
- Click create and then click on the newly created terminal, it's probably called
bash
. - Enter
mkdir music
in the terminal. - Repeat points 1 & 2.
- Click
Permissions
again and selectEveryone
, press delete and hit save.
Step 5: Complete the installation
- Go to the project tab and click the project you created before.
- Ignore the warning about Webstation and press cancel.
- Stop the container by pressing the Stop button in the upper right-hand corner.
- Go to the YAML Configurations tab and replace the actual path on the machine under volumes: with the path to the directory you created via the containers terminal. For example,
/volume1/docker/freyr:/data:rw
=>/volume1/docker/freyr/music:/data:rw
- Hit Save, select Create and Start the project (rebuild the image) and click OK.
- Wait again until you see
Exit Code: 0
which means the container is successfully build.
How to use Freyr on your NAS
- Open Container Manager, go to the Freyr container and click Action, then open a terminal.
- Click create and then click on the newly created terminal, it's probably called
bash
. - Here you can use Freyr like you normally would. For example, to download a Spotify track, paste
freyr spotify:track:5FNS5Vj69AhRGJWjhrAd01
inside the terminal and freyr wil download the track for you and save it in the directory you created (for example, inside/volume1/docker/freyr/music
).
from freyr-js.
@drinksomewhiskey Here is the manual, could you please go through it and tell me where things are not clear or if any descriptions are incorrect as my NAS is not set up in English.
Note If you would want to replicate my networkissue, you can install the container on the bridge network by removing the line
network_mode: "host"
in the Docker Compose file.Guide for Freyrjs on a Synology NAS
Warning This guide is still in develompent and not yet ready to distribute.
Important This guide only works for DSM 7.2 or above. Please make sure your Nas meets this requirement.Install Freyr on your NAS
Step 1: Install container manager (previously known as Docker)
- Open Package Center and search for
Container Manager
.- Install the package following the installation wizard.
Step 2: Make a directory for Freyr
- Open File Station and go to the docker volume.
- Create a new directory called
Freyr
.Step 3: Building the container using Docker Compose
- Go to the project tab and click create.
- Choose a Project name like Music Downloader.
- Select the path to the directory you created before.
- As source select
Create a docker-compose.yml
.- Paste the following Docker compose file inside the editor.
version: '3.4' services: Freyrjs: image: freyrcli/freyrjs:latest environment: - PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin - DOCKER_DESKTOP=true volumes: - [Insert_Path_here]:/data:rw network_mode: "host"
- Replace
[Insert_Path_here]
with the path to the Freyr directory you just created earlier. For example/volume1/docker/freyr
.- Press Next, ignore the settings for the web portal and press next again, confirm the summary of your settings and click Done to finish.
- Wait until you see
Exit Code: 0
which means the container is successfully build.Step 4: Fixing the permissions
- Open File Station and go to the parent directory of the Freyr directory in the docker volume.
- Right-click the Freyr directory and click Properties.
- Next, click Permissions, than create.
- As user or group select
Everyone
, make sure the type is set toAllow
and it is applied toall descendants
.- Check the boxes for Read and Write and click save.
- Now reopen Container Manager and go to the container that was just build for you, first click Action, then open a terminal.
- Click create and then click on the newly created terminal, it's probably called
bash
.- Enter
mkdir music
in the terminal.- Repeat points 1 & 2.
- Click
Permissions
again and selectEveryone
, press delete and hit save.Step 5: Complete the installation
- Go to the project tab and click the project you created before.
- Ignore the warning about Webstation and press cancel.
- Stop the container by pressing the Stop button in the upper right-hand corner.
- Go to the YAML Configurations tab and replace the actual path on the machine under volumes: with the path to the directory you created via the containers terminal. For example,
/volume1/docker/freyr:/data:rw
=>/volume1/docker/freyr/music:/data:rw
- Hit Save, select Create and Start the project (rebuild the image) and click OK.
- Wait again until you see
Exit Code: 0
which means the container is successfully build.How to use Freyr on your NAS
- Open Container Manager, go to the Freyr container and click Action, then open a terminal.
- Click create and then click on the newly created terminal, it's probably called
bash
.- Here you can use Freyr like you normally would. For example, to download a Spotify track, paste
freyr spotify:track:5FNS5Vj69AhRGJWjhrAd01
inside the terminal and freyr wil download the track for you and save it in the directory you created (for example, inside/volume1/docker/freyr/music
).
Thank you for this, this was huge! I had actually installed this before but had no clue that you had to go through the container's terminal to use it.
One thing to note though, I didn't need to mess with permissions. It seemed to just work. I also ended up making the /volume1/docker/freyr/music
directory right from the start. I did not have to makedir
through terminal.
Also, I ended up removing network_mode: "host"
in the compose file since I noticed most of my containers were using bridge on container manager. I tried to google and understand the difference between host and bridge to see what should be used when, but I did not really understand. What is the reason you are using host? Have you tried using bridge instead?
I can try host and let you know if I have any issues if it is helpful for you.
from freyr-js.
@drinksomewhiskey could you try and see if Freyr works for you without the network mode set to host? Is it able to access the internet and download songs?
Can you share your permission settings for you docker volume so I could compare yours against mine?
For me network mode needed to be host in order to be able to use Freyr to download songs.
I also still need to check if it would be possible to link for example my music volume to Freyr instead of the docker one. This would make it a lot easier to manage the whole library and to be able to acces the downloaded music via music station.
from freyr-js.
Since the issues left here seem to be related to individual configuration, I'll go ahead to close this issue as it's beyond freyr. (It's unlikely there's anything I can/should change wrt freyr that'll alleviate any of them)
But the conversation can continue. β¨
from freyr-js.
@drinksomewhiskey could you try and see if Freyr works for you without the network mode set to host? Is it able to access the internet and download songs? Can you share your permission settings for you docker volume so I could compare yours against mine?
For me network mode needed to be host in order to be able to use Freyr to download songs.
I also still need to check if it would be possible to link for example my music volume to Freyr instead of the docker one. This would make it a lot easier to manage the whole library and to be able to acces the downloaded music via music station.
I reinstalled a test container using network_mode: "host"
and had no luck. Fryer would not connect to the internet. Have you tried creating a new network within container manager and using that instead of host?
For the main container that worked for me (without network host mode), I was able to have Freyr work with the directory set to another shared folder where I keep my media files (not the docker volume). The shared folder is on the same volume as the docker shared folder (I only have 1 volume). I did not have any issues with permissions nor did I need to modify anything for it to work. I am happy to share whatever setting you specifically want - please let me know.
Further, I figured out how to ssh directly into a container so you can use any terminal app versus the terminal window within container manager.
You will first need to ssh into the NAS with an admin account that has ssh privileges. Gain root access by running sudo -i
. Then, you can directly connect to the container by running docker exec -it CONTAINERID /bin/bash
(replace CONTAINERID with the fryer container ID from container manager). After all of this, you can use Freyr as normal and run typical commands.
from freyr-js.
@drinksomewhiskey, Sorry for the late response, could you mabye share your synology firewall rules so I could compare mine to yours? In the mean time, I will try creating an network my self and using that instead. I will also update the guide with our findings after which the owner of this repo could mabye add it to his documentation.
from freyr-js.
Related Issues (20)
- Error retrieving an Apple Music playlist HOT 7
- Working directory [.] doesn't exist HOT 4
- Downloaded files are all 2.15 GB in size HOT 5
- "Error while collecting source feeds..." HOT 7
- is it work on wsl? HOT 11
- I can't download my playlist. HOT 4
- Downloading spatial audio (atmos) tracks from apple music outputs stereo HOT 5
- error "app" outdated [youtube] gcqNLaQlcwQ HOT 2
- Failed To Detect An Internet Connection HOT 11
- (failed: Unexpected postprocessing error [WebAssembly.Memory(): could not allocate memory]) HOT 1
- JSON Format HOT 5
- Apple music failures- "Request failed with status code 403" HOT 6
- Constantly get "Request failed with status code 403" HOT 9
- "Unable to Collect Source Feeds" Error HOT 3
- Add exclusion filters to select a track in the source HOT 1
- Error while collecting sources feeds HOT 1
- Failed to get raw media stream HOT 1
- YTMusic search still doesn't work? HOT 1
- Getting error: "Sign in to confirm youβre not a bot"
- "Sign in to confirm your age..." error from YouTube Music HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from freyr-js.