openbmc / bmcweb

A do everything Redfish, KVM, GUI, and DBus webserver for OpenBMC
Apache License 2.0
156 stars 131 forks source link

Internal error on BIOS upgrade #146

Closed Jayashree-D closed 3 years ago

Jayashree-D commented 4 years ago

In BIOS upgrade, I tried the following command to upgrade BIOS, and it shows internal error. The file is being copied to /tmp/images/id, and journalctl logs are also empty.

[root@odc ~]#curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/octet-stream" -X POST -T /home/bios/bios.tar.gz https://${bmc}/redfish/v1/UpdateService { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_0_0.Message", "Message": "The request failed due to an internal service error. The service is still operational.", "MessageArgs": [], "MessageId": "Base.1.4.0.InternalError", "Resolution": "Resubmit the request. If the problem persists, consider resetting the service.", "Severity": "Critical" } ], "code": "Base.1.4.0.InternalError", "message": "The request failed due to an internal service error. The service is still operational." } }

root@tiogapass:~# cat /etc/os-release ID=openbmc-phosphor NAME="Phosphor OpenBMC (Phosphor OpenBMC Project Reference Distro)" VERSION="2.8.0-dev" VERSION_ID=2.8.0-dev-2489-g974deaf-dirty PRETTY_NAME="Phosphor OpenBMC (Phosphor OpenBMC Project Reference Distro) 2.8.0-dev" BUILD_ID="2.8.0-dev" OPENBMC_TARGET_MACHINE="tiogapass"

Please let me know any suggestions on this.

anoo1 commented 4 years ago

@gtmills commented on IRC:

[12:34:01]  <GunnarM> sri04, so instead of a task returned on an image upload, you are seeing an internal error ?
[12:35:55]  <GunnarM> To debug bmcweb, rebuild with -DCMAKE_BUILD_TYPE=Debug
[12:36:29]  <GunnarM> Any idea how long it is taking to upload the image ?

The clue may be in the time it's taking to upload, since bmcweb may be timing out.

Jayashree-D commented 4 years ago

I missed this comment on IRC. When I tried to upload the BIOS image, it takes about 20 secs and internal error is shown. But when I tried for BMC image, it takes about 35 secs and there is also journalctl logs.

root@tiogapass:~# journalctl | grep image Jan 01 06:34:27 tiogapass phosphor-image-updater[242]: BMC image activating - BMC reboots are disabled. Jan 01 06:34:32 tiogapass phosphor-image-updater[242]: BMC activation has ended - BMC reboots are re-enabled. Jan 01 06:34:34 tiogapass phosphor-image-updater[242]: BMC image ready, need reboot to get activated.

gtmills commented 4 years ago

Might need to rebuild bmcweb with -DCMAKE_BUILD_TYPE=Debug

Jayashree-D commented 4 years ago

I installed the SDK using the below link. https://github.com/openbmc/docs/blob/master/development/dev-environment.md

After that, I compiled cmake ./ && make and I am getting the below error.

Scanning dependencies of target bmcweb [ 7%] Building CXX object CMakeFiles/bmcweb.dir/src/webserver_main.cpp.o In file included from /home/bmc/bmc/bmcweb/http/app.h:3, from /home/bmc/bmc/bmcweb/src/webserver_main.cpp:1: /home/bmc/bmc/bmcweb/http/http_request.h:11:10: fatal error: boost/url/url_view.hpp: No such file or directory 11 | #include <boost/url/url_view.hpp> | ^~~~~~~~ compilation terminated. CMakeFiles/bmcweb.dir/build.make:82: recipe for target 'CMakeFiles/bmcweb.dir/src/webserver_main.cpp.o' failed make[2]: [CMakeFiles/bmcweb.dir/src/webserver_main.cpp.o] Error 1 CMakeFiles/Makefile2:125: recipe for target 'CMakeFiles/bmcweb.dir/all' failed make[1]: [CMakeFiles/bmcweb.dir/all] Error 2 Makefile:160: recipe for target 'all' failed make: *** [all] Error 2

Could you please tell me, whether anything missing in this part?

Jayashree-D commented 4 years ago

I resolved the error and copied the generated bmcweb to /tmp/ in the target. Then executed the redfish command for BIOS image upgrade and the internal error is shown.

Journalctl logs after BIOS image upgrade.

root@tiogapass:/tmp/images# journalctl | grep image Jan 05 18:01:28 tiogapass bmcweb[9985]: (1970-01-05 18:01:28) [DEBUG "update_service.hpp":676] Writing file to /tmp/images/7578ab0f-254d-42d9-aeb7-f60c513a5129 Jan 05 18:01:38 tiogapass bmcweb[9985]: (1970-01-05 18:01:38) [ERROR "update_service.hpp":289] FW image may has already been uploaded to server

Jayashree-D commented 4 years ago

Could you please tell me, whether I am missing anything or any changes should be done in this part. Thanks

Jayashree-D commented 3 years ago

Please kindly provide some suggestions on BIOS upgrade. Thanks

edtanous commented 3 years ago

I believe on master we have a more specific error message for this behavior, that eludes to a duplicated resource. If this is still an issue, please reopen.