Comments (24)
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.
Related Issues (20)
- Invalid query HOT 2
- Freyr failed when using Apple Music with [Request failed with status code 401] HOT 7
- [i] An error occurred while processing the query HOT 1
- System could not find the specified path error HOT 8
- Apple Music Classical HOT 1
- Downloading from apple music fails HOT 2
- Download issue HOT 5
- Download Issue Album Art HOT 12
- Download Error: (failed: Failed collecting sources [<album> must be a valid string]) HOT 1
- Download Error (failed: Unexpected track processing error) Apple Music and Spotify HOT 5
- Hi, at the moment, every time i try Freyr, a new error will appear. HOT 7
- "Failed: Invalid Query" when trying to download a playlist HOT 12
- Apple Music Metadata 401 HOT 2
- Keep library synced HOT 7
- Failed to detect an internet connection. HOT 22
- (failed: Unexpected track processing error) on Deezer playlist HOT 3
- Apple Music: Request failed with status code 401 HOT 3
- A simple question HOT 5
- Output music file is 2.15 GB 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.