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-sslservice 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
- Confirm the RouterOS URL value in the Knocknoc backend matches the URL the agent should use
- Include the scheme (
https://) and any non-default port
Test Connectivity From the Agent Host
- From the host running the Knocknoc agent, run:
curl -ku '<user>:<pass>' https://<router-host>/rest/system/resource - If the command fails with connection refused or DNS error, fix the underlying network issue before retrying in Knocknoc
Check the RouterOS Services List
- In RouterOS, open IP > Services
- Confirm
www-sslis enabled - Confirm the port matches the one in the RouterOS URL field
- 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.