homeassistant-portainer
homeassistant-portainer copied to clipboard
[Bug] Portainer not connecting with "list index out of range;" error
Setup the HACS integration and registered my portainer but get the following error:
- Home Assistant version: HA 2023.9.3
- Portainer integration version: v1.0.2
- Portainer software version: 2.19.1
check your ha log for errors
Logger: homeassistant.config_entries Source: config_entries.py:1248 First occurred: 2:36:27 PM (1 occurrences) Last logged: 2:36:27 PM
Config entry 'Portainer' for portainer integration not ready yet: list index out of range; Retrying in background
is that only error message? if so, remove the configuration entry, enable debug and readd it again so we get some information.
Thanks for the help, here is the log file once i enabled debug.
Hmm, I can see integration itself is gathering data correctly, but there are bunch of crashes related to different integrations and such. Try to fix those too, so we know its not interfering. Also, have you tried removing and readding the portainer?
The other integrations are expected, I was just trying some things out, I removed them so here is another log file, i tried completely removing and re-adding the plugin but still doesnt work
I see, you are not running it on docker, seems to be kubernates? I dont have any real experience with that. Can you give me step by step info on how to deploy same type of envinroment you have? I can spin up a VM for it.
I had the same error when I had two environments in Portainer, one being a swarm externally (which actually was empty). Removing this environment, the integration started working fine for the local one.
Thanks!
I had the same error when I had two environments in Portainer, one being a swarm externally (which actually was empty). Removing this environment, the integration started working fine for the local one.
Thanks!
yea, its could be the same issue. but its better to open issue when you have some problem like that. integration is still in baby stages, so there are many outlier cases that need an workaround.
Understood - it was a half finished config from a failed experiment, so was meaning to delete and just saw this same error before I did. Thought it may help if @alanrenouf has any empty or failing environments
Understood - it was a half finished config from a failed experiment, so was meaning to delete and just saw this same error before I did. Thought it may help if @alanrenouf has any empty or failing environments
Thanks @gapthorpe appreciate the information, I only have 1 environment but this definitely looks like some response the API is giving that the code isn't expecting. @tomaae is there any way to enable debug on the GET requests?
yes, but that is not your issue. integration was build for docker. you use kubernates which is handled differently by portainer. I need help setting up development environment for kubernates to implement it.
@tomaae Probably best to follow something like this for a quick start: https://yashsrivastav.hashnode.dev/getting-started-with-portainer-using-kind
Anything I can do to help with this one?
not really, I just have very little time right now due to family issues. update for this one will probably take a bit, since this integration needs more features to be really useful and of course kubernates support.
I have several different Kubernetes environments in my Portainer instance and I'm available for testing. Please let me know if can help in any way. While I wait, I may try to provide at least some patch to ignore any environment that is not Docker without crashing.
Another with this issue. I'm running Kubernetes via microk8s on Ubuntu (Jammy)...this should be probably one of the easiest environments to build a test VM for.
Install Jammy, install microk8s (via snap) and then install the portainer add-on with microk8s enable portainer
, which should give you Portainer available on port 30777. I actually run HA inside microk8s, so I'm trying to access it via portainer.portainer.svc.cluster.local:9000
, but it should work from outside the cluster at port 30777.
@tomaae you can setup k3s on a raspberry pi for testing this, i am also available to help if needed. let me know. thanks.
I have the same issue, i have a Portainer instance with a 9 node MicroK8s cluster and an additional 3 docker hosts and i receive this same error. happy to be a tester for any code changes
Ran into the same issue when trying to set this up in HA. Have a docker setup in portainer, along with a k3s cluster.