ateodorescu / home-assistant-ipmi

IPMI connector for Home Assistant
MIT License
36 stars 8 forks source link

Error During Configuration: Failed to Connect #11

Closed 503Dev closed 10 months ago

503Dev commented 10 months ago

I am using the latest version of HA and all associated components. I have properly installed the IPMIToolServer Addon and have it running.

Upon installing and then attempting to configure this ipmi-connector addon I get the following error after a long pause (it appears to attempt to connect): "Failed to Connect". I entered the IP of the server in the "host" field and user/pass. The ports I left to default.

My server with ipmi access (Dell PowerEdge) responds fine via command line ipmi tools using the same IP/user, etc.

I am sure the IPMIToolServer is ok as I can open the IP:port correctly and see in the logs for that addon that it gets the request.

When I get the error during the setup of this ipmi-connector I do not see any attempt in the IPMIToolServer log, I am not sure where the connection issue is at.... in the HA logs for Core I can see this:

Logger: custom_components.ipmi
Source: custom_components/ipmi/__init__.py:353
Integration: IPMI connector ([documentation](https://github.com/ateodorescu/home-assistant-ipmi), [issues](https://github.com/ateodorescu/home-assistant-ipmi/issues))
First occurred: 5:03:40 PM (5 occurrences)
Last logged: 6:30:23 PM

Wrong connection data provided!
503Dev commented 10 months ago

I may have a solution. I am running Dell PowerEdge servers with iDrac. They have a dedicated iDrac port but I use LOM to share one of the motherboard NICs with the iDrac.

What this means is that I can ping and use iDrac on it's own IP just fine from any device on my network but a caveat is that the host OS (which is where I am running containers with HA for example) -- cannot reach the iDrac IP from within the OS. Apparently Dell recommends using VLAN to fix this but I may just connect the actual iDrac dedicated port and call it a day.

TLDR: this is not an issue with this addon but rather an iDrac thing. I think my only suggestion would be maybe to make the error messages returned a little more helpful since I was not really sure what was going on until I actually just installed ipmitool the host HA container and manually tested.

ateodorescu commented 10 months ago

I have changed the addon to log the connection errors so we can better understand what happens just by looking at the log section of the addon. The integration will also log the debug info that the addon provides (the integration will log them as debug level).

503Dev commented 10 months ago

Just wanted to leave this for any future users with Dell hardware (also thanks to the author, you rock).

If you use a PowerEdge server with iDrac integrated and it does not a dedicated LAN port you will get issues. If you have a dedicated iDrac port but decided to use LOM1/LOM2 anyway then you will need to connect the dedicated LAN port.

When using LOM configurations you will not be able to reach the SNMP remotely with the iDrac IP address. This is a known issue. It will work if you use the actual host OS on the server via RDP but anything virtualized inside like containers, wsl, etc. will not be able to communicate with the iDrac address.