Skip to main content

MIKRO000 - Failed to Connect to MikroTik

Agent error code #MIKRO000 indicates that the agent could not reach the MikroTik REST API. The request failed before any authentication or address-list operation could take place.

This error is distinct from authentication failures (#MIKRO001), authorization failures (#MIKRO002), TLS errors (#MIKRO003), timeouts (#MIKRO004), and REST API availability (#MIKRO005). It indicates a general connectivity failure such as connection refused or DNS resolution failure.

Common causes include:

  • The hostname configured on the Knocknoc backend is wrong or no longer resolves
  • The RouterOS www-ssl service is disabled or listening on a different port
  • A network firewall, proxy, or VPN between the agent and the router is dropping traffic
  • The RouterOS Allowed Address list on the service user excludes the agent host

Steps to Resolve

Verify the Hostname

  1. Confirm the RouterOS URL value in the Knocknoc backend matches the URL the agent should use
  2. Include the scheme (https://) and any non-default port

Test Connectivity From the Agent Host

  1. From the host running the Knocknoc agent, run: curl -ku '<user>:<pass>' https://<router-host>/rest/system/resource
  2. If the command fails with connection refused or DNS error, fix the underlying network issue before retrying in Knocknoc

Check the RouterOS Services List

  1. In RouterOS, open IP > Services
  2. Confirm www-ssl is enabled
  3. Confirm the port matches the one in the RouterOS URL field
  4. Confirm the Available From list (if set) includes the agent host's IP

Still Having Issues?

We can help you out, contact us at support@knocknoc.io.