Closed maxalbani closed 4 years ago
Hey there @k4ds3, @jhollowe, mind taking a look at this issue as its been labeled with a integration (proxmoxve
) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)
proxmoxve documentation proxmoxve source (message by IssueLinks)
I tried in a test installation with version 0.110 and the integration works correctly renewing the ticket after 2 hours. So it is assumed that version 0.111 has corrupted the integration. @K4ds3, @jhollowe any ideas?
Same thing here. Rebooted my HomeAssistant install at 14:11 yesterday, at 16:11 I'm getting the exact same errors in the logs as @maxalbani but with different binary_sensor.names:
last line of each entry is the same 401: proxmoxer.core.ResourceException: 401 Unauthorized: permission denied - invalid PVE ticket - b''
I am on HomeAssistant 0.111.3
Interesting. How often is HA polling your PVE? the proxmoxer library should be renewing the ticket as long as it is polling at least once every two hours.
Interesting. How often is HA polling your PVE? the proxmoxer library should be renewing the ticket as long as it is polling at least once every two hours.
With the ticket valid in the first two hours, HA updates the sensors about every 30 seconds, so that's not the problem. Something has changed with the 0.111.x version of HA, because everything worked correctly up to 0.110.
I'll look at it after work today. I'm planning to add API token authentication for this integration to try to alleviate this problem.
I used this integration as a starting point for this my project: https://github.com/maxalbani/home-assistant-proxmox-management
The authentication renewal was removed from the integration because it is now handled by the connection library. I'm running hass with a debug build of the library to see where the issue is.
For now I would recommend reverting to 0.110 if you need this working currently. You could also manually re-add the integration's old renewal code if you want to use 0.111
For now I would recommend reverting to 0.110 if you need this working currently. You could also manually re-add the integration's old renewal code if you want to use 0.111
How can I manually re-add old renewal code on Hassio? Thank's for your job!
@maxalbani I'm not sure. With hassio (Home Assistant), it might be hard to do.
@maxalbani I'm not sure. With hassio (Home Assistant), it might be hard to do.
I thought so too ... Do you have a forecast on solving the problem?
It looks like something weird is happening with the library renewing the ticket. I think it is an issue with the library working within the async worker threads, so each thread is trying to renew and PVE is not liking it. I've got a test running now with only one container being polled. If that doesn't fail, I will know what the issue is. I just have to wait 2 hours every time I change something. I can just revert back in the integration's renewal code, but I would like to try to get it working with the library's built-in renewal.
found and have a fix for the issue. The library was renewing the authentication ticket, but would only send the original ticket (the session was not pulling the cookie from the auth).
I'll get a new version of the library out and then update the integration to use the fixed version (and do proper testing on it).
Is there any news? Thanks
Still waiting on the PR to be merged. You can also just manually update the proxmoxer dependency to version 1.1.1.
The problem
Exactly two hours after restarting HA, Proxmox integration no longer works with error: 401 Unauthorized: permission denied - invalid PVE ticket
Environment
Problem-relevant
configuration.yaml
Traceback/Error logs
Additional information
HassOS is a proxmox virtual machine