-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Grafana issue on Synology NAS #22
Comments
Hi @jaydkay - When grafana starts, it attempts to install the required plugins as indicated by the error. It uses user 1000 group 1000 for this directory. The link you pasted talks about this as being a user permission issue. Some ideas I have: Is it possible you already had grafana (older version) installed? Try removing it and re-install: # stop and remove
docker stop grafana
docker rm grafana
# reinstall
docker-compose -f powerwall.yml up -d I have seen permission error if you run the # Add your user to docker group
sudo usermod -aG docker $USER If that wasn't the case, you could try to change the permission manually: # run a shell in grafana interactively
docker exec -ti --user root grafana /bin/bash
ls -la /var/lib/grafana/
chown 1000:1000 /var/lib/grafana/ |
Dear @jasonacox, thanks for your quick reply. I tried following your suggestions, alas, no success so far...
No, it's a completely new installation from scratch. In fact, it's my first contact with docker.
Yes, I needed to start ./setup.sh via sudo - it seems that on Synology DSM, docker is typically not available for the normal user. Command usermod also doesn't exist, but there are corresponding commands, so was able to add the current user to the docker group and start docker with a standard user account. Unfortunately, the error remained the same. Additionally, now also Telegraf refuses to start with the following log entry:
Finally, I also tried your final suggestion:
That didn't work either, because the container already refuses to start, so the command you suggested complains about grafana not yet running (but it never will):
If you have any more suggestions, please let me know. Thanks a lot again for your help! |
Since you originally used # remove the old install
rm -fr Powerwall-Dashboard
# git clone or pull down the repository again
git clone https://github.com/jasonacox/Powerwall-Dashboard.git
# run setup
cd Powerwall-Dashboard
./setup.sh Thanks for the feedback on this. Hopefully we can figure this out for anyone else using a Synology NAS to host their dashboard. :) |
Dear @jasonacox, after a few more tries and errors, I guess I finally got it working! Here are the steps that were required - at least in my case: Log in via SSH to Synology DSM. Create a usergroup docker: Change ownership of docker to this group: Make the user a member of the newly created group: Finally, edit file powerwall.yml and change the line
in the section grafana to the uid of the user on the Synology. I got that by running id while logged in via SSH. After this, I was able to issue ./setup.sh, finish setting it up and all containers are starting up. So far it seems to be working, although I didn't do much more beyond starting it up, yet. |
Awesome!! Nice job @jaydkay ! Thanks for posting the helpful instructions. I'll reference that in the troubleshooting tips. |
Hi @jasonacox, @jaydkay, I've just run into either the same problem or a closely related one while setting up Powerwall-Dashboard under a rootless docker. I was getting the same messages as Jochen It took a while for me to track it down - as far as I can tell for the rootless version, it comes down to the fact that grafana runs with user:group ids of 472:0 in the rootless container, and this results in name space mapping issues when creating/writing files on the host machine (this explanation isn't quite right, but is probably close enough to the truth allow resolution of the problem). I found two possible solutions:
Running
I hope this saves someone else a day or so of digging in the future. Picking up docker this way was definitely a baptism by fire. Finally, @jasonacox, thanks again for the time you have put into a great monitoring tool! |
Thanks for this great information, @BuongiornoTexas ! Is this on a Synology NAS or something else? |
Raspberry Pi 4B - so quite the journey getting docker running at all even without dealing with getting it rootless and the grafana permissions issue. Dropped in here as the error is identical to Jochen's and almost certainly related, but if you want to include it as a tip, I'd put it in a section on grafana permissions and/or rootless docker. |
Thanks @BuongiornoTexas !!!- I'm running on a Raspberry Pi as well (Raspbian GNU/Linux 11 bullseye). Can you For my setup, I had to run something like this: # Install docker
curl -fsSL https://get.docker.com/ -o get-docker.sh
sudo sh get-docker.sh
sudo apt install -y docker-compose
# Add your user to docker group
sudo usermod -aG docker $USER
# Set docker to start on boot
sudo systemctl enable docker.service
sudo systemctl enable containerd.service
# install docker-compose
sudo pip3 install docker-compose I wonder if I can add notes or |
Like you, I'm on bullseye (64 bit).
I think the difference between our installs is that I'm running docker as a non-privileged (rootless) user. So I don't have a docker group at all. The process for setup is a bit messier, but works pretty well. It's detailed at: https://docs.docker.com/engine/security/rootless/ The steps I took were:
I think everything was running after this. |
Thanks @BuongiornoTexas ! This is a great 'get starting' for anyone wanting to run docker as a non-privileged (rootless) user. I'll capture this in the troubleshooting section for anyone else wanting to do the same. Thank you! |
No probs. One more step I forgot - I created a file called
And ran Alternatively, users can just run docker compose manually. |
I had the same permission error on a Pi4 running Ubuntu. The only way I could fix it was to change the grafana user line in powerwall.yml to user: "0:0", as noted by @BuongiornoTexas. |
Is this on a standard docker install? If so, something doesn't sound quite right there - the problem I had was because docker was missing some of the privileges from a standard install (I think you have effectively given your grafana instance root privileges in the docker container, which shouldn't be needed at all). One quick thought is your user id 1000? If not, that would break the setup. |
Yes, it is standard. My user id is 1001. I change powerwall.yml to user: "1001", killed the current container and reinstalled. It is now working as expected. |
Excellent. You may want to make the powerwall.yml entry 1001:1001 so that it also has the correct group permissions. |
Hi all - i am also trying to install this on my Synology NAS.
Change ownership of docker to this group: Make the user a member of the newly created group:
Now I am getting this error back: Powerwall Dashboard (v2.8.0) - SETUPERROR: docker is not available or not runnning. Docker is running on the Synology. The user "BackupAdmin" is a member of the "docker" group: Is there anything else I can check to figure out what the issue is ? Thanks so much for your help. |
HI @marcbaier - I hope our community can chime in on this. I guess I need to add a "Synology NAS" to my test suite (currently MacOS, Ubuntu Linux, Win 11 WSL and Raspberry Pi). 😄 What model are you using?
What do you get when you run |
I get this when running docker ps: docker info: Server: |
I am trying to run this on a DS1513+ running DSM7.1.1. I could also try it on a newer DS1019+ but I would presume that I would get the same issue there as well. |
Thanks @marcbaier - that helps a lot! Your local user does not have permission to run docker. Check the permissions of the socket: ls -l /var/run/docker.sock Also, just to confirm, you did run these?
Thanks! I'll see if I can find one. |
This is what i get back when I run the docker.sock command above: |
Interesting. That should work if your local user is part of the docker group. I have seen it "not take" until I log out and log in again or reboot the host (on Linux, not a Synology). You can also try this (a common 'fix' mentioned on the docker helps): sudo chmod 666 /var/run/docker.sock |
That worked ! Now I was able to install the whole ./setup.sh. I am now stuck at the grafana setup. The IP Address of my Synology Nas is 192.168.86.58 and I wanted to use the browser on my iMac to access: http://192.168.86.58:9000, but I am getting an "this site can't be reached" error. |
When I try to restart grafana I am getting these errors, as I think others on here also got: |
It just worked out of the box. The only things I adjusted during setup of the Powerwall-Dashboard were the ones I mentioned in one of the first posts of this thread, see here. |
Hi Jason - here we go: /app $ ls -l /var/lib /app $ ls -l /var/lib/weather |
There's the problem! The weather directory does not permit access. It should look like what @jaydkay posted:
See if you can fix it - ssh in and run: ls -l /volume1/powerwall/Powerwall-Dashboard/
sudo chmod a+rx /volume1/powerwall/Powerwall-Dashboard/weather
ls -l /volume1/powerwall/Powerwall-Dashboard/ |
ok i did that and here is the result: I then restarted the weather411 container and here is the log:
I guess this means success ? If yes, you deserver a virtual beer ;) |
Great news, @marcbaier ! Congratulations, you did it! ;) Check your dashboard and you should now see weather data showing up in your graphs. You can also visit the weather411 dashboard here: http://localhost:8676/ (replace localhost with the address of your NAS).
Haha! I'll take it! Or better yet a virtual cider or Oeil-de-Perdrix... 😂 In all seriousness, I do think we need better documentation or a setup.sh that better accommodates a Synology NAS hosted stack. |
Hey all, I'm installing the powerwall dashboard on my Synology NAS. Reading through this has helped me over the hurdles you all have encountered. I ran the quick start version (option 1) and was able to get all containers running. I am running into an issue that I have not seen mentioned. I am stuck on the Grafana setup portion. When adding the InfluxDB as a data source, I receive "error connecting influxDB influxQL" after I click Save and Test. |
Hi @panderson87 - thanks for opening this. Did you happen to record or remember the main steps you took? It would be good to have that for others following the same path. 🙏 But more important, let's see if we can get your setup working! InfluxDB IssuesThis error could mean InfluxDB is not really listening - This would be evident in the "telegraf" logs: # check logs of telegraf
docker logs telegraf Errors would look like:
Docker Networking IssuesThe error you see could mean Grafana is unable to resolve the name "influxdb" which # take the stack down
./compose-dash.sh down
# rebuild the stack
./compose-dash.sh up -d It should show something like this: Try to set up the database again in Grafana after restarting. |
Thanks for the quick reply. So in checking the telegraf container, it was not fully started. Logs showed So, I deleted the container, updated the powerwall.yml file and under telegraf, changed the user from 1000:1000 to match the uid/group of my Synology installer account (I initially did this for all of the other "user" entries in the file except for this one.) Reran setup and was able to get the past the issue with the influxdb powerwall database. 10 minutes in, I am monitoring the Powerwall Power Flow dashboard and only see Weather reporting in so far. All other graphs are currently showing "No Data." I will give it more time. I'll also type up my steps i took to get this installed later this evening. Thanks! |
Thanks @panderson87 !
For anyone else who has that problem, it is an easy to fix with: chmod 644 telegraf*
docker restart telegraf
You should see data from telegraf immediately so this is not a good sign. Telegraf is likely still having an error. Check If you look at the directory ( |
The errors indicate that pypowerwall is not running correctly (see what Also, did you start the containers using ./compose-dash.sh down
./compose-dash.sh up -d |
Sorry, I restarted the containers all manually from the Docker Gui in Synology. Just rerun the commands in ssh and issue persists. In checking the pypowerwall logs it looks like a login issue and/or network issue. it's currently on wifi and it tends to drop off the network even though the AP is literally on the other side of the wall, i should get it hardwired. Receiving this message when trying to log into the powerwall as a customer. Here were the logs but I'm sure the API limit is the issue. |
are you sure you don't have an authorization issue ? you should be seeing data immediately once grafana is running. did you use the last 5 digits from your tesla gateway and not the whole password ? |
I had a similar issue today where pypowerwall wouldn’t start after update. PW had an IP address but I couldn’t reach it from the browser. I ended up restarting the eero node it was connected to and then it worked.The timing was odd because it was right after I upgraded 2.8.2 > 2.8.3. On Feb 20, 2023, at 11:46 AM, panderson87 ***@***.***> wrote:
Sorry, I restarted the containers all manually from the Docker Gui in Synology. Just rerun the commands in ssh and issue persists.
In checking the pypowerwall logs it looks like a login issue and/or network issue. it's currently on wifi and it tends to drop off the network even though the AP is literally on the other side of the wall, i should get it hardwired.
Receiving this message when trying to log into the powerwall as a customer.
Error: API Limit Reached (Api Limit reached for this endpoint).
Here were the logs but I'm sure the API limit is the issue.
pypowerwall.txt
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Yes, I am positive but will need to double-check that I don't have a typo. I changed the default password and have been using HomeAssistant to tap into the solar/powerwall's production data Energy. @dsf01 Yes, same issue here. Either the page does not respond, which a handful of mesh reboots will fix that, or now in this case, I'm getting the API limit error. I wonder if the HomeAssistant integration is having something to do with it. |
Issue resolved. It did end up being the wrong password, somehow it got reset back to default! Thanks all.
Like I said I'll try to type out series of events later today.
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: dsf01 ***@***.***>
Sent: Monday, February 20, 2023 3:12:35 PM
To: jasonacox/Powerwall-Dashboard ***@***.***>
Cc: panderson87 ***@***.***>; Mention ***@***.***>
Subject: Re: [jasonacox/Powerwall-Dashboard] Grafana issue on Synology NAS (Issue #22)
I had a similar issue today where pypowerwall wouldn’t start after update. PW had an IP address but I couldn’t reach it from the browser. I ended up restarting the eero node it was connected to and then it worked.The timing was odd because it was right after I upgraded 2.8.2 > 2.8.3. On Feb 20, 2023, at 11:46 AM, panderson87 ***@***.***> wrote:
Sorry, I restarted the containers all manually from the Docker Gui in Synology. Just rerun the commands in ssh and issue persists.
In checking the pypowerwall logs it looks like a login issue and/or network issue. it's currently on wifi and it tends to drop off the network even though the AP is literally on the other side of the wall, i should get it hardwired.
Receiving this message when trying to log into the powerwall as a customer.
Error: API Limit Reached (Api Limit reached for this endpoint).
Here were the logs but I'm sure the API limit is the issue.
pypowerwall.txt
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fjasonacox%2FPowerwall-Dashboard%2Fissues%2F22%23issuecomment-1437503941&data=05%7C01%7C%7C9853cda7690a42bbd55408db137ecf0c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638125207590930188%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=bRK%2BYz7wB8ByTJDRRbbDx6sEgTPbcG%2BL0GY0EkvYUcg%3D&reserved=0>, or unsubscribe<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAXCOJGDKIZNIRB5PYACS4Y3WYPF3HANCNFSM5UACDZBQ&data=05%7C01%7C%7C9853cda7690a42bbd55408db137ecf0c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638125207590930188%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=2SThAEfrb7Okn3vMS2iTLVi%2BbNL4foHjxcAH%2Fs3wBOw%3D&reserved=0>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@panderson87 - Your powerwall dropping off wifi may be an ARP problem - more specifically, the powerwall may still be on the network, but ignoring ARP requests. For me the symptoms were:
If your problem is similar, you could try adding a static ARP entry - worked like magic for me (and saved several hundred dollars for the hard wiring). |
Does sound like my issue (I also tried the 2.4GHz trick without success) - if the static ARP works, I've got a couple of cheat sheets for permanent static ARPs for windows and systemd setups. Let me know if you want either of them. |
Congrats on getting it to work @panderson87 !
I've seen that before. I don't know what triggers it, but have seen firmware updates reset the password in the past. The "Error: API Limit Reached" is the result of multiple bad password attempts. On the WiFi conversation, I gave up on that after always getting drop-outs (even though it would reconnect after 5-10m) and just ran a hardware. Zero issues for past year because of that. But any WiFI pro tips @BuongiornoTexas would be great for our community. :) I had a thought... while the issues seem to be more prevalent for Synology users, we seem to have an increasing number of users having setup problems. Most are related to some odd file ownership or permission setting (or even auth issue like this one for @panderson87 ). We spend a lot of time going back and forth doing basic troubleshooting steps to see what part of the stack isn't working correctly. It would be super amazing if we had a simple |
Well, I did the ARP fixes around December 2022 and haven't had any issues since, so it definitely worked for my problem. @jasonacox, your issues sounds a little different - the failure to respond to ARP takes a bit longer than 5-10 minutes to appear. I'm going to save myself a bit of time - here is the write up I did for whirlpool. https://whrl.pl/RgxRzh |
Here are the steps that I took to get this working on my NAS. I'm a github and noob so sorry if the formatting is not correct. Make sure Docker has been installed in Package Center and SSH is enabled in Terminal & SNMP on your Synology NAS
|
Wow! Thanks @panderson87 ! |
In my case, in addition to the steps regarding file ownership of docker and the usergroup settings mentioned in this post, I've only changed the user setting for grafana in |
Thanks @jaydkay - I'll keep this open to remind me to combine this insight into a guidance doc and FAQ for Synology users (unless someone else is willing to do that and submit a PR 😉 ).
Correct, they only read from the file system so as long as their user has read permission, it will work. Grafana needs to write to disk for its settings. |
I got this working following this comment by @jaydkay, but I wanted to clarify how to update the user in case it'll help someone else. After ssh'ing into the Synology NAS and running
Open |
Thank you, Daniel! |
Hi,
I tried setting up the Powerwall-Dashboard with Docker on a Synology NAS. I'm not sure if this is even supposed to work, but the setup script is running fine and three containers seem to start up okay. Only grafana keeps shutting down with the following entries in the docker log:
GF_PATHS_DATA='/var/lib/grafana' is not writable.
You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migration-from-a-previous-version-of-the-docker-container-to-5-1-or-later
mkdir: cannot create directory '/var/lib/grafana/plugins': Permission denied
Any idea what is causing this or how to get grafana running?
Best regards,
Jochen
The text was updated successfully, but these errors were encountered: