# Restart device and update existing python file in RPi

**URL:** <https://hub.mender.io/t/restart-device-and-update-existing-python-file-in-rpi/1998>\
**Category:** General Discussions\
**Created:** [June 3, 2020, 7:31am UTC](https://hub.mender.io/t/restart-device-and-update-existing-python-file-in-rpi/1998 "2020-06-03T07:31:25Z")\
**Posts on this page:** 17\
**Page:** 2

<div class="post-metadata">

**Author:** ![nishad1092](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@nishad1092](https://hub.mender.io/u/nishad1092)\
**Post date:** [June 17, 2020, 11:58am UTC](https://hub.mender.io/t/restart-device-and-update-existing-python-file-in-rpi/1998/21 "2020-06-17T11:58:46Z")

</div>

Hi @oleorhagen,

Im facing this lke I mentioned 2 days back, One of my deployment is failed and current software I can see “Inconsistent”, after this Mender deployment isnt happening, deploy is stuck in ‘pending. Why all this happening, device type and every detail is fine.

---

<div class="post-metadata">

**Author:** ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)\
**Post date:** [June 17, 2020, 1:08pm UTC](https://hub.mender.io/t/restart-device-and-update-existing-python-file-in-rpi/1998/22 "2020-06-17T13:08:46Z")

</div>

I think [this](https://tracker.mender.io/browse/MEN-2230) might be helpful 🙂

---

<div class="post-metadata">

**Author:** ![nishad1092](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@nishad1092](https://hub.mender.io/u/nishad1092)\
**Post date:** [June 17, 2020, 3:38pm UTC](https://hub.mender.io/t/restart-device-and-update-existing-python-file-in-rpi/1998/23 "2020-06-17T15:38:55Z")

</div>

@oleorhagen So this is a bug which has not been resolved?

---

<div class="post-metadata">

**Author:** ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)\
**Post date:** [June 18, 2020, 6:30am UTC](https://hub.mender.io/t/restart-device-and-update-existing-python-file-in-rpi/1998/24 "2020-06-18T06:30:18Z")

</div>

No, this is a feature ticket.

---

<div class="post-metadata">

**Author:** ![nishad1092](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@nishad1092](https://hub.mender.io/u/nishad1092)\
**Post date:** [June 18, 2020, 6:59pm UTC](https://hub.mender.io/t/restart-device-and-update-existing-python-file-in-rpi/1998/25 "2020-06-18T18:59:57Z")

</div>

Im very sorry @oleorhagen, I couldtn reply u sooner. What is this ticket, I can see its open, and this is what Im looking for I guess, Still I couldnt resolve it, Im not able to deploy any further releases to the device because of a past failure deployment and causing it to be "Inconsistent " artifact. I think I’ll have only one option to decommision, But even after decommission, no change. ☹

---

<div class="post-metadata">

**Author:** ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)\
**Post date:** [June 19, 2020, 7:04am UTC](https://hub.mender.io/t/restart-device-and-update-existing-python-file-in-rpi/1998/26 "2020-06-19T07:04:15Z")

</div>

Hi @nishad1092.

From what I understand the device should still be able to take a new update.

What exactly is the script doing? Is trying to reboot?

---

<div class="post-metadata">

**Author:** ![nishad1092](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@nishad1092](https://hub.mender.io/u/nishad1092)\
**Post date:** [June 19, 2020, 7:21am UTC](https://hub.mender.io/t/restart-device-and-update-existing-python-file-in-rpi/1998/27 "2020-06-19T07:21:00Z")

</div>

Hi @oleorhagen, Im using dir module to deploy a directory of two python files, and its done, and further execute the python file using .sh script module. And it fails for some reason, Even if it fails , it shouldnt cause these many issues right, The Entire mender is slow, and freezy, and now can’t deploy update to taht device also.

---

<div class="post-metadata">

**Author:** ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)\
**Post date:** [June 19, 2020, 7:32am UTC](https://hub.mender.io/t/restart-device-and-update-existing-python-file-in-rpi/1998/28 "2020-06-19T07:32:18Z")

</div>

Could you post a deployment log here?

---

<div class="post-metadata">

**Author:** ![nishad1092](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@nishad1092](https://hub.mender.io/u/nishad1092)\
**Post date:** [June 19, 2020, 12:26pm UTC](https://hub.mender.io/t/restart-device-and-update-existing-python-file-in-rpi/1998/29 "2020-06-19T12:26:49Z")

</div>

all the logs are gone when I decommisioned it. Well, let me try to get it and Ill share it here sooner.

---

<div class="post-metadata">

**Author:** ![nishad1092](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@nishad1092](https://hub.mender.io/u/nishad1092)\
**Post date:** [June 19, 2020, 12:33pm UTC](https://hub.mender.io/t/restart-device-and-update-existing-python-file-in-rpi/1998/30 "2020-06-19T12:33:53Z")

</div>

@oleorhagen,

Hi, Could you genuinely tell me, If I power up a production server, will it be smoother than the Demo server I have now?  
Tell me please, So I can confidently say No to Demo server, Because Im trying to evaluating this platform. Have u faced these issues in Demo server. Even the server GUI is freezy and stuck mate.

---

<div class="post-metadata">

**Author:** ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)\
**Post date:** [June 19, 2020, 1:08pm UTC](https://hub.mender.io/t/restart-device-and-update-existing-python-file-in-rpi/1998/31 "2020-06-19T13:08:30Z")

</div>

No.

Honestly, I have never encountered any of these issues. Or heard about a single person having this many issues.

Obviously, I cannot make any guarantees as to the quality of the production setup for you, since you been having a lot of issues with the setup that is unfamiliar to me. Especially the GUI freeze.

I even gave the demo a try locally just now, and it works just fine for me. Both locally on my desktop, and on a lower-powered setup I have at home.

We have even done scale-testing of this previously, with tens of thousands of devices, and still no GUI freeze.

If you are to receive any fruitful feedback from us on these issues you are having you need to provide the information that is needed in order for us to reproduce this, otherwise there is no way we can help you with this.

That is information on machine, OS, commands you’ve run. Logs, statistics and observations, etc.

---

<div class="post-metadata">

**Author:** ![nishad1092](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@nishad1092](https://hub.mender.io/u/nishad1092)\
**Post date:** [June 19, 2020, 5:00pm UTC](https://hub.mender.io/t/restart-device-and-update-existing-python-file-in-rpi/1998/32 "2020-06-19T17:00:51Z")

</div>

Sure @oleorhagen Ill be happy to provide you with any logs or info.

Okay, since you have clarified on my issues are very unfamiliar, I will setup the demo server once again in a new server with sufficient requirements, and if it again occurs then we can take it further with “why” and "how to resolve it " rgt?

Let me setup a new server of Demo version. I hope all these issues wont occur again. Wow, You just mentioned thousand of devices in a demo server? but they have mentioned only 500, How to get few more ?

I would really like to thank you for all these responses, I’m really looking into Mender, I want this to work, Mender looks very interesting !!

---

<div class="post-metadata">

**Author:** ![nishad1092](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@nishad1092](https://hub.mender.io/u/nishad1092)\
**Post date:** [June 28, 2020, 5:30am UTC](https://hub.mender.io/t/restart-device-and-update-existing-python-file-in-rpi/1998/35 "2020-06-28T05:30:58Z")

</div>

Hi @oleorhagen,  
I have setup the production server. It looks good, Our past communication has helped me alot to reach here.

Now, I’m trying to figure out how to get Mender devices to connect to server.  
For demo server, it was extremly easy to configure Mender client to server communication, but for production, I’m not able to start where in the documentation.

1. Should I built new with Yocto or
2. Is it possible to configure mender client in my existing OS.  
I have a RPi zero w and a Jetson Xavier (Debian) which I need to connect to Mender server. Where to start\ How to configure ?

Because from what I read, it has lots of configuration needed, therefore Im worried how will i manage it for 100’s or 1000’s devices for production while manufacturing it, I need mender clients during the manufacturing time (or Is it possible to automate the config) . When it comes to demo server the config was just so easy, just run the shell commends:  
DEVICE\_TYPE=“jetsonnano”  
SERVER\_IP\_ADDR=“4…/.xx.xxx.xxx”  
sudo DEBIAN\_FRONTEND=noninteractive dpkg -i mender-client\_2.2.0-1\_arm64.deb  
sudo mender setup   
–device-type $DEVICE\_TYPE   
–demo   
–server-ip $SERVER\_IP\_ADDR  
sudo systemctl restart mender-client

---

<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:** [June 29, 2020, 4:08pm UTC](https://hub.mender.io/t/restart-device-and-update-existing-python-file-in-rpi/1998/36 "2020-06-29T16:08:22Z")

</div>

mender setup --help will show the options available. You can remove the “–demo” parameter and add the “–server-url” parameter.

---

<div class="post-metadata">

**Author:** ![nishad1092](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@nishad1092](https://hub.mender.io/u/nishad1092)\
**Post date:** [June 29, 2020, 4:20pm UTC](https://hub.mender.io/t/restart-device-and-update-existing-python-file-in-rpi/1998/37 "2020-06-29T16:20:09Z")

</div>

Hi @drewmoseley,

That is very resourceful info. Can we also include server.crt and modify mender.conf as a parameter ?

---

<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:** [June 29, 2020, 5:00pm UTC](https://hub.mender.io/t/restart-device-and-update-existing-python-file-in-rpi/1998/38 "2020-06-29T17:00:03Z")

</div>

You can include the server.crt as a command line parameter. Most of the command line parameters end up modifying the mender.conf file but there may still be settings you want to tweak manually after you have generated the basic configuration.

---

<div class="post-metadata">

**Author:** ![nishad1092](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@nishad1092](https://hub.mender.io/u/nishad1092)\
**Post date:** [July 2, 2020, 4:30am UTC](https://hub.mender.io/t/restart-device-and-update-existing-python-file-in-rpi/1998/39 "2020-07-02T04:30:34Z")

</div>

Sure Drew, Ill give a try to configure server.crt and server URL through the command line parameter once and get back to you.

[Previous page](https://hub.mender.io/t/restart-device-and-update-existing-python-file-in-rpi/1998.md?page=1)
