Msg.payload: string - multiple outputs?

The attached screenshot is intended to show the output of a node [bigssh node], where I'm able to ssh to an linux machine and issues OpenStack CLI commands which returns a response in json format; however, at a certain point, the output of the node is split across multiple msg.payload: string messages.

Screenshot 2021-05-06 150805

After searching and searching, I cannot seem to identify if there is a size limitation to the msg.payload to where it breaks up large messages into multiple messages.

I've have been able to work around the issue with a join node which combines the output of msg.payload and simply waits 1 second after receiving the first message before sending along, which is plenty of time, just does not seem like a best practice. Curious if someone can help me to identify the root cause of the multiple messages.

I've witnesses this on both the bigssh and ssh-client-v2 nodes.

Welcome to the forum @rogg

I imagine this is caused by buffering in the ssh call leading to the result being split across multiple buffers. If I were trying to do this I would use an Exec node and put the ssh command in the exec node. Why use a contrib node when a core node will do it for you? Then you can set the exec node to only output when the process is complete and hopefully it will all appear in one go. To use ssh in an exec node you will have had to setup key authentication so you don't need to use a password, but probably you have done that already.


Thank you, I did exactly as you directed and that resolved the issue and it's simpler!

Thanks agin,

  • Rick

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.