ateodorescu / home-assistant-ipmi

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

Error Connecting to IPMI Server on Dell R720 from Home Assistant Docker on Raspberry Pi* #46

Closed FischLord closed 3 weeks ago

FischLord commented 3 weeks ago

Description

When attempting to connect to my Dell R720 server via IPMI, I encounter the following error in the log:

2024-06-21 11:23:20.715 ERROR (SyncWorker_6) [custom_components.ipmi.server] Error connecting to IPMI server 192.168.1.1: Max retry while sending and/or receiving ipmimessage for rmcp host 192.168.1.1

System Information

Problem Description

Additional Information

Steps to Reproduce

  1. Install the IPMI add-on via HACS.
  2. Attempt to connect to a Dell R720 server via IPMI.

Expected Behavior

The connection should be successfully established, similar to using the ipmitool command from the command line.

Actual Behavior

An error "Max retry while sending and/or receiving ipmimessage for rmcp host 192.168.1.1" is displayed in the Home Assistant log, and the connection fails.

Request for Assistance

I need help to identify and resolve the issue so that the IPMI connection can be successfully established via Home Assistant.

Thank you in advance!

ateodorescu commented 3 weeks ago

Hi! ipmi integration works best with ipmi-server addon (https://github.com/ateodorescu/home-assistant-addons). If the addon is not used then ipmi integration uses a python library that does not work as ipmitool and does not support some servers.

Since you run you Haas on docker then it's better to use the docker image that @MNeverOff implemented for ipmi-server addon https://hub.docker.com/r/mneveroff/ipmi-server

Hope this helps!

FischLord commented 3 weeks ago

Hi @ateodorescu,

Thank you for your prompt response and suggestions. Unfortunately, I still encounter the same issue despite trying several approaches. Here’s a summary of the steps I’ve taken:

  1. I attempted to implement the solution using the ipmi-server addon as you suggested. I followed the instructions on the GitHub page you provided and also explored the Docker image by @MNeverOff.
  2. I tried setting up Home Assistant both as a Docker instance and via Home Assistant OS. In both setups, I installed the IPMI custom component through HACS and manual installation.

Despite these efforts, the error persists:

2024-06-24 19:35:51.922 ERROR (SyncWorker_15) [custom_components.ipmi.server] Error connecting to IPMI server 192.168.1.1: Max retry while sending and/or receiving ipmimessage for rmcp host 192.168.1.1
2024-06-24 19:35:51.922 ERROR (SyncWorker_15) [custom_components.ipmi.server] Error connecting to IPMI server 192.168.1.1: Max retry while sending and/or receiving ipmimessage for rmcp host 192.168.1.2

I’m unsure if I might be missing something in the setup process or if there might be an issue with the documentation being outdated. Any further guidance or troubleshooting steps would be greatly appreciated. I’m keen to get this integration working and am open to any suggestions you may have.

Thank you for your help and patience!

Best regards,
FischLord

MNeverOff commented 3 weeks ago
  1. I attempted to implement the solution using the ipmi-server addon as you suggested. I followed the instructions on the GitHub page you provided and also explored the Docker image by @MNeverOff.

Right, @FischLord, I kinda feel kinda bad for bringing more stuff upon @ateodorescu's plate, so feel free to raise an Issue in the repo for the wrapper.

However, I would advise you take a few troubleshooting steps and try to get that running one by one to see where the error's ocurring. Take a look at the testing the connectivity section of my writeup on gettingI IPMI running w/ Apple Home, sections surrounding that one give a decent example of how to take it one step at a time.

ateodorescu commented 3 weeks ago

Hi @ateodorescu,

Thank you for your prompt response and suggestions. Unfortunately, I still encounter the same issue despite trying several approaches. Here’s a summary of the steps I’ve taken:

  1. I attempted to implement the solution using the ipmi-server addon as you suggested. I followed the instructions on the GitHub page you provided and also explored the Docker image by @MNeverOff.
  2. I tried setting up Home Assistant both as a Docker instance and via Home Assistant OS. In both setups, I installed the IPMI custom component through HACS and manual installation.

Despite these efforts, the error persists:

2024-06-24 19:35:51.922 ERROR (SyncWorker_15) [custom_components.ipmi.server] Error connecting to IPMI server 192.168.1.1: Max retry while sending and/or receiving ipmimessage for rmcp host 192.168.1.1
2024-06-24 19:35:51.922 ERROR (SyncWorker_15) [custom_components.ipmi.server] Error connecting to IPMI server 192.168.1.1: Max retry while sending and/or receiving ipmimessage for rmcp host 192.168.1.2

I’m unsure if I might be missing something in the setup process or if there might be an issue with the documentation being outdated. Any further guidance or troubleshooting steps would be greatly appreciated. I’m keen to get this integration working and am open to any suggestions you may have.

Thank you for your help and patience!

Best regards, FischLord

Regarding your 2nd attempt with the Home Assistant OS, I have to say that I am using it too but you have to add the addon yourself. Follow this guide to install ipmi-server addon: https://www.home-assistant.io/common-tasks/os#installing-third-party-add-ons

FischLord commented 3 weeks ago

Hi @ateodorescu,

Thank you very much for your suggestion! I followed your instructions to manually add the IPMI-server addon, and it worked perfectly. I'm very grateful for your help.

I plan to write a small guide detailing the steps I took to get everything working and will share it here later to help others who might encounter the same issue.

As for @MNeverOff's solution, I haven't tried it yet since I was able to resolve the problem with the method you recommended. However, I do plan to give it a try when I have more time.

Thanks again for your support!

Best regards,
FischLord

FischLord commented 1 week ago

Guide for Setting Up the IPMI Add-on in Home Assistant

Here is a detailed guide on how to integrate and use the IPMI add-on in Home Assistant, based on my experience and community support.

Prerequisites

Installation and Configuration Steps

1. Installing the IPMI Add-on

  1. Adding the IPMI Add-on Repository

  2. Adding the Repository to Home Assistant

    • Navigate to Supervisor > Add-on Store in the Home Assistant web interface.
    • Click on the “Repositories” tab and add the GitHub repository URL.
    • You should now see the ipmi-server add-on listed in the Add-on Store.
  3. Installing and Starting the IPMI Add-on

    • Select the ipmi-server add-on from the list and install it.
    • After installation, start the add-on.
    • Configure the add-on as needed, especially the port and other relevant settings.
  4. Connecting to the IPMI Server

    • Ensure the server you want to control via IPMI is accessible and IPMI is enabled. Verify the IP address and credentials of the IPMI server.
    • Test the connection with the following command to ensure the connection from your Home Assistant server works:
      ipmitool -I lanplus -H 192.168.1.1 -U [username] -P [password] chassis status

2. Integrating the IPMI Add-on into Home Assistant

  1. Installing the IPMI Custom Component

    • Open the Home Assistant web interface and navigate to HACS > Integrations.
    • Search for “IPMI” and install the IPMI custom component.
  2. Configuring the IPMI Integration

    • Go to Configuration > Integrations > Add and select “IPMI.”
    • Enter the required information:
      • Name: A name for the connection.
      • Server IP: The IP address of the server to be controlled.
      • Port: The port the server has opened for IPMI.
      • Username: The username for the IPMI user.
      • Password: The password for the IPMI user.
      • IPMI Server Host: The HTTP address of the previously installed IPMI add-on (usually the IP of the Home Assistant server or localhost).
      • Add-on Port: The configurable port of the add-on.
      • Interface: Select “lanplus.”

3. Verification and Testing

  1. Testing the Connection

    • Test the configuration by executing commands through the Home Assistant interface or by making direct HTTP requests to the IPMI add-on.
    • Example of an HTTP request:
      http://YOUR_HASS_SERVER_IP:9595/command?params=-I%20lanplus%20-H%20YOUR_IPMI_SERVER_IP%20-U%20ADMIN%20-P%20YOUR_PASSWORD%20bmc%20info
  2. Troubleshooting

    • Check the Home Assistant logs for error messages and adjust the configuration accordingly.
    • Ensure all IP addresses, usernames, and passwords are entered correctly.