# Mender deployment error Expected \\"upgrade\_available\\" flag to be true but it was false

**URL:** <https://hub.mender.io/t/mender-deployment-error-expected-upgrade-available-flag-to-be-true-but-it-was-false/2763>\
**Category:** General Discussions\
**Tags:** x86\
**Created:** [November 2, 2020, 12:27pm UTC](https://hub.mender.io/t/mender-deployment-error-expected-upgrade-available-flag-to-be-true-but-it-was-false/2763 "2020-11-02T12:27:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rohita83](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/rohita83/32/436_2.png) [@Rohita83](https://hub.mender.io/u/Rohita83)\
**Post date:** [November 2, 2020, 12:27pm UTC](https://hub.mender.io/t/mender-deployment-error-expected-upgrade-available-flag-to-be-true-but-it-was-false/2763/1 "2020-11-02T12:27:54Z")

</div>

Hi,

I am using mender server version 2.1.0.  
when I do deployment, its get successful.I can see my device gets booted with new version. Mender server also shows updated version for my device. But it shows deployment status as “Failure”.

@mirzak  
@drewmoseley any idea what will be the issue here?

Deployment logs:

{“level”:“info”,“message”:“Running Mender client version: b6dfc02”,“timestamp”:“2020-11-02T04:15:16-05:00”}  
{“level”:“info”,“message”:“State transition: update-fetch [Download\_Enter] -\u003e update-store [Download\_Enter]”,“timestamp”:“2020-11-02T04:15:17-05:00”}  
{“level”:“info”,“message”:“No public key was provided for authenticating the artifact”,“timestamp”:“2020-11-02T04:15:17-05:00”}  
{“level”:“info”,“message”:“Opening device “/dev/sda2” for writing”,“timestamp”:“2020-11-02T04:15:17-05:00”}  
{“level”:“info”,“message”:“Native sector size of block device /dev/sda2 is 512 bytes. Mender will write in chunks of 1048576 bytes”,“timestamp”:“2020-11-02T04:15:17-05:00”}  
{“level”:“info”,“message”:“All bytes were successfully written to the new partition”,“timestamp”:“2020-11-02T04:59:31-05:00”}  
{“level”:“info”,“message”:“The optimized block-device writer wrote a total of 27868 frames, where 18480 frames did need to be rewritten (i.e., skipped)”,“timestamp”:“2020-11-02T04:59:31-05:00”}  
{“level”:“info”,“message”:“Wrote 29220802560/29220802560 bytes to the inactive partition”,“timestamp”:“2020-11-02T04:59:32-05:00”}  
{“level”:“info”,“message”:“State transition: update-store [Download\_Enter] -\u003e update-after-store [Download\_Leave]”,“timestamp”:“2020-11-02T04:59:33-05:00”}  
{“level”:“info”,“message”:“State transition: update-after-store [Download\_Leave] -\u003e update-install [ArtifactInstall]”,“timestamp”:“2020-11-02T04:59:33-05:00”}  
{“level”:“info”,“message”:“Enabling partition with new image installed to be a boot candidate: 2”,“timestamp”:“2020-11-02T04:59:33-05:00”}  
{“level”:“info”,“message”:“Probing the Bootloader environment for which separator to use”,“timestamp”:“2020-11-02T04:59:33-05:00”}  
{“level”:“info”,“message”:"Writing map[mender\_uboot\_separator:1] to the U-Boot environment, using separator: ",“timestamp”:“2020-11-02T04:59:33-05:00”}  
{“level”:“info”,“message”:"Writing map[mender\_uboot\_separator:] to the U-Boot environment, using separator: ",“timestamp”:“2020-11-02T04:59:33-05:00”}  
{“level”:“info”,“message”:"Writing map[upgrade\_available:1 bootcount:0 mender\_boot\_part:2 mender\_boot\_part\_hex:2] to the U-Boot environment, using separator: ",“timestamp”:“2020-11-02T04:59:33-05:00”}  
{“level”:“info”,“message”:“State transition: update-install [ArtifactInstall] -\u003e reboot [ArtifactReboot\_Enter]”,“timestamp”:“2020-11-02T04:59:33-05:00”}  
{“level”:“info”,“message”:“Rebooting device(s)”,“timestamp”:“2020-11-02T04:59:33-05:00”}  
{“level”:“info”,“message”:“Mender rebooting from active partition: /dev/sda3”,“timestamp”:“2020-11-02T04:59:33-05:00”}  
{“level”:“error”,“message”:“Error rebooting device: signal: terminated”,“timestamp”:“2020-11-02T04:59:33-05:00”}  
{“level”:“info”,“message”:“Shutting down.”,“timestamp”:“2020-11-02T04:59:33-05:00”}  
{“level”:“info”,“message”:“Running Mender client version: 251fa42”,“timestamp”:“2020-11-02T05:00:32-05:00”}  
{“level”:“info”,“message”:“State transition: init [none] -\u003e after-reboot [ArtifactReboot\_Leave]”,“timestamp”:“2020-11-02T05:00:32-05:00”}  
{“level”:“info”,“message”:“State transition: after-reboot [ArtifactReboot\_Leave] -\u003e after-reboot [ArtifactReboot\_Leave]”,“timestamp”:“2020-11-02T05:00:32-05:00”}  
{“level”:“info”,“message”:“State transition: after-reboot [ArtifactReboot\_Leave] -\u003e update-commit [ArtifactCommit\_Enter]”,“timestamp”:“2020-11-02T05:00:32-05:00”}  
{“level”:“error”,“message”:“transient error: update commit failed: Reboot to the new update failed. Expected “upgrade\_available” flag to be true but it was false. Either the switch to the new partition was unsuccessful, or the bootloader rolled back”,“timestamp”:“2020-11-02T05:00:33-05:00”}  
{“level”:“info”,“message”:“State transition: update-commit [ArtifactCommit\_Enter] -\u003e rollback [ArtifactRollback]”,“timestamp”:“2020-11-02T05:00:33-05:00”}  
{“level”:“info”,“message”:“Performing rollback”,“timestamp”:“2020-11-02T05:00:33-05:00”}  
{“level”:“info”,“message”:“No update available, so no rollback needed.”,“timestamp”:“2020-11-02T05:00:33-05:00”}  
{“level”:“info”,“message”:“State transition: rollback [ArtifactRollback] -\u003e rollback-reboot [ArtifactRollbackReboot\_Enter]”,“timestamp”:“2020-11-02T05:00:33-05:00”}  
{“level”:“info”,“message”:“Rebooting device(s) after rollback”,“timestamp”:“2020-11-02T05:00:33-05:00”}  
{“level”:“info”,“message”:“Mender rebooting from inactive partition: /dev/sda2”,“timestamp”:“2020-11-02T05:00:33-05:00”}  
{“level”:“error”,“message”:“Error rebooting device: signal: terminated”,“timestamp”:“2020-11-02T05:00:33-05:00”}  
{“level”:“info”,“message”:“Shutting down.”,“timestamp”:“2020-11-02T05:00:33-05:00”}  
{“level”:“info”,“message”:“Running Mender client version: 251fa42”,“timestamp”:“2020-11-02T05:01:29-05:00”}  
{“level”:“info”,“message”:“Mender shut down in state: rollback-reboot”,“timestamp”:“2020-11-02T05:01:29-05:00”}  
{“level”:“info”,“message”:“State transition: init [none] -\u003e verify-rollback-reboot [ArtifactRollbackReboot\_Leave]”,“timestamp”:“2020-11-02T05:01:29-05:00”}  
{“level”:“info”,“message”:“State transition: verify-rollback-reboot [ArtifactRollbackReboot\_Leave] -\u003e after-rollback-reboot [ArtifactRollbackReboot\_Leave]”,“timestamp”:“2020-11-02T05:01:29-05:00”}  
{“level”:“info”,“message”:“State transition: after-rollback-reboot [ArtifactRollbackReboot\_Leave] -\u003e update-error [ArtifactFailure]”,“timestamp”:“2020-11-02T05:01:29-05:00”}  
{“level”:“info”,“message”:“State transition: update-error [ArtifactFailure] -\u003e cleanup [Error]”,“timestamp”:“2020-11-02T05:01:29-05:00”}  
{“level”:“info”,“message”:“State transition: cleanup [Error] -\u003e update-status-report [none]”,“timestamp”:“2020-11-02T05:01:29-05:00”}

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [November 2, 2020, 3:32pm UTC](https://hub.mender.io/t/mender-deployment-error-expected-upgrade-available-flag-to-be-true-but-it-was-false/2763/2 "2020-11-02T15:32:48Z")

</div>

Hi @Rohita83 it seems that something is causing an extra reboot on the client. This part of the log seems to indicate this:

```
{“level”:“info”,“message”:“Rebooting device(s)”,“timestamp”:“2020-11-02T04:59:33-05:00”}
{“level”:“info”,“message”:“Mender rebooting from active partition: /dev/sda3”,“timestamp”:“2020-11-02T04:59:33-05:00”}
{“level”:“error”,“message”:“Error rebooting device: signal: terminated”,“timestamp”:“2020-11-02T04:59:33-05:00”}

```

We would need logging from the client to be able to understand why this happened. Can you provide full console logs as well as the output from “journalctl -u mender-client”?

Drew

---

<div class="post-metadata">

**Author:** ![freddy47](https://avatars.discourse-cdn.com/v4/letter/f/57b2e6/32.png) [@freddy47](https://hub.mender.io/u/freddy47)\
**Post date:** [January 31, 2022, 9:09am UTC](https://hub.mender.io/t/mender-deployment-error-expected-upgrade-available-flag-to-be-true-but-it-was-false/2763/3 "2022-01-31T09:09:39Z")

</div>

I have the same problem.  
I believe the problem is because Mender is configured to use ttyS0, and som other tty connections. What these are used for, I haven’t been able to find out, but in my case after I removed ttyS0 from:  
`MENDER_GRUB_KERNEL_BOOT_ARGS="console=tty0,115200n8 console=ttyO0,115200n8 console=ttyAMA0,115200n8"`  
Then the update fails with the responds  
`2021-07-28 04:10:46 +0000 UTC error: transient error: Reboot to the new update failed. Expected “upgrade_available” flag to be true but it was false. Either the switch to the new partition was unsuccessful, or the bootloader rolled back`

Any knowlagde to why mender-client needs ttyS0? @mirzak  
@drewmoseley

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [January 31, 2022, 2:43pm UTC](https://hub.mender.io/t/mender-deployment-error-expected-upgrade-available-flag-to-be-true-but-it-was-false/2763/4 "2022-01-31T14:43:10Z")

</div>

No clue. Perhaps @lramirez can help here.

Drew

---

<div class="post-metadata">

**Author:** ![freddy47](https://avatars.discourse-cdn.com/v4/letter/f/57b2e6/32.png) [@freddy47](https://hub.mender.io/u/freddy47)\
**Post date:** [February 7, 2022, 8:57am UTC](https://hub.mender.io/t/mender-deployment-error-expected-upgrade-available-flag-to-be-true-but-it-was-false/2763/5 "2022-02-07T08:57:17Z")

</div>

Got it to work.

Seems to be an problem with creating artifacts using the snapshot method, since creating artifacts over ssh works fine.

---

<div class="post-metadata">

**Author:** ![daniel1](https://avatars.discourse-cdn.com/v4/letter/d/b19c9b/32.png) [@daniel1](https://hub.mender.io/u/daniel1)\
**Post date:** [January 13, 2023, 4:19pm UTC](https://hub.mender.io/t/mender-deployment-error-expected-upgrade-available-flag-to-be-true-but-it-was-false/2763/6 "2023-01-13T16:19:18Z")

</div>

Hi. I have the same problem. Can you give me some more details?  
Thank you
