executing script from winbox failed, please check it manually

I’m getting a “executing script from winbox failed, please check it manually” error in the logs since 7.15.

I’ve tried to delete every script I’ve found, netwatch, on-up down events, etc. to no avail.

Anyone has an idea where this “winbox” script comes from?

dhcp server script? dhcp client script? ppp profile script?

maybe if you do an export and check piece by piece…

Yes, everything is empty. I already did the export and check for every possible script.

The strange thing is that the configuration of all my routers is very similar and this only happens in one of them. And I don't understand what the "from winbox" refers to. It's really strange.

Since it looks like there’s no solution for this, anyone knows how to filter these errors in the log? Right now they are popping each 10 seconds, so they render my log files almost useless, it’s very difficult to look for information in them. And, of course, I don’t want to disable the “error” category.

What is the topics list for that log line?

19:13:29 fetch,info Download from api.telegram.org FINISHED
19:13:35 certificate,debug start CRL update
19:13:36 system,info,account user me logged in from 192.168.88.254 via ssh

When script has error and it wasn’t run from Terminal (or other CLI) it produces error log in format: “executing script [script_name] from <run_source> failed, please check it manually”
Where script_name is optional, it will be value of script name if script is run from saved script in /system/script and run_source can be one of values:

  • winbox - when script is manually run from Winbox


  • www - when script is manually run from Webfig (maybe also from REST API - didn’t test it)


  • scheduler - when script is run by scheduled event


  • netwatch - when script is run by netwatch event


  • dhcpclient - when script is run by DHCP Client event


  • […] - some other name of source, like events for OVPN, DHCP Server, etc. didn’t test error for all ROS events…

If you didn’t run script from Windox and you have log with its source could be that device is hacked, examine if you have some job running in /system/script/job, it should be empty if there is no active CLI sessions and no running scripts/events.
I would recommend netinstall and configure device from scratch or export (not backup).

+1

I checked all that and there was no job running nor any active CLI sessions/running scripts.

BUT

It gave me the idea about checking if a external “source” is causing the problem. So I checked my Dude setup and, after a lot of testing, I found that I had a function for checking the number of capsman clients that was using a call for the previous version of capsman. I adapted it for the new version, and there is no error anymore :slight_smile:

I think Mikrotik should implement a more verbose error info, since finding these errors is very time-consuming.
Thanks for your help :smiley:

Btw, netinstall and configuring again would have been of no use here. In fact, it never has been of any help for me…

Or it’s up to you to well-document things you do in your network, to decrease diagnostics time

Well, there is some difference between:

An error has occurred

and something like:

script “mynicescript” running on device with MAC 00:ww:xx:yy:zz caused a “device not responding” error on line 42

These pieces of info:

  1. name of the script
  2. on which device it is running
  3. the exact kind of error
  4. the exact place in the script that causes the error
    should all be known by the ROS, and would greatly help in troubleshooting a problem.

The:

“executing script from winbox failed, please check it manually”

is actually worse than the first, as it apparently points in the wrong direction.

I can’t be certain, but you wrote:

So I checked my Dude setup and, after a lot of testing, I found that I had a function for checking the number of capsman clients that was using a call for the previous version of capsman.

If I understand this correctly, then it’s not a script, configured in ROS device (with name, etc.), but rather an in-line code being executed … much like a command executed in CLI (so the wording “script from winbox” is a bit misleading, it comes to understanding the word “script” and my first thought is not this either).
Never the less, script execition could point at offending part if/when it dails.

I don’t agree at all. This error was related to an in-line code inside a function, do you think it’s feasible to document every inline code? It doesn’t make any sense. Using such generic error logs is absurd.


Exactly, it’s that. And it’s completely misleading, even if a function is a “kind of” script, or if it’s executed via a winbox connection. I found the error after a lot of trial and error, there’s no way I’d had thought the error was related to the Dude server. Just by naming part of the offending code in the log line, this would have been way way easier to diagnose.

ROS 7.15.3
Simple script:

:global pingResult -1
{
    :local jobID [:execute ":set pingResult [:ping count=3 8.8.8.8]"]
    :while ([:len [/system script job find where .id=$jobID]] > 0) do={
        :delay 1s
    }
}
:put $pingResult

Executing from console:

[r***d@rtr-hq-1] > /system script run ping-check               
3

Returns “3” - good (0 to 3 is good returns)

When try to execute via SNMP (for zabbix monitoring)i have log error message:

executing script from console failed, please check it manually

SNMPGET/SNMPWALK:

[root@xxx~]# snmpget -v2c -c xxx rtr-hq-1 1.3.6.1.4.1.14988.1.1.18.1.1.2.2
SNMPv2-SMI::enterprises.14988.1.1.18.1.1.2.2 = STRING: "-1"

Returns “-1”.

ROS v6 all working fine.