Sockets using Mender State scripts

Hello,

I want to connect to sockets from Mender state scripts. I am using ZeroMQ for that right now. Basically, A socket will be waiting to be connected in raspberry pi and state script will need to connect to that socket and send message to the very socket when executed in ArtifactInstall_Enter state.

The update fails when I do so. Is there anything I need to do to bind to the socket? And, where do the state scripts reside in my raspberry pi device after an update ?

Thanks in advance.

That should work. :slight_smile:

the log file shows that ‘zmq : no module found’.

And, when I try the same script in my system, it works on python3 my_script.py but not on python my_script.py.

What could be the problem ?

You probably only have the python2 version of zmq installed and not the python3 version.