Skip to content

establish_session() throws error CompletionCodeError Gigabyte R163-Z30-AAB2-000 #188

@mark99i

Description

@mark99i

Hi, on server Gigabyte R163-Z30-AAB2-000 this code:

import logging
logging.basicConfig(level=logging.DEBUG)

interface = create_interface(
    'rmcp',
    keep_alive_interval=0
)
ipmi: Ipmi = create_connection(interface)
ipmi.session.set_session_type_rmcp(host=ipmi_addr, port=623)
ipmi.session.set_auth_type_user(username=ipmi_login, password=ipmi_passw)

ipmi.target = Target()
ipmi.session.establish()

print(ipmi.get_chassis_status())

throws error:

DEBUG:pyipmi:ASF TX: msg
DEBUG:pyipmi:ASF RX: msg
DEBUG:pyipmi:Get Channel Authentication Capabilities
DEBUG:pyipmi:IPMI TX: 20 18 c8 81 04 38 0e 04 31
DEBUG:pyipmi:IPMI RX: 81 1c 63 20 04 38 00 01 04 14 00 00 00 00 00 8b
DEBUG:pyipmi:Authentication Capabilities:
  IPMI v1.5: True
  IPMI v2.0: False
  Auth. types: md5
  Max Auth. type: 2

DEBUG:pyipmi:Get Session Challenge
DEBUG:pyipmi:IPMI TX: 20 18 c8 81 08 39 02 70 79 69 70 6d 69 74 65 73 74 00 00 00 00 00 00 e4
DEBUG:pyipmi:IPMI RX: 81 1c 63 20 08 39 cc d3
Traceback (most recent call last):
  File "C:\Users\mark\PycharmProjects\tests\tests\pyipmi-example.py", line 26, in <module>
    ipmi.session.establish()
    ~~~~~~~~~~~~~~~~~~~~~~^^
  File "C:\Users\mark\PycharmProjects\tests\.venv-3.13\Lib\site-packages\pyipmi\session.py", line 118, in establish
    self.interface.establish_session(self)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "C:\Users\mark\PycharmProjects\tests\.venv-3.13\Lib\site-packages\pyipmi\interfaces\rmcp.py", line 528, in establish_session
    rsp = self._get_session_challenge(session)
  File "C:\Users\mark\PycharmProjects\tests\.venv-3.13\Lib\site-packages\pyipmi\interfaces\rmcp.py", line 482, in _get_session_challenge
    check_rsp_completion_code(rsp)
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^
  File "C:\Users\mark\PycharmProjects\tests\.venv-3.13\Lib\site-packages\pyipmi\utils.py", line 72, in check_rsp_completion_code
    raise CompletionCodeError(
    ...<3 lines>...
        group_extension=rsp.group_extension)
pyipmi.errors.CompletionCodeError: CompletionCodeError cc=0xcc desc=Invalid data field in Request

settings on web:
Image

with ipmitool connection success:

root@Mark-PC:~# ipmitool -I lanplus -H X -U pyipmitest -P X shell
ipmitool> bmc info
Device ID                 : 32
Device Revision           : 1
Firmware Revision         : 13.06
IPMI Version              : 2.0
Manufacturer ID           : 15370
Manufacturer Name         : GIGA-BYTE TECHNOLOGY CO., LTD
Product ID                : 4163 (0x1043)
Product Name              : Unknown (0x1043)
Device Available          : yes
Provides Device SDRs      : yes
Additional Device Support :
    Sensor Device
    SDR Repository Device
    SEL Device
    FRU Inventory Device
    IPMB Event Receiver
    IPMB Event Generator
    Chassis Device
Aux Firmware Rev Info     :
    0x09
    0x00
    0x00
    0x00
ipmitool> chassis status
System Power         : on
Power Overload       : false
Power Interlock      : inactive
Main Power Fault     : false
Power Control Fault  : false
Power Restore Policy : previous
Last Power Event     : ac-failed
Chassis Intrusion    : inactive
Front-Panel Lockout  : inactive
Drive Fault          : false
Cooling/Fan Fault    : false
Front Panel Control  : none
ipmitool> fru print
FRU Device Description : Builtin FRU Device (ID 0)
 Chassis Type          : Rack Mount Chassis
 Chassis Part Number   : 01234567
 Chassis Serial        : 01234567890123456789AB
 Board Mfg Date        : Sat Jan  1 03:10:00 2022 MSK
 Board Mfg             : Giga Computing
 Board Product         : MZ33-DC0-000
 Board Serial          : X
 Board Part Number     : 123456789AB
 Board Extra           : NULL
 Product Manufacturer  : Giga Computing
 Product Name          : R163-Z30-AAB2-000
 Product Part Number   : 000000000001
 Product Version       : 0100
 Product Serial        : X
 Product Asset Tag     : 01234567890123456789AB

FRU Device Description : FRU01 (ID 1)
 Chassis Type          : Rack Mount Chassis
 Chassis Part Number   : 01234567
 Chassis Serial        : 01234567890123456789AB
 Board Mfg Date        : Sat Jan  1 03:10:00 2022 MSK
 Board Mfg             : NULL
 Board Product         : MZ33-DC0-000
 Board Serial          : 01234567890123456789AB
 Board Part Number     : 01234567
 Board Extra           : NULL
 Product Manufacturer  : NULL
 Product Name          : R163-Z30-AAB2-000
 Product Part Number   : 000000000001
 Product Version       : 0100
 Product Serial        : 01234567890123456789AB
 Product Asset Tag     : 01234567890123456789AB

ipmitool> ^C
SIGN INT: Close Interface IPMI v2.0 RMCP+ LAN Interface
root@Mark-PC:~# ipmitool -V
ipmitool version 1.8.19
root@Mark-PC:~#

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions