SQL connection on Edge agent


Tried connecting to a MySQL data base on the same LAN the edge is on.
Set the SQL node on a timer, but the debug node gives me nothing.
What are my best methods for troubleshooting?


Hi Lars,

Can you provide some screenshots so I can look further into your problem?



Sure. Of just the SQL node config ?


Yes! That and your timer would be great, just to get a full picture.


Well, I have tried various config settings now without any debug message. Can I get to some logs on the edge? At this point I don’t know if it’s credentials, MySQL version or network issue.



Hi @Lars_Andersson

So, I can jump in here an help a bit. In the node settings, you can set where the response is added to the payload. Like so:

Do you see anything on your payload there?

Also, erros like wrong credentials will error out the entire workflow. So, you’d see that appear in the Debug panel. Because this is an edge device, you’ll have to select it in the Debug Panel as well.


I’m embarrassed to say I didn’t have the Debug node in my workflow…
At least I get a response error message now saying " select * from tablename - read ECONNRESET"


Just got some more info for you. I’ll be adding this to the docs soon.

But, in general all connection errors will error the workflow and query errors will end up on the payload.

Connection Error Example:

Query Error Example:


Yes, I found some query errors, so I made progress.
But after I deploy any updates it takes a long time before I see any debug messages even though the timer that executes the node runs every 10 sec


Found my second mistake. I was accidentally querying a table that had 70000 records in it.
It must not have liked that…
Picked another table with 1 record in it and it worked fine.


I’m back to testing this, and regardless if I use a timer to trigger a edge workflow or the virtual button, I get no debug data. But what’s weird is that my first today gave me data.
When clicking the Virtual button if gives me a red message saying “Edge device was not found”


Hi Lars!

The “edge device not found” error usually arises when the device selected in the Virtual Button is not an edge device, or if no device has been selected. The current edge workflow version must be deployed to the device in order for it to be selectable within the Virtual Button.

As for the debug, our documentation states that

Debug messages from an edge device are also batched and throttled - a batch of debug messages will be sent up to Losant no more than once per second, with no more than five debug messages. So if a workflow is running quite frequently on an edge device, you might not see all the debug messages in the debug log.

I will continue to look into debug logs in edge, but hopefully this helped!