Solving Fetch Tool Error 418

If you've encountered a series of Error 418 messages in your MikroTik routers' logs after updating to RouterOS 7.13 or later, you're not alone. While initially indicative of a problem, these errors are actually benign and can be fixed with a simple configuration change.

MikroTik RouterOS Fetch Tool Error 418

What Does This Error Mean?

This error originates from a change introduced by MikroTik in RouterOS 7.13. Routers are set to "check-in" with the MikroCloud API every 30 seconds. If there's a task pending for the router, our API responds with a RouterOS command script for the router to execute. However, if no task is pending, the API sends back an HTTP 418 status code. Since RouterOS 7.13, this response is now logged.

Why 418 and Not 204?

The choice of a 418 HTTP status code, humorously known as "I'm a teapot," is deliberate. Although responding with a 204 No Content status might seem more appropriate, it leads the router to download an empty file. This is because the MikroTik router interprets any 2xx status code as a successful response that necessitates a download.

Frequent downloads of even empty files can negatively impact the lifespan of the router's NAND memory. To circumvent this, Mikrocloud uses the 418 status code, which stops the execution and does not write any file to disk, thus preserving the router's storage.

How to Stop Error 418 from Spamming Your Logs

You might find the persistent error logs unnecessary, especially since they signify that everything is functioning as it should. To prevent these messages from flooding your logs, you can alter the logging rules on your MikroTik router.

Here's a quick step-by-step guide on how to update your logging settings:

  1. Access your MikroTik Router: Log in to your MikroTik router's interface where you can make configurations.
  2. Open the System Logging Settings: Navigate to the system logging settings where you can view and edit the logging topics.
  3. Alter the Logging Rule: Change your logging rule to exclude the fetch topic, which is responsible for logging the 418 errors. You can do this by using the following command in the terminal:
/system logging set 0 topics=info,!fetch

This command sets the router to log all info topics except for those categorized as fetch, effectively silencing the 418 error messages.

Conclusion

The 418 error code is a workaround to a potential issue with MikroTik routers unnecessarily writing to their NAND memory. By updating your system logging settings, you can keep your logs clean and focused on actual issues that require attention, while also ensuring your router's longevity.

Remember, while it might be tempting to see any error as a sign of trouble, in this case, it's simply a sign that your router is efficiently avoiding unnecessary tasks.

If you follow the steps above, you'll resolve the spam of 418 errors in your logs without compromising the functionality of your MikroTik router.

Was this page helpful?