Post by jameslundberg on Jul 5, 2022 10:32:33 GMT
I keep getting 404 returns from POST attempts. I have https enabled on the emulator redfish implementation so am overriding with curl -k option. It seems to get through, but it can't find the target to write to? It can't be a syntax error I don't think. What debugging can I turn on? Maybe in the werkzeug package somewhere? Can't find the source for the 404 handler...
Is this because we have to create an inventory before running emulator.py? Sorry I'm being such a dang minnow still....
This is the command that is not working. Posted a picture also.
Redfish Client:
curl -X POST -k -H 'Content-Type: application/json' 9.114.207.147:5000/redfish/v1/SessionService/Sessions -d '{"UserName":"Admin"}'
Redfish Server:
(venv) [[email protected] emulator]$ python -m pdb emulator.py -debug
> /home/jimlund/emulator/emulator.py(10)<module>()
-> import os
(Pdb) b werkzeug/serving:923
Breakpoint 1 at /home/jimlund/venv/lib/python3.6/site-packages/werkzeug/serving.py:923
(Pdb) c
INFO:root:Mockup folders
['Redfish']
* Redfish endpoint at localhost:5000
* Using dynamic emulation
INFO:root:Init ResourceDictionary.
INFO:root:Loading Redfish static resources
INFO:root:Init ResourceDictionary.
* Use HTTPS
* Running in Redfish mode
* Serving Flask app 'g' (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: on
INFO:werkzeug: * Running on https://127.0.0.1:5000/ (Press CTRL+C to quit)
INFO:werkzeug: * Restarting with stat
INFO:root:Mockup folders
['Redfish']
* Redfish endpoint at localhost:5000
* Using dynamic emulation
INFO:root:Init ResourceDictionary.
INFO:root:Loading Redfish static resources
INFO:root:Init ResourceDictionary.
* Use HTTPS
* Running in Redfish mode
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 690-324-437
INFO:werkzeug:127.0.0.1 - - [05/Jul/2022 06:21:03] "POST /redfish/v1/SessionService/Sessions HTTP/1.1" 404 -
Is this because we have to create an inventory before running emulator.py? Sorry I'm being such a dang minnow still....
This is the command that is not working. Posted a picture also.
Redfish Client:
curl -X POST -k -H 'Content-Type: application/json' 9.114.207.147:5000/redfish/v1/SessionService/Sessions -d '{"UserName":"Admin"}'
Redfish Server:
(venv) [[email protected] emulator]$ python -m pdb emulator.py -debug
> /home/jimlund/emulator/emulator.py(10)<module>()
-> import os
(Pdb) b werkzeug/serving:923
Breakpoint 1 at /home/jimlund/venv/lib/python3.6/site-packages/werkzeug/serving.py:923
(Pdb) c
INFO:root:Mockup folders
['Redfish']
* Redfish endpoint at localhost:5000
* Using dynamic emulation
INFO:root:Init ResourceDictionary.
INFO:root:Loading Redfish static resources
INFO:root:Init ResourceDictionary.
* Use HTTPS
* Running in Redfish mode
* Serving Flask app 'g' (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: on
INFO:werkzeug: * Running on https://127.0.0.1:5000/ (Press CTRL+C to quit)
INFO:werkzeug: * Restarting with stat
INFO:root:Mockup folders
['Redfish']
* Redfish endpoint at localhost:5000
* Using dynamic emulation
INFO:root:Init ResourceDictionary.
INFO:root:Loading Redfish static resources
INFO:root:Init ResourceDictionary.
* Use HTTPS
* Running in Redfish mode
WARNING:werkzeug: * Debugger is active!
INFO:werkzeug: * Debugger PIN: 690-324-437
INFO:werkzeug:127.0.0.1 - - [05/Jul/2022 06:21:03] "POST /redfish/v1/SessionService/Sessions HTTP/1.1" 404 -