python-ipmi
python-ipmi copied to clipboard
get_fru_inventory() CompletionCodeError on Asus ASMB5-iKVM
Traceback (most recent call last):
File "C:\Users\mark\PycharmProjects\test\ipmi_fetch_info.py", line 16, in <module>
ipmi.inventory_device()
File "C:\Users\mark\PycharmProjects\test\ipmi.py", line 104, in inventory_device
self.data['fru'] = self._decode_fru(self._session.get_fru_inventory(), device_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mark\PycharmProjects\test\.venv\Lib\site-packages\pyipmi\fru.py", line 156, in get_fru_inventory
fru.product_info_area = self.get_fru_product_area(fru_id=fru_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mark\PycharmProjects\test\.venv\Lib\site-packages\pyipmi\fru.py", line 116, in get_fru_product_area
data = self._read_fru_area(offset=header.product_info_area_offset,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mark\PycharmProjects\test\.venv\Lib\site-packages\pyipmi\fru.py", line 100, in _read_fru_area
return self.read_fru_data(offset=offset, count=count, fru_id=fru_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mark\PycharmProjects\test\.venv\Lib\site-packages\pyipmi\fru.py", line 70, in read_fru_data
rsp = self.send_message_with_name('ReadFruData', fru_id=fru_id,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mark\PycharmProjects\test\.venv\Lib\site-packages\pyipmi\__init__.py", line 213, in send_message_with_name
check_rsp_completion_code(rsp)
File "C:\Users\mark\PycharmProjects\test\.venv\Lib\site-packages\pyipmi\utils.py", line 72, in check_rsp_completion_code
raise CompletionCodeError(
pyipmi.errors.CompletionCodeError: CompletionCodeError cc=0xcc desc=Invalid data field in Request
get_lan_config_param() some error
File "C:\Users\mark\PycharmProjects\test\.venv\Lib\site-packages\pyipmi\lan.py", line 179, in get_lan_config_param
check_rsp_completion_code(rsp)
File "C:\Users\mark\PycharmProjects\test\.venv\Lib\site-packages\pyipmi\utils.py", line 72, in check_rsp_completion_code
raise CompletionCodeError(
pyipmi.errors.CompletionCodeError: CompletionCodeError cc=0xcc desc=Invalid data field in Request
get_chassis_status() is working
how I can help fix this?
# ipmitool -I lanplus -H <> -U <> -P <> fru
FRU Device Description : Builtin FRU Device (ID 0)
Chassis Type : Main Server Chassis
Chassis Part Number : xxxxxxx
Chassis Serial : xxxxxxx
Board Mfg Date : Fri Aug 18 14:38:00 2006 MSD
Board Mfg : Your Board Manf.
Board Product : Your Board Name
Board Serial : xxxxxxx
Board Part Number : xxxxxxx
Segmentation fault (core dumped)
# ipmitool -I lanplus -H <> -U <> -P <> mc info
Device ID : 32
Device Revision : 1
Firmware Revision : 1.10
IPMI Version : 2.0
Manufacturer ID : 4163
Manufacturer Name : Quarry Technologies
Product ID : 2883 (0x0b43)
Product Name : Unknown (0xB43)
Device Available : yes
Provides Device SDRs : no
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 :
0x01
0x00
0x00
# ipmitool -V
ipmitool version 1.8.19
Hi,
for the FRU data it looks like the Product Info Area of your board is broken. That is what I see from the trace. In addition ipmitool also has trouble to read/parse the data.
# ipmitool -I lanplus -H <> -U <> -P <> fru
FRU Device Description : Builtin FRU Device (ID 0)
Chassis Type : Main Server Chassis
Chassis Part Number : xxxxxxx
Chassis Serial : xxxxxxx
Board Mfg Date : Fri Aug 18 14:38:00 2006 MSD
Board Mfg : Your Board Manf.
Board Product : Your Board Name
Board Serial : xxxxxxx
Board Part Number : xxxxxxx
Segmentation fault (core dumped) <<<<<<<<<<<<<<<
You could try to read the FRU Data raw and then decode it by hand to see what is going on.
For the second thing about the Lan configuration I would need more debug information. Try to increase the debug level of the lib. See https://github.com/kontron/python-ipmi/blob/master/pyipmi/ipmitool.py#L607
Hi
...
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(ipmb_address=0x20)
ipmi.session.establish()
print(ipmi.get_chassis_status().__dict__, file=sys.stderr)
print(ipmi.get_device_id().__dict__, file=sys.stderr)
print(ipmi.get_lan_config_param().__dict__, file=sys.stderr)
...
DEBUG:pyipmi:Set Session Privilege Level
DEBUG:pyipmi:IPMI TX: 20 18 c8 81 10 3b 04 30
DEBUG:pyipmi:IPMI RX: 81 1c 63 20 10 3b 00 04 91
DEBUG:pyipmi:Session opened
DEBUG:pyipmi:IPMI TX: 20 00 e0 81 14 01 6a
DEBUG:pyipmi:IPMI RX: 81 04 7b 20 14 01 00 01 10 40 7a
{'power_on': True, 'overload': False, 'interlock': False, 'fault': False, 'control_fault': False, 'restore_policy': 0, 'id_cmd_state_info_support': True, 'chassis_id_state': 0}
DEBUG:pyipmi:IPMI TX: 20 18 c8 81 18 01 66
DEBUG:pyipmi:IPMI RX: 81 1c 63 20 18 01 00 20 01 01 10 02 bf 43 10 00 43 0b 01 00 00 00 32
{'device_id': 32, 'revision': 1, 'provides_sdrs': False, 'available': False, 'fw_revision': <pyipmi.fields.VersionField object at 0x000001101351C050>, 'ipmi_version': <pyipmi.fields.VersionField object at 0x00000110134DD310>, 'manufacturer_id': 4163, 'product_id': 2883, 'supported_functions': ['sensor', 'sdr_repository', 'sel', 'fru_inventory', 'ipmb_event_receiver', 'ipmb_event_generator', 'chassis'], 'aux': [1, 0, 0, 0]}
DEBUG:pyipmi:IPMI TX: 20 30 b0 81 1c 02 00 00 00 00 61
DEBUG:pyipmi:IPMI RX: 81 34 4b 20 1c 02 cc f6
Traceback (most recent call last):
File "C:\Users\mark\PycharmProjects\tests\tests\pyipmi-example.py", line 34, in <module>
print(ipmi.get_lan_config_param().__dict__, file=sys.stderr)
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "C:\Users\mark\PycharmProjects\tests\.venv-3.13\Lib\site-packages\pyipmi\lan.py", line 179, in get_lan_config_param
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
fru inventory:
... same code ...
print(ipmi.get_chassis_status().__dict__, file=sys.stderr)
print(ipmi.get_device_id().__dict__, file=sys.stderr)
print(ipmi.get_fru_inventory().__dict__, file=sys.stderr)
DEBUG:pyipmi:Session opened
DEBUG:pyipmi:IPMI TX: 20 00 e0 81 14 01 6a
DEBUG:pyipmi:IPMI RX: 81 04 7b 20 14 01 00 01 10 40 7a
{'power_on': True, 'overload': False, 'interlock': False, 'fault': False, 'control_fault': False, 'restore_policy': 0, 'id_cmd_state_info_support': True, 'chassis_id_state': 0}
DEBUG:pyipmi:IPMI TX: 20 18 c8 81 18 01 66
DEBUG:pyipmi:IPMI RX: 81 1c 63 20 18 01 00 20 01 01 10 02 bf 43 10 00 43 0b 01 00 00 00 32
{'device_id': 32, 'revision': 1, 'provides_sdrs': False, 'available': False, 'fw_revision': <pyipmi.fields.VersionField object at 0x000001C20D67C050>, 'ipmi_version': <pyipmi.fields.VersionField object at 0x000001C20D63D310>, 'manufacturer_id': 4163, 'product_id': 2883, 'supported_functions': ['sensor', 'sdr_repository', 'sel', 'fru_inventory', 'ipmb_event_receiver', 'ipmb_event_generator', 'chassis'], 'aux': [1, 0, 0, 0]}
DEBUG:pyipmi:IPMI TX: 20 28 b8 81 1c 11 00 00 00 08 4a
DEBUG:pyipmi:IPMI RX: 81 2c 53 20 1c 11 00 08 01 00 01 04 0c 00 00 ee ab
DEBUG:pyipmi:IPMI TX: 20 28 b8 81 20 11 00 00 00 08 46
DEBUG:pyipmi:IPMI RX: 81 2c 53 20 20 11 00 08 01 00 01 04 0c 00 00 ee a7
DEBUG:pyipmi:IPMI TX: 20 28 b8 81 24 11 00 08 00 05 3d
DEBUG:pyipmi:IPMI RX: 81 2c 53 20 24 11 00 05 01 03 11 c7 78 52
DEBUG:pyipmi:IPMI TX: 20 28 b8 81 28 11 00 08 00 18 26
DEBUG:pyipmi:IPMI RX: 81 2c 53 20 28 11 00 18 01 03 11 c7 78 78 78 78 78 78 78 c7 78 78 78 78 78 78 78 c1 00 00 00 0c 8f
DEBUG:pyipmi:IPMI TX: 20 28 b8 81 2c 11 00 00 00 08 3a
DEBUG:pyipmi:IPMI RX: 81 2c 53 20 2c 11 00 08 01 00 01 04 0c 00 00 ee 9b
DEBUG:pyipmi:IPMI TX: 20 28 b8 81 30 11 00 20 00 05 19
DEBUG:pyipmi:IPMI RX: 81 2c 53 20 30 11 00 05 01 08 00 be 4e 85
DEBUG:pyipmi:IPMI TX: 20 28 b8 81 34 11 00 20 00 20 fa
DEBUG:pyipmi:IPMI RX: 81 2c 53 20 34 11 00 20 01 08 00 be 4e 55 d0 59 6f 75 72 20 42 6f 61 72 64 20 4d 61 6e 66 2e cf 59 6f 75 72 20 42 6f 61 0a
DEBUG:pyipmi:IPMI TX: 20 28 b8 81 38 11 00 40 00 20 d6
DEBUG:pyipmi:IPMI RX: 81 2c 53 20 38 11 00 20 72 64 20 4e 61 6d 65 c7 78 78 78 78 78 78 78 c7 78 78 78 78 78 78 78 c0 c1 00 00 00 00 00 00 79 e8
DEBUG:pyipmi:IPMI TX: 20 28 b8 81 3c 11 00 00 00 08 2a
DEBUG:pyipmi:IPMI RX: 81 2c 53 20 3c 11 00 08 01 00 01 04 0c 00 00 ee 8b
DEBUG:pyipmi:IPMI TX: 20 28 b8 81 40 11 00 60 00 05 c9
DEBUG:pyipmi:IPMI RX: 81 2c 53 20 40 11 00 05 01 0a 00 d2 59 54
DEBUG:pyipmi:IPMI TX: 20 28 b8 81 44 11 00 60 00 20 aa
DEBUG:pyipmi:IPMI RX: 81 2c 53 20 44 11 c9 c2
DEBUG:pyipmi:IPMI TX: 20 28 b8 81 48 11 00 60 00 1e a8
DEBUG:pyipmi:IPMI RX: 81 2c 53 20 48 11 c9 be
DEBUG:pyipmi:IPMI TX: 20 28 b8 81 4c 11 00 60 00 1c a6
DEBUG:pyipmi:IPMI RX: 81 2c 53 20 4c 11 c9 ba
DEBUG:pyipmi:IPMI TX: 20 28 b8 81 50 11 00 60 00 1a a4
DEBUG:pyipmi:IPMI RX: 81 2c 53 20 50 11 c9 b6
DEBUG:pyipmi:IPMI TX: 20 28 b8 81 54 11 00 60 00 18 a2
DEBUG:pyipmi:IPMI RX: 81 2c 53 20 54 11 c9 b2
DEBUG:pyipmi:IPMI TX: 20 28 b8 81 58 11 00 60 00 16 a0
DEBUG:pyipmi:IPMI RX: 81 2c 53 20 58 11 c9 ae
DEBUG:pyipmi:IPMI TX: 20 28 b8 81 5c 11 00 60 00 14 9e
DEBUG:pyipmi:IPMI RX: 81 2c 53 20 5c 11 c9 aa
DEBUG:pyipmi:IPMI TX: 20 28 b8 81 60 11 00 60 00 12 9c
DEBUG:pyipmi:IPMI RX: 81 2c 53 20 60 11 c9 a6
DEBUG:pyipmi:IPMI TX: 20 28 b8 81 64 11 00 60 00 10 9a
DEBUG:pyipmi:IPMI RX: 81 2c 53 20 64 11 00 10 01 0a 00 d2 59 6f 75 72 20 50 72 6f 64 75 63 74 ce
DEBUG:pyipmi:IPMI TX: 20 28 b8 81 68 11 00 70 00 10 86
DEBUG:pyipmi:IPMI RX: 81 2c 53 20 68 11 cc 9b
Traceback (most recent call last):
File "C:\Users\mark\PycharmProjects\tests\tests\pyipmi-example.py", line 33, in <module>
print(ipmi.get_fru_inventory().__dict__, file=sys.stderr)
~~~~~~~~~~~~~~~~~~~~~~^^
File "C:\Users\mark\PycharmProjects\tests\.venv-3.13\Lib\site-packages\pyipmi\fru.py", line 156, in get_fru_inventory
fru.product_info_area = self.get_fru_product_area(fru_id=fru_id)
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File "C:\Users\mark\PycharmProjects\tests\.venv-3.13\Lib\site-packages\pyipmi\fru.py", line 116, in get_fru_product_area
data = self._read_fru_area(offset=header.product_info_area_offset,
fru_id=fru_id)
File "C:\Users\mark\PycharmProjects\tests\.venv-3.13\Lib\site-packages\pyipmi\fru.py", line 100, in _read_fru_area
return self.read_fru_data(offset=offset, count=count, fru_id=fru_id)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\mark\PycharmProjects\tests\.venv-3.13\Lib\site-packages\pyipmi\fru.py", line 70, in read_fru_data
rsp = self.send_message_with_name('ReadFruData', fru_id=fru_id,
offset=off, count=req_size)
File "C:\Users\mark\PycharmProjects\tests\.venv-3.13\Lib\site-packages\pyipmi\__init__.py", line 213, in send_message_with_name
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