ChrisRomp / hamclock-docker

A Dockerized version of HamClock by Elwood Downey WBØOEW.
MIT License
30 stars 4 forks source link

Synology NAS Configuration #10

Closed Aleziss closed 9 months ago

Aleziss commented 9 months ago

Hi Chris,

I did read your instructions and I think I have been able to install your docker project on my synology nas docker.

There is one issue though, it seems there is an error when I try to set the center map and I am not sure what could be wrong.

If you have some spare time and would like to help, it would be appreciated.

Thanks

Claude

Aleziss commented 9 months ago

image

Everything else in the config seems to be working well exept that error.

Thanks !

Aleziss commented 9 months ago

hamclock-web-1.zip

This is the log, if you have a chance to consult it and pinpoint where the issue is !

Thank you !

ChrisRomp commented 9 months ago

Hi @Aleziss - I don't see anything obviously out of the ordinary from your logfile, but based on some of the earlier (deleted?) messages, I'm not sure if you have the Docker image correct. It should be: ghcr.io/chrisromp/hamclock-docker:latest.

I don't have a Synology NAS, but based on their documentation, once you have the image downloaded it should figure out the rest from the image's Dockerfile, including the TCP ports and volume mount. But if you need to modify that, it should be under Advanced Settings.

HamClock exposes two TCP ports:

The HamClock image I've configured only needs one volume mount:

If you have another container running that is already using 8080 or 8081 (pretty common ports for many apps), it may map those to different ports on your Synology. Hopefully it tells you this, or you can find it under Advanced Settings.

Alternatively, you can try to follow this blog and use Docker Compose. Here is a working Docker Compose file for my build of HamClock.

For the error "Err" you're seeing in the configuration, that field is where the world map will be centered. I set mine to 90W since that's approximately the western US. You can base it off of the east/west location of your QTH (home location).

Aleziss commented 9 months ago

Hi Chris, thanks so much for taking time to reply and help.

So I did check that the docker image point to the right url and it is, I did copy as per your instructions.

The only thing I have change is the data folder but I am not sure if this is why it create an issue...

image

As for the Err, regardless of the coordinates I enter, it never works and always display Err when I hit the DONE button. I even tried yours and it does the same. On my end, I usually use 0E since I am EST.

I did delete everything and tried again, everything download properly and start correctly. It is when I try to configure my callsign, locator and map centering that it does not seem to be working. After that happend, I can't complete the configuration and it gets stuck there.

Thanks again for your help, it's really appreciated. I am almost there but I still cannot pinpoint what the issue is.

ChrisRomp commented 9 months ago

The error when saving the settings may be related to the volume mapping for your container. If it can't write to its file, then it will likely show an error.

What jumps out at me is you're changing the mount path and disregarding the volume definition at the end of the compose file. You also changed /root/.hamclock to /data but that won't work. If /volume1/docker/hamclock/data is the path on your Synology NAS, then we can skip the docker volume definition at the bottom and change the volume mount to:

/volume1/docker/hamclock/data:/root/.hamclock

Please give that a try. Full docker-compose.yaml for your configuration:

version: "3"
services:
  web:
    image: ghcr.io/chrisromp/hamclock-docker:latest
    ports:
      - "8080:8080/tcp"
      - "8081:8081/tcp"
    volumes:
      - /volume1/docker/hamclock/data:/root/.hamclock
    restart: unless-stopped
Aleziss commented 9 months ago

Forgive me, I am new to this, that's why I seek help !

I was trying to get all my docker containers somewhere on the same shared folder. I did verify that it is set to RW and it is.

image

if you think I should leave everything as per your your example file, I will try again and not touch folder configuration.

The other docker container I run have installed at that shared folder ocation and are working.

Thanks again, really appreciate it !

ChrisRomp commented 9 months ago

What you're wanting to do is fine. But the format is synology-path:container-path and the container-path must be /root/.hamclock because that's where HamClock expects to save its configuration inside of the container.

That's why I changed it to /volume1/docker/hamclock/data:/root/.hamclock above. 🙂

Aleziss commented 9 months ago

Ok, it is the /root/.hamclock that I did not grasp it seems.

So I did modify the yaml file as per your previous instructions, everything downloaded properly, container started and upgraded hamclock from 3.04 to 3.05.

This is the only file I see in my shared folder for hamclock

image

And I am also stuck again with that Err when I fill in all the parameters. As soon I press the DONE button, this happend.

image

I've included the json config file of the container and also the log.

If you want to check it out... I am starting to think that it might not just work on Synology NAS but at least I did try !

The container also displays that there is an issue but it does not point me what is the error...

image

Avertissement which means Warning (server is in french).

EDIT: I removed the zip file that you should have on your end because I did realise that there are IP informations in the logs that I did not want to be available.

You can be sure that if I/you figure out what is going on with that container, I will do a youtube video on how to make this run on as Synology NAS and credit you for it.

Thanks again for your time and patience !

Aleziss commented 9 months ago

I just found those unkown users in the data folder and I was wondering if it has anything to do with docker ?

I cannot find what are those user numbers but in the permission, everything is denied... If these user are related to docker, maybe that's why I am not able to save if those users do not have any permissions on the data folder....

image

Inconnu = Unknown, Refuser = Denied

Aleziss commented 9 months ago

If you want to help, we can arrange a meeting on zoom... I have a ham radio zoom room where we could meet there and I would be able to share screen...

Aleziss commented 9 months ago

Uh ! anything with E in Map center Ing: coordinates does NOT work.

I did try with your 90W and it DOES work !!!!

So I wonder what is going on with this ??? Is it a code problem ?

I did enter 0W and it started and look like this :

image

Aleziss commented 9 months ago

So after testing, each time I return to the hamclock setup, there is always an issue with the Map centir Ing setting, configuration open directly on Page 4 and shows Err even though I did put 0W at first and was able to hit the Done button, when I return it displays again 0E which cause Err to happend again.

The rest of the configuration seem to be retain and does not seem to cause any problems...

I am wondering if there might be something wrong with the actual code when it is run on Synology NAS ?

Aleziss commented 9 months ago

Hi Chris,

I deleted all my previous attempt in Container Manager and started from scratch.

I did a new folder where all my docker-compose files will reside for all projects now, volume1/docker/projects/hamclock-compose.

Using your instructions, I also removed the data folder and only set to volume1/docker/hamclock/root/.hamclock.

I did create a new Project in Container Manager that resides in volume1/docker/projects/hamclock-compose/ with the following code:

version: "3"
services:
  web:
    image: ghcr.io/chrisromp/hamclock-docker:latest
    ports:
      - "8080:8080/tcp"
      - "8081:8081/tcp"
    volumes:
      - /volume1/docker/hamclock:/root/.hamclock
    restart: unless-stopped

image

Once the Project is done, I simply run the Project and everything download, install and update by itself.

The only thing NOT working is that Map center Ing: with Err regardles of what coordinate I enter. The only coordinate that make hamclock-docker start is when I input 0W. All other parameters are kept.

If I restart the Container, as soon I go the the hamclock url, it goes back to settings page 4 with Err showing up again.

Should I see data in /volume1/docker/hamclock:/root/.hamclock ? Because it is totally empty folder. I am not sure if it is because of the . in your folder .hamclock that does not work with Synology NAS...

image

image

Aside that Map center Ing: Err issue, it sure does work from Synology NAS.

Here is a snapshot taken just before I change the value from 0E to 0W :

image

I don't know what to check anymore at this point !

If you have a clue on what could be wrong, let me know ! It would be a nice project to run out of Synology NAS systems.

Claude

ChrisRomp commented 9 months ago

I haven't forgotten about you, don't worry. Just busy with family so I'll check into this more when I'm able. 🙂

Aleziss commented 9 months ago

I totally understand Chris, family time 1st ! Thanks for your help !

Claude

ChrisRomp commented 9 months ago

In your configuration /volume1/docker/hamclock acts like a symbolic link (symlink) to /root/.hamclock inside of the container. So a file in the Docker container at /root/.hamclock would show up in your NAS at /volume1/docker/hamclock.

The NAS folder /volume1/docker/hamclock/root/.hamclock would translate to /root/.hamclock/root/.hamclock in the container.

The other error I don't suspect is the real problem; that's probably related to something for HamClock's ability to connect to wifi, which you should not need to do in a container.

Ooooohhhhh! Did you configure wifi in the container? Don't. The Docker container already has network access; it doesn't have a wifi interface.

ChrisRomp commented 9 months ago

I was able to reproduce your wifi error, but that's not the cause of the map center error, which I've also reproduced. I'll do some more testing. This might be a HamClock bug.

ChrisRomp commented 9 months ago

Ok....

  1. Clear your wifi settings (erase SSID).
  2. Set map center to 1W for now. It seems ok with this and doesn't return to settings on every boot.

I'm going to follow up with the HamClock developer on this issue. I'll leave this GitHub issue for tracking.

Aleziss commented 9 months ago

hmm... erase SSID ? from the container, I cannot see wifi settings...

Aleziss commented 9 months ago

center map at 1W seem to be working and not causing issue when the container restart.

ChrisRomp commented 9 months ago

"Erase SSID" - In HamClock setup on Page 1, ensure there's nothing in the WiFi. If it says "No" then you're fine. The warning you showed in your logs before about wpa_supplicant.conf is for saving wifi configuration from inside of HamClock. Again, it uses your Docker host's network.

Aleziss commented 9 months ago

wifi was turned off already... but when I did turn it on, I could see there was an SSID and a password setup. I deleted and put back to No.

image

ChrisRomp commented 9 months ago

Alright, I think you should be good to go, then. I've emailed Elwood about the error setting anything east of 1W and also asked him about that WiFi that shows up by default (I saw that, too).

When I hear back on the 0E issue I'll update here and close the issue.-

Aleziss commented 9 months ago

Awesome, thank you Chris, I'll wait before publishing a tutorial on how to do this on Synology NAS. I would like to double verify the docker-compose and procedures with you when the time arise. Awesome support !

ChrisRomp commented 9 months ago

Elwood isn’t seeing the same map center error for eastern coordinates, so it might be something about how the app is being built in my container. I’ll do some additional testing when time allows.

ChrisRomp commented 9 months ago

Since this issue is mostly about the Synology setup, I've opened #12 to track the map center issue. I have a fix, but I need to test it some more.

I'm going to close this issue since the Synology issue is resolved. 👍