Not able to established session
import pyipmi import pyipmi.interfaces
interface = pyipmi.interfaces.create_interface(interface='ipmitool', interface_type='lanplus') ipmi = pyipmi.create_connection(interface) ipmi.session.set_session_type_rmcp('10.20.100.40', port=623) ipmi.session.set_auth_type_user('admin', 'admin') ipmi.target = pyipmi.Target(ipmb_address=0x82, routing=[(0x81,0x20,0),(0x20,0x82,7)]) ipmi.session.establish() device_id = ipmi.get_device_id()
Response :
Traceback (most recent call last):
File "ipmitool.py", line 13, in
what kind of device you try to connect?
in your snippet you have configured a double bridged target like we use for AMCs in ATCA carriers
if you want to connect to normal BMC dont use the ipmi.target line
Without a target I get result:
File "/usr/local/lib/python3.7/site-packages/pyipmi/interfaces/ipmitool.py", line 147, in send_and_receive req_data.tostring()) File "/usr/local/lib/python3.7/site-packages/pyipmi/interfaces/ipmitool.py", line 96, in send_and_receive_raw cmd = self._build_ipmitool_cmd(target, lun, netfn, raw_bytes) File "/usr/local/lib/python3.7/site-packages/pyipmi/interfaces/ipmitool.py", line 205, in _build_ipmitool_cmd cmd += self._build_ipmitool_target(target) File "/usr/local/lib/python3.7/site-packages/pyipmi/interfaces/ipmitool.py", line 165, in _build_ipmitool_target if target.routing is not None: AttributeError: 'NoneType' object has no attribute 'routing'
what kind of ipmi target do you use?
please take a look into the example: https://github.com/kontron/python-ipmi/blob/master/examples/dcmi.py
I'm running into the same situation. Can somebody help me out? I've tried changing the ipmp address to 0x20 and editing the routing to the value specified in this tutorial, but still cannot work.