# Deployment fails with "Got unexpected HTTP status when uploading log: 400"

**URL:** <https://hub.mender.io/t/deployment-fails-with-got-unexpected-http-status-when-uploading-log-400/5252>\
**Category:** General Discussions\
**Created:** [September 14, 2022, 12:47pm UTC](https://hub.mender.io/t/deployment-fails-with-got-unexpected-http-status-when-uploading-log-400/5252 "2022-09-14T12:47:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![doudou](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/doudou/32/497_2.png) [@doudou](https://hub.mender.io/u/doudou)\
**Post date:** [September 14, 2022, 12:47pm UTC](https://hub.mender.io/t/deployment-fails-with-got-unexpected-http-status-when-uploading-log-400/5252/1 "2022-09-14T12:47:29Z")

</div>

I’m trying to deploy a release, but I’m getting an immediate failure just after the `update-fetch [Download_Enter] -> update-status-report [none]` transition. The error reported is 400 `error uploading logs: (request_id: ): uploading logs failed, bad status 400 server error message: no messages: invalid deployment log"`

The same deployment also gets installed on other machine types, and these are fine.

Any clue on how I could workaround that problem ?

---

<div class="post-metadata">

**Author:** ![emoriones](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/emoriones/32/1744_2.png) [@emoriones](https://hub.mender.io/u/emoriones)\
**Post date:** [October 3, 2022, 6:41am UTC](https://hub.mender.io/t/deployment-fails-with-got-unexpected-http-status-when-uploading-log-400/5252/2 "2022-10-03T06:41:16Z")

</div>

We have the same problem. Did you find a solution?

---

<div class="post-metadata">

**Author:** ![mohakbhalla7](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mohakbhalla7/32/2050_2.png) [@mohakbhalla7](https://hub.mender.io/u/mohakbhalla7)\
**Post date:** [March 18, 2024, 11:04am UTC](https://hub.mender.io/t/deployment-fails-with-got-unexpected-http-status-when-uploading-log-400/5252/3 "2024-03-18T11:04:55Z")

</div>

I’m facing this problem too.  
Any insights you have about the issue would be helpful.Thanks!

---

<div class="post-metadata">

**Author:** ![aschraegle](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/aschraegle/32/2395_2.png) [@aschraegle](https://hub.mender.io/u/aschraegle)\
**Post date:** [January 21, 2025, 1:48pm UTC](https://hub.mender.io/t/deployment-fails-with-got-unexpected-http-status-when-uploading-log-400/5252/4 "2025-01-21T13:48:07Z")

</div>

I’ve observed a similar/the same issue:

```auto
record_id=20 severity=info time="2025-Jan-21 13:43:02.475787" name="Global" msg="Sending status update to server"
record_id=21 severity=error time="2025-Jan-21 13:43:02.772277" name="Global" msg="Could not send deployment status: Bad response error: Got unexpected response 400 from logs API: invalid character '\x00' looking for beginning of value"
record_id=22 severity=info time="2025-Jan-21 13:43:02.772653" name="Global" msg="Retrying status update after 120 seconds"

```

---

<div class="post-metadata">

**Author:** ![pkgl](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/pkgl/32/2368_2.png) [@pkgl](https://hub.mender.io/u/pkgl)\
**Post date:** [March 5, 2025, 1:20pm UTC](https://hub.mender.io/t/deployment-fails-with-got-unexpected-http-status-when-uploading-log-400/5252/5 "2025-03-05T13:20:02Z")

</div>

I just ran into the same problem. This error appeared for me after testing a restrictive firewall rule, which prevented the device from connecting to the internet after an OTA update. I assume that, as a result, Mender was unable to record the update process as either successful or failed. I then powered off the device and booted it normally from the old boot slot. When I attempted to trigger another update, this error occurred.
