Community discussions

MikroTik App
 
peich1
just joined
Topic Author
Posts: 14
Joined: Mon Dec 11, 2017 9:43 am

executing script from winbox failed, please check it manually

Thu Aug 08, 2024 1:36 pm

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?
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12661
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: executing script from winbox failed, please check it manually

Thu Aug 08, 2024 5:15 pm

dhcp server script? dhcp client script? ppp profile script?
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12661
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: executing script from winbox failed, please check it manually

Thu Aug 08, 2024 5:24 pm

maybe if you do an export and check piece by piece....
 
peich1
just joined
Topic Author
Posts: 14
Joined: Mon Dec 11, 2017 9:43 am

Re: executing script from winbox failed, please check it manually

Sat Aug 24, 2024 12:28 am

dhcp server script? dhcp client script? ppp profile script?
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.
 
peich1
just joined
Topic Author
Posts: 14
Joined: Mon Dec 11, 2017 9:43 am

Re: executing script from winbox failed, please check it manually

Tue Aug 27, 2024 7:30 pm

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.
 
User avatar
sindy
Forum Guru
Forum Guru
Posts: 11344
Joined: Mon Dec 04, 2017 9:19 pm

Re: executing script from winbox failed, please check it manually

Tue Aug 27, 2024 8:15 pm

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
 
optio
Forum Veteran
Forum Veteran
Posts: 990
Joined: Mon Dec 26, 2022 2:57 pm

Re: executing script from winbox failed, please check it manually

Tue Aug 27, 2024 8:50 pm

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.
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).
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12661
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: executing script from winbox failed, please check it manually

Wed Aug 28, 2024 11:44 am

I would recommend netinstall and configure device from scratch or export (not backup).
+1
 
peich1
just joined
Topic Author
Posts: 14
Joined: Mon Dec 11, 2017 9:43 am

Re: executing script from winbox failed, please check it manually

Sat Aug 31, 2024 6:54 pm

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).
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 :)

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

Btw, netinstall and configuring again would have been of no use here. In fact, it never has been of any help for me...
 
kleshki
Member Candidate
Member Candidate
Posts: 285
Joined: Tue Mar 10, 2020 6:37 am

Re: executing script from winbox failed, please check it manually

Sat Aug 31, 2024 7:41 pm

I think Mikrotik should implement a more verbose error info, since finding these errors is very time-consuming.
Or it's up to you to well-document things you do in your network, to decrease diagnostics time
 
jaclaz
Forum Guru
Forum Guru
Posts: 2260
Joined: Tue Oct 03, 2023 4:21 pm

Re: executing script from winbox failed, please check it manually

Sat Aug 31, 2024 8:48 pm

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.
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 13266
Joined: Thu Mar 03, 2016 10:23 pm

Re: executing script from winbox failed, please check it manually

Sat Aug 31, 2024 9:09 pm

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.
 
peich1
just joined
Topic Author
Posts: 14
Joined: Mon Dec 11, 2017 9:43 am

Re: executing script from winbox failed, please check it manually

Mon Sep 02, 2024 2:22 am

Or it's up to you to well-document things you do in your network, to decrease diagnostics time
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.

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.
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.
 
DimOriN
just joined
Posts: 1
Joined: Thu Sep 12, 2024 6:05 am

Re: executing script from winbox failed, please check it manually

Thu Sep 12, 2024 6:12 am

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.
Last edited by DimOriN on Thu Sep 12, 2024 6:18 am, edited 2 times in total.