DMTF/Redfish-Mockup-Creator

Getting error while running Redfish-Mockup-Creator

khaderbmc opened this issue · 4 comments

Hi Team,

I am newbiee the Redfish and I am exploring the redfishmockupcreator.

I am getting error while running the redfishmockupcreator.py.

I ran the following command in my bash terminal :

~/redfish/Redfish-Mockup-Creator$ python3 ./redfishMockupCreate.py -r 10.XXX.XXX.XXX:8000 -D /home/basha/redfish/mockups/ -u basha -p XXXXXXXX -S

And i got the following error :
redfishMockupCreate: Transport: Cant connect to remote redfish service. Aborting command
redfishMockupCreate: Transport Error. No response
redfishMockupCreate: ERROR: Cannot get Redfish service version from URI /redfish (status unknown). Assuming default version.

rhost: 10.XXX.XXX.XXX:8000

full directory path: /home/basha/redfish/mockups

description:

starting mockup creation

Creating /redfish resource

Creating /redfish/v1 resource

Traceback (most recent call last):
File "./redfishMockupCreate.py", line 825, in
main(sys.argv)
File "./redfishMockupCreate.py", line 370, in main
rft.UNAUTHENTICATED_API, 'GET', r.url, relPath=rft.rootPath)
AttributeError: 'NoneType' object has no attribute 'url'

I have provided a valid rhost too and also i have created "/home/basha/redfish/mockups" directory too.

Any suggestions on the above error would be really helpful.

Thanks again for the help.

Regards,
Khader

@khaderpython could you try running the following and providing the output for us?

curl http://10.XXX.XXX.XXX:8000/redfish/v1/
curl -k https://10.XXX.XXX.XXX:8000/redfish/v1/

Please find the response below:

/redfish/Redfish-Mockup-Creator$ curl http://10.XXX.XXX.XXX:8000/redfish/v1/
curl: (7) Failed to connect to 10.XXX.XXX.XXX port 8000: Connection refused
/redfish/Redfish-Mockup-Creator$ curl -k https://10.XXX.XXX.XXX:8000/redfish/v1/
curl: (7) Failed to connect to 10.XXX.XXX.XXX port 8000: Connection refused

Thanks for the response.

Please let me know if i need to add configuration changes.
I am able to ping to 10.XXX.XXX.XXX and get the response .
using command ping 10.XXX.XXX.XXX

Regards,
Khader

So, it looks like the service is rejecting HTTP requests. Can you verify there is a web server running at 10.XXX.XXX.XXX:8000? At least from the curl output, it looks like there's nothing available on that system. Could it be that the web server is running on a different port?

I am able to create mockup . The issue was with running the webserver.