Comments (7)
That's a fairly old firmware version, current version is 2.20 try updating it:
hpilo_cli ip.goes.here. update_rib_firmware filename=latest
If it still fails after that, I'll need debug output:
hpilo_cli -dd ip.goes.here get_ahs_status
from python-hpilo.
Issue remains:
Connecting to testserver5c:443
Sending XML request, 132 bytes
POST /ribcl HTTP/1.1
Host: localhost
Content-Length: 52
Connection: Close
<?xml version="1.0"?>
<RIBCL VERSION="2.0"></RIBCL>
Received 170 bytes
HTTP/1.1 404 Not Found
Content-Type:text/html
<HTML><HEAD><TITLE>Remote Insight</TITLE></HEAD><BODY>
<H1>Request Error</H1>
HTTP/1.1 404 Not Found
</BODY></HTML>
Connecting to testserver5c:443
Sending XML request, 158 bytes
<?xml version="1.0"?>
<RIBCL VERSION="2.0"><LOGIN PASSWORD="********"><GET_AHS_STATUS /></RIB_INFO></LOGIN></RIBCL>
Received 630 bytes
<?xml version="1.0"?>
<RIBCL VERSION="2.22">
<RESPONSE
STATUS="0x0000"
MESSAGE='No error'
/>
</RIBCL>
<?xml version="1.0"?>
<RIBCL VERSION="2.22">
<RESPONSE
STATUS="0x0000"
MESSAGE='No error'
/>
</RIBCL>
<?xml version="1.0"?>
<RIBCL VERSION="2.22">
<RESPONSE
STATUS="0x0000"
MESSAGE='No error'
/>
</RIBCL>
<?xml version="1.0"?>
<RIBCL VERSION="2.22">
<RESPONSE
STATUS="0x0000"
MESSAGE='No error'
/>
</RIBCL>
<?xml version="1.0"?>
<RIBCL VERSION="2.22">
<RESPONSE
STATUS="0x0001"
MESSAGE='Syntax error: Line #0: syntax error near "" in the line: ""'
/>
</RIBCL>
Traceback (most recent call last):
File "/appl/vwlinux/bin/python/bin/hpilo_cli", line 255, in <module>
main()
File "/appl/vwlinux/bin/python/bin/hpilo_cli", line 173, in main
results = [getattr(ilo, method)(**params)]
File "/appl/vwlinux/bin/python/lib/python2.6/site-packages/hpilo.py", line 690, in get_ahs_status
return self._info_tag('RIB_INFO', 'GET_AHS_STATUS')
File "/appl/vwlinux/bin/python/lib/python2.6/site-packages/hpilo.py", line 543, in _info_tag
header, message = self._request(root)
File "/appl/vwlinux/bin/python/lib/python2.6/site-packages/hpilo.py", line 163, in _request
message = self._parse_message(data)
File "/appl/vwlinux/bin/python/lib/python2.6/site-packages/hpilo.py", line 436, in _parse_message
raise IloError(message, status)
hpilo.IloError: Syntax error: Line #0: syntax error near "" in the line: ""
Firmware:
>>> ilo.get_fw_version()
{'license_type': 'iLO 2 Advanced', 'firmware_version': '2.20', 'management_processor': 'iLO2', 'firmware_date': 'May 08 2013'}
from python-hpilo.
Ah crap, bug in the output sanitizer, making it show incorrect XML :)
Anyway, I'm afraid the bug is not in python-hpilo, but in your expectations. AHS, and thus GET_AHS_STATUS is only supported in iLO 4. The fact that the iLO returns 'Syntax error' is a known issue which is annoying but impossible to fix in python-hpilo.
from python-hpilo.
Hi Dennis,
isnt it possible to catch all this syntax error crap in a special exception e.g. IloSyntaxError? Maybe you could also check if the command is valid for the current iLO version? A List with iLO version and their supported set of commands would be great and a timesaver. Did you thought about that?
Cheers,
Gunnnar
Command output:
>>> ilo.get_all_cables_status()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/appl/env/bin/python/lib/python2.6/site-packages/hpilo.py", line 1259, in get_all_cables_status
return self._raw(('SERVER_INFO', {'MODE': 'READ'}), ('GET_ALL_CABLES_STATUS', {}))
File "/appl/env/bin/python/lib/python2.6/site-packages/hpilo.py", line 530, in _raw
header, message = self._request(root)
File "/appl/env/bin/python/lib/python2.6/site-packages/hpilo.py", line 163, in _request
message = self._parse_message(data)
File "/appl/env/bin/python/lib/python2.6/site-packages/hpilo.py", line 436, in _parse_message
raise IloError(message, status)
hpilo.IloError: Syntax error: Line #0: syntax error near "" in the line: ""
from python-hpilo.
It is possible, but there are a few problems with it:
- It requires me to maintain that list
- The iLO version isn't always known to the code yet, so the exception handler may need to do another XML call to get that version
- There are functions where this is a per-argument thing (mod_global_settings comes to mind)
- There may be actual genuine syntax errors due to bugs
So, so far I've not been in favor of that, and instead warned about it in the documentation. I may catch the error and reraise it with a diffetent message, such as 'Syntax error: Line #0: syntax error near "" in the line: "". You may have tried to use a feature this iLO version does not support'
from python-hpilo.
I've now added that in adee97b.
from python-hpilo.
That looks better to me. I can throw explaining error messages everytime from within my script. The pitty is the unclear error message from iLO remains in the scenarios you explained. The additional text is explaining the situation, when people run the script, that are not common with the iLO.
Thanks,
Gunnar
from python-hpilo.
Related Issues (20)
- hpilo 4.4.3 : iLO2 : XML or text declaration not at start of entity: line 2, column 0
- HP download site seems to be missing intermediate certs.
- HPE Smart Array version details displayling null using latest version 4.4.3.
- [feature] Add ability to connect to ILO over HTTPS proxy
- Outdated COMPAQ (HP) iLO v2 sslv3 (tls1/aes-128) issue HOT 1
- Support for roles and/or new privileges gen10/ilo5 HOT 1
- (Debian) how to run tests
- get_one_time_boot not work
- python-hpilo can't connect anymore to an iLO2 server on python3.10 HOT 13
- EPEL 8 & 9 Package Maintainers Needed HOT 1
- missing BIOS setting feature
- hponcfg is being deprecated by HPE
- iLoError not clear after 100% download completion from hpilo_cli HOT 2
- Remove IRS Direct Connect functionality, as it has been discontinued.
- ilo6 compatibility HOT 2
- Some Python2 code still in hpilo_cli file
- hpilo_cli: cannot execute: required file not found
- Compatibility issues with Python3.12: SSL: WRONG_SIGNATURE_TYPE HOT 1
- Multiple "SyntaxWarning: invalid escape sequence" in hpilo.py HOT 1
- SSL Handshakes Failed on Multiple iLO 3 Devices
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-hpilo.