Giter Club home page Giter Club logo

Comments (24)

miraclx avatar miraclx commented on May 26, 2024

Hi, @ArthurHuyghe, can you retry this with the docker image built from the git HEAD?

freyrcli/freyrjs-git:master

from freyr-js.

ArthurHuyghe avatar ArthurHuyghe commented on May 26, 2024

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.

miraclx avatar miraclx commented on May 26, 2024

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.

miraclx avatar miraclx commented on May 26, 2024

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.

ArthurHuyghe avatar ArthurHuyghe commented on May 26, 2024

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.
image
looking at the results it think it has somthing to do with the permisions, however it might also be somthing else.

from freyr-js.

miraclx avatar miraclx commented on May 26, 2024

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.

ArthurHuyghe avatar ArthurHuyghe commented on May 26, 2024

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.
image

from freyr-js.

miraclx avatar miraclx commented on May 26, 2024

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.

ArthurHuyghe avatar ArthurHuyghe commented on May 26, 2024

Yes, it gets me a ip ( i guess ipv6) but it is different than when i manualy go to icanhazip.com.

from freyr-js.

miraclx avatar miraclx commented on May 26, 2024

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.

drinksomewhiskey avatar drinksomewhiskey commented on May 26, 2024

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 and host networks, but neither option worked.

Steps to Reproduce

  1. Install Docker Container Manager on Synology NAS.
  2. Pull the Freyr-js image and create a container.
  3. Configure the network settings using bridge or host network.
  4. Set docker_desktop=true as a environment variable
  5. 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 or host) 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 or host)]
  • 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.

ArthurHuyghe avatar ArthurHuyghe commented on May 26, 2024

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.

drinksomewhiskey avatar drinksomewhiskey commented on May 26, 2024

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.

ArthurHuyghe avatar ArthurHuyghe commented on May 26, 2024

@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.

miraclx avatar miraclx commented on May 26, 2024

@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.

ArthurHuyghe avatar ArthurHuyghe commented on May 26, 2024

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.

ArthurHuyghe avatar ArthurHuyghe commented on May 26, 2024

@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)

  1. Open Package Center and search for Container Manager.
  2. Install the package following the installation wizard.

Step 2: Make a directory for Freyr

  1. Open File Station and go to the docker volume.
  2. Create a new directory called Freyr.

Step 3: Building the container using Docker Compose

  1. Go to the project tab and click create.
  2. Choose a Project name like Music Downloader.
  3. Select the path to the directory you created before.
  4. As source select Create a docker-compose.yml.
  5. 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"
  1. Replace [Insert_Path_here] with the path to the Freyr directory you just created earlier. For example /volume1/docker/freyr.
  2. Press Next, ignore the settings for the web portal and press next again, confirm the summary of your settings and click Done to finish.
  3. Wait until you see Exit Code: 0 which means the container is successfully build.

Step 4: Fixing the permissions

  1. Open File Station and go to the parent directory of the Freyr directory in the docker volume.
  2. Right-click the Freyr directory and click Properties.
  3. Next, click Permissions, than create.
  4. As user or group select Everyone, make sure the type is set to Allow and it is applied to all descendants.
  5. Check the boxes for Read and Write and click save.
  6. Now reopen Container Manager and go to the container that was just build for you, first click Action, then open a terminal.
  7. Click create and then click on the newly created terminal, it's probably called bash.
  8. Enter mkdir music in the terminal.
  9. Repeat points 1 & 2.
  10. Click Permissions again and select Everyone, press delete and hit save.

Step 5: Complete the installation

  1. Go to the project tab and click the project you created before.
  2. Ignore the warning about Webstation and press cancel.
  3. Stop the container by pressing the Stop button in the upper right-hand corner.
  4. 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
  5. Hit Save, select Create and Start the project (rebuild the image) and click OK.
  6. Wait again until you see Exit Code: 0 which means the container is successfully build.

How to use Freyr on your NAS

  1. Open Container Manager, go to the Freyr container and click Action, then open a terminal.
  2. Click create and then click on the newly created terminal, it's probably called bash.
  3. 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.