-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Unable to get Proxmox list widget to work #1317
Comments
If you're enjoying Dashy, consider dropping us a ⭐ |
Searched and found this issue before creating the same. No VM data is listed. If I put an intentionally wrong value in for node the widget throws an error so I can only assume that with the correct value and no error on screen it is gettign data back from the API but not parsing it correctly. |
This is the JSON from the constructed API call in the browser:
|
Same problem here, fresh install of dashy and couldnt make this widget work. |
Hi, I also struggled at first, but then I changed the permissions of the API token in the datacenter web gui. Unticked the privilege separation., then the "show permissions" section got populated where it was empty before. I am a noob, so I must still go rtfm on the detail of what it means and what the risks are. |
No luck here getting this widget to connect. I had hopes that the "privilege separation" would work (it was the solution to a similar problem in homepage and Heimdall). I wonder what the trick is to get this to authenticate? |
I don't think I'm going to be much help here, as I didn't build the Proxmox widget, and I don't have a Proxmox instance to test with. But what does the error message in the browser logs say? (here's how to check) |
@alayham Could you take over here? |
Gladly. I have a video that shows how to install a development environment for Dashy and install the widget to fix a bug in it. I also added documentation to handle the common errors I faced with the widget. The documentation for the errors is in the repo, but not visible on the documentation site. Suggestions for users:
|
Hi @alayham Sadly I could not resolve the issue with the info provided above and in the docs. Sadly the part how to extract the CA is compledtely missing, did you forget that?! By manually clicking "view" on the root ca I could see the CA key, I copy pasted it to a file and did the export command with my path, sadly even after a reboot and rebuild of dashy I'm still getting the error code: axios request failed with status code 500 Is it really neccessary for everyone to extract that certificate? |
Yes, It is necessary unless the Proxmox VE uses a trusted certificate. The reason is that Nodejs has a list of trusted certificates authority compiled inside the binary, and will only accept them for security. We have the ability to add to them using the following process: 4- Copy everything in the text area below View Certificate and paste it into a file called pve-root-ca.pem |
@alayham Thanks for the guide! Does Dashy have to have a certificate and run with https /ssl ? Also is it okay to use the IP instead of a domain name for the cluster url? Here a little screenshot. My config:
Thanks.- |
Timeout is usually a firewall issue. Can you access the cluster from the Dashy host using |
Seems to work just fine when pinging and curl works if I add -k (think that was to ignore self signed cert) |
Troubleshooting integrations is tricky, and to help you I need to identify the root cause of the issue. Let's try first to identify whether the cause is in the Dashy host, the PVE host, or the network. Since you need to use -k, this means that the PVE CA certificate is not trusted on the Dashy host. Can you try to trust it? the steps to trust a ca certificate depend on the operating system and the browser. I can advise you if needed but I need to know the OS on the dashy host. After trusting the PVE root certificate, we can do the following on the dashy host, not on your machine. It is important to run the command from the Dashy host using the Dashy user, not root. replace YOURAPITOKEN with your token in the following command after dashy= and before the single quote, then run run the command on the dashy host and put the response here.
|
Hi, Thank you! Yes as stated above, dashy is not running in SSL mode and Proxmox currently only has it's self signed cert. Host of Dashy is a raspberrypi running raspbian. Here the result which seems that you guess with the cert not being trusted is true;
Again when using-k switch it seems to output the data, is there any way to get such a -k option in the widget as well? |
Okay so a little update on this I dug a lot deeper into this and found out, due to me once changing from a simple ip to 10x network the cert had the old ip included, so I regenerated them to official proxmox commands. So I thought I finally finally solved it, however I still get the same exact error. So I cannot use the direct ip 10.50.20.10 ? |
1- Try to use
then rebuild Dashy and try again |
Okay, edited the hosts file, ping works. When trying to execute the same curl command or with lenovo1 or lenovo1.home i just get straight up no output to cli at all. Even disabled the proxmox firewall compledtely, still no output to curl at all. Visiting the url in browser on raspberrypi works just fine. |
There is a huge difference between no output (got an empty response) and no output (timeout, or no response at all) Which one do you get? Did you test the widget? |
But curl with debug seems to show promising results.
|
Edit: After regenerating the api_key on proxmox it now outputs the api data. Probably due to ssl cert change. Surprisingly curl even outputs the data when not specifiying the cert file, so the import seems also successful. However dashy is not working, e.g. still the same error. |
Where did you run the command? Did you open a shell session inside the Dashy container?
Because the CA cert is trusted on the host that you ran the command on. Is it the Dashy container or the PI?
Can you paste the widget code in your conf, and the output of this command |
This is probably only because the api-key was outdated as described in the edit.
I run it on the docker container so dashy host.
Output:
Here the widget code: - type: proxmox-lists
useProxy: true
options:
cluster_url: https://10.50.20.10:8006
user_name: root@pam
token_name: dashy
token_uuid: {api_key}
id: 1_1782_proxmoxlists |
You are not following my advice!! Here is what you I suggest you do again: You followed item 1 only which lead you to the certificate issue, which is what I initially suspected. Now that was fixed, and I assume the certificate you mounted in |
It seems that Dashy is still unable to resolve the name although you are able to resolve it on the shell. Anyway, I think this is a network issue and not related to Dashy or the widget. I am not familiar with your setup therefore my ability to help you is very limited. The lesson from this issue is that the proxy should not crash if it gets an error. It should return the error message instead of the 500 crash, and that is a potential ticket for Dashy if someone is interested. |
As I got no Feedback from the others I'll close this ticket. |
Sadly I have to reopen this. The Widget seems to work for me -> It shows the noes all fine.
I get a empty widget with no errors in the browser console nor any error in networks tab, the CORS-Proxy request is green and the auth headers were present. The Network tab shows the following response: Have you got any idea here? |
The response you got means that the connection to the API was successful, Authentication was successful, but the result of your query is empty. |
Thank you for the response! Actually disabling Priviledge Seperation did the trick for me. Btw. Amazing widget you made, really like it! |
Discussed in #1315
Originally posted by ImChet September 14, 2023
Error:
Here is the code block for my proxmox-list:
The text was updated successfully, but these errors were encountered: