DMTF / Redfishtool

A Python34 program that implements a command line tool for accessing the Redfish API.
Other
231 stars 69 forks source link

redfishtool: getCollection: Error getting service root, aborting #65

Closed aparnabharathan1995 closed 4 years ago

aparnabharathan1995 commented 5 years ago

While running the redfish utility i am getting the following error:-

$python3 redfishtool -r ########### -u ######### -p ####### Systems list

ERROR LOG :-

/home/vkchlt0163/.local/lib/python3.5/site-packages/requests/init.py:91: RequestsDependencyWarning: urllib3 (1.25.2) or chardet (3.0.4) doesn't match a supported version! RequestsDependencyWarning) redfishtool: getCollection: Error getting service root, aborting

Can anyone please help me out

mraineri commented 5 years ago

It looks like a versioning problem with some of your packages. Can you send me the output of these commands?

pip3 show requests pip3 show urllib3 pip3 show chardet

mraineri commented 5 years ago

Looking over the requests package a bit, there is a dependency that urllib3 must be lower than 1.25.

This should reinstall the requests package and load the right version of urllib3:

pip3 install --upgrade requests

aparnabharathan1995 commented 5 years ago

pip3 show requests

Metadata-Version: 1.1 Name: requests Version: 2.9.1 Summary: Python HTTP for Humans. Home-page: http://python-requests.org Author: Kenneth Reitz Author-email: me@kennethreitz.com License: Apache 2.0 Location: /usr/lib/python3/dist-packages Requires: Classifiers: Development Status :: 5 - Production/Stable Intended Audience :: Developers Natural Language :: English License :: OSI Approved :: Apache Software License Programming Language :: Python Programming Language :: Python :: 2.7 Programming Language :: Python :: 3 Programming Language :: Python :: 3.3 Programming Language :: Python :: 3.4 Programming Language :: Python :: 3.5 You are using pip version 8.1.1, however version 19.1.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command.

pip3 show urllib3

Metadata-Version: 2.1 Name: urllib3 Version: 1.24.3 Summary: HTTP library with thread-safe connection pooling, file post, and more. Home-page: https://urllib3.readthedocs.io/ Author: Andrey Petrov Author-email: andrey.petrov@shazow.net Installer: pip License: MIT Location: /usr/local/lib/python3.5/dist-packages Requires: Classifiers: Environment :: Web Environment Intended Audience :: Developers License :: OSI Approved :: MIT License Operating System :: OS Independent Programming Language :: Python Programming Language :: Python :: 2 Programming Language :: Python :: 2.7 Programming Language :: Python :: 3 Programming Language :: Python :: 3.4 Programming Language :: Python :: 3.5 Programming Language :: Python :: 3.6 Programming Language :: Python :: Implementation :: CPython Programming Language :: Python :: Implementation :: PyPy Topic :: Internet :: WWW/HTTP Topic :: Software Development :: Libraries You are using pip version 8.1.1, however version 19.1.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command.

pip3 show chardet

Metadata-Version: 1.1 Name: chardet Version: 2.3.0 Summary: Universal encoding detector for Python 2 and 3 Home-page: https://github.com/chardet/chardet Author: Ian Cordasco Author-email: graffatcolmingov@gmail.com License: LGPL Location: /usr/lib/python3/dist-packages Requires: Classifiers: Development Status :: 4 - Beta Intended Audience :: Developers License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL) Operating System :: OS Independent Programming Language :: Python Programming Language :: Python :: 2 Programming Language :: Python :: 2.6 Programming Language :: Python :: 2.7 Programming Language :: Python :: 3 Programming Language :: Python :: 3.2 Programming Language :: Python :: 3.3 Topic :: Software Development :: Libraries :: Python Modules Topic :: Text Processing :: Linguistic Entry-points: [console_scripts] chardetect = chardet.chardetect:main You are using pip version 8.1.1, however version 19.1.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command.

mraineri commented 5 years ago

Did you also try "pip3 install --upgrade requests" and re-running redfishtool? It's odd now that the request package is reporting urllib3 is 1.25.2, but pip is reporting 1.24.3.

aparnabharathan1995 commented 5 years ago

I tried pip3 install --upgrade requests. Now my urllib3 is 1.24.3 requests - 2.21.0 chardet - 3.0.4

still i am getting the following error redfishtool: getCollection: Error getting service root, aborting

mraineri commented 5 years ago

Can you please provide the full output when trying redfishtool now that urllib3 is 1.24.3? I'd like to see if the exception details are different now than when the issue was originally filed.

aparnabharathan1995 commented 5 years ago

what i have attached is the full output when trying redfishtool. No exception details is shown after doing the upgrade.

mraineri commented 5 years ago

Could you please provide the output of using curl against the service?

curl http://<rhost>/redfish/v1

aparnabharathan1995 commented 5 years ago

The output is as follows

mraineri commented 5 years ago

It looks like the service doesn't have HTTP or is blocking HTTP connections.

aparnabharathan1995 commented 5 years ago

Hi, I have redfish installed in my laptop. I found that there was no http support so i did sudo apt-get install apache 2.

Then i did the following curl -vvv http://localhost/redfish/v1/

I am getting the following error

With Regards Aparna Bharathan(VVDN/1722) VVDN Technologies PVT LTD PH:9400056282 Skype ID: aparnabharathan_1

On Mon, May 13, 2019 at 6:58 PM Mike Raineri notifications@github.com wrote:

It looks like the service doesn't have HTTP or is blocking HTTP connections.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/DMTF/Redfishtool/issues/65?email_source=notifications&email_token=AMAIUBB6ZZX4NPTM7KAJVFLPVFUJDA5CNFSM4HMAKR5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVIJZ3A#issuecomment-491822316, or mute the thread https://github.com/notifications/unsubscribe-auth/AMAIUBEMFOLKORMTNZ2YXZ3PVFUJDANCNFSM4HMAKR5A .

-- Disclaimer: © 2019 VVDN Technologies Pvt. Ltd. This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful.__

mraineri commented 5 years ago

I'm not quite sure what you mean by having Redfish installed on your laptop. Redfish is typically found on management controllers for servers and other devices provided by your system vendor. You can make your own Redfish service for your laptop as a purely software implementation of Redfish, but that's something you'd need to develop yourself.

aparnabharathan1995 commented 5 years ago

I am using a server with redfish service. Now i am getting the folllowing error on running quickstart.py

Traceback (most recent call last): File "quickstart.py", line 18, in REDFISH_OBJ = redfish.redfish_client(base_url=login_host, username=login_account,password=login_password, default_prefix='/redfish/v1') File "/usr/local/lib/python3.5/dist-packages/redfish/rest/v1.py", line 1027, in redfish_client max_retry=max_retry) File "/usr/local/lib/python3.5/dist-packages/redfish/rest/v1.py", line 952, in init max_retry=max_retry) File "/usr/local/lib/python3.5/dist-packages/redfish/rest/v1.py", line 422, in init self.get_root_object() File "/usr/local/lib/python3.5/dist-packages/redfish/rest/v1.py", line 557, in get_root_object "return code: %d" % resp.status) redfish.rest.v1.ServerDownOrUnreachableError: Server not reachable, return code: 404

With Regards Aparna Bharathan(VVDN/1722) VVDN Technologies PVT LTD PH:9400056282 Skype ID: aparnabharathan_1

On Mon, May 13, 2019 at 7:23 PM Mike Raineri notifications@github.com wrote:

I'm not quite sure what you mean by having Redfish installed on your laptop. Redfish is typically found on management controllers for servers and other devices provided by your system vendor. You can make your own Redfish service for your laptop as a purely software implementation of Redfish, but that's something you'd need to develop yourself.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/DMTF/Redfishtool/issues/65?email_source=notifications&email_token=AMAIUBHQ67CEWWCLFYNIMLTPVFXHNA5CNFSM4HMAKR5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVIMECI#issuecomment-491831817, or mute the thread https://github.com/notifications/unsubscribe-auth/AMAIUBGY2HVYY564OD6LDUDPVFXHNANCNFSM4HMAKR5A .

-- Disclaimer: © 2019 VVDN Technologies Pvt. Ltd. This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful.__

mraineri commented 5 years ago

The tool is reporting your service is returning a 404 when accessing your service. This is an indication of a service side issue. Either you have the IP address of a non-Redfish service, or your Redfish service is not implemented properly. I suggest contacting the vendor of your Redfish service for resolving this issue. There's not much that we can do on the tool side if the service is broken.

mraineri commented 4 years ago

@aparnabharathan1995 is this something we can close out now? The issue appears to be related to the vendor's service and not the tool. Were you able to contact your system vendor?

mraineri commented 4 years ago

Closing; no updates from submitter

Bhavadhara commented 11 months ago

Hi, I'm facing the same issue when trying to verify server BMC through redfishtool. "redfishtool: getCollection: Error getting service root, aborting" This is the one-line error message I'm getting. Even I verified the urllib3 is 1.24.3 and I'm not facing any issues with redfish API and postman. I need help with redfishtool on Raspbian OS.