Hilscher Community Forum
[SOLVED] nodered : flows_localhost deleted after creating an image from container - Printable Version

+- Hilscher Community Forum (https://forum.hilscher.com)
+-- Forum: netPI 3 - Docker featuring Industrial Raspberry Pi 3 platform (https://forum.hilscher.com/forum-1.html)
+--- Forum: Software (https://forum.hilscher.com/forum-5.html)
+--- Thread: [SOLVED] nodered : flows_localhost deleted after creating an image from container (/thread-322.html)



[SOLVED] nodered : flows_localhost deleted after creating an image from container - paubau - September-20th-2018

hello,

i recently get an issue after creating a safe image from my nodered container.
First, when creating the image, an error appears but later the image was created as expected.
Then, when i want to deploy something in nodered, another error pop up, saying a file is missing..
I looked into the folder and cant even create a new file from the backup file.

I dont know when this started, but at the beginning everything worked good..
Thats not a really big problem because i safed the flows to clipboard, but i wonder if somebody can tell me the reason.

Best regards,

Paul


RE: nodered : flows_localhost deleted after creating an image from container - Armin@netPI - September-20th-2018

Dear Paul,

have you maybe disconnected netPI from power unintended or have you had a power outage or power loss without shutting down netPI via the Web GUI?

What I can definitively say is that Linux caches write accesses to the file system. Imagine you were updating Node-RED by deploying a new flow. This file is definitively cashed ... for some seconds. If then you have a power drop this file could get lost.

Whenever netPI's Linux starts is checks the file system. Broken files will be copied into an internal "lost + found" folder (you can't access to this folder), but they are no more at their original place. This could be a reason why there is no file any more.

Right now I have no explanation why you can't create a file in the container any more.

But how do you get this things working again now? Repowering netPI? Loading the container again?

Thx
Armin


RE: nodered : flows_localhost deleted after creating an image from container - paubau - September-21st-2018

No there was no power drop as far as i can tell.
It doesnt happened the first time, i think i can reproduce the problem by creating again a new image from my container.

The flow file is lost then but after restarting netPI, i can import my safed data and everything works fine again..

Thanks for reply,

Paul


RE: nodered : flows_localhost deleted after creating an image from container - Armin@netPI - September-21st-2018

Thank you Paul.

I am glad to hear that you can recover your system.

But still I am very curious guy and I want to understand the root cause of the problem and maybe I can get your problem reconstructed.

So basically when you clone a running container, by tagging it, my expectation is that Docker Deamon makes a 1:1 copy. And afterwards when you start your copy everything should work as before.

But let me ask you this: have you stopped the Node-RED container before cloning it? Maybe that is the problem. A container you make a copy from should never run, cause there are threads running that maybe use cached data in RAM. So in this case a flow file could easily not being placed on the SD card (deleting the file first was executed, but not writing) and then a copy of course will also not include this file.

Thx
Armin


RE: nodered : flows_localhost deleted after creating an image from container - paubau - September-21st-2018

So there we got the problem  Rolleyes   i dont think that i stopped the container before creating the image.
Next time i'll do it the right way.     

thanks!

**another thing, i have problems with mapping an usb device to my container..
plugged in the usb stick, restarted netPI and then tried to add the device via /dev/ttyUSB0 , /dev/ttyUSB1 , /dev/USB2
but nothing worked.. any hints?
i read the other thread, installed the firmware 1.1.3.0.RC3 but error "no such file or directory" appears.


RE: nodered : flows_localhost deleted after creating an image from container - Armin@netPI - September-21st-2018

Yes sure I have.

Read this topic here https://forum.hilscher.com/Thread-SOLVED-USB-Serial-device-mapping-into-Container

Not every USB device maps to /dev/ttyUSBx automatically. Linux divides them into different classes and then maps those to different /devs. You need to know indeed which one to map it right.

Armin


RE: nodered : flows_localhost deleted after creating an image from container - paubau - September-21st-2018

Yes, i read this thread before but it didnt helped..
In my case (SanDisk16gb) i found out that i have to use /dev/sda1 :-)
have a nice day

Paul