airControl - Debugging and Troubleshooting


Overview


This article will show users steps they must take to debug and troubleshoot device connectivity with airControl. 

Table of Contents


  1. Debugging Commands
  2. Viewing Logs
  3. Starting MCAD Reporting Agent Manuall
  4. How to Test Telnet Connection
  5. Related Articles

Debugging Commands


Back to Top

The Management Console Agent (MCA) establishes secure connections from devices to airControl using SSH public keys. Below are commands that can be run from the end devices (airOS devices) to debug connectivity issues between a device and the airControl Server.

NOTE: In this case our airControl Server has an IP of 10.0.100.69:9081. You will see your server address when entering the commands below.

mca-provision-list

This command lists all available and known provisioners. If running this command does not return any results, the airOS device is not currently being monitored by airControl.

Example:

XW.v5.6.5# mca-provision-list
unknown @ http://10.0.100.69:9081/AC2/report -

mca-ctrl -t status

This command will show current connections and reporting status/statistics for the device.

Example:

XW.v5.6.5# mca-ctrl -t status
| 21:18:58 | 30 | 22 | 0 | Heartbeat | Ready | http://10.0.100.69:9081/AC2/report

One row per active console connection, where columns are:

  • The time of the last heartbeat transmit attempt
  • Interval value for periodic transmission (in seconds)
  • Number of successful transmits
  • Number of subsequent transmittal failures (is reset to 0 after successful transmit)
  • URL of the console

mca-ctrl -t connect -s <url of airControl>

This command will manually establish reporting heartbeat with airControl using default time interval of 60 seconds.

Example:

XW.v5.6.5# mca-ctrl -t connect -s http://10.0.100.69:9081/AC2/report
Going to create 'Heartbeat' reporter version = 0, url = http://10.0.100.69:9081/AC2/report, interval = 0s, crypted = false, compressed = false
Heartbeat reporter created successfully

mca-ctrl -t stop -s <url of airControl>

This command will remove reporting heartbeat with airControl.

Example:

XW.v5.6.5# mca-ctrl -t stop -s http://10.0.100.69:9081/AC2/report
Going to stop reporter url = http://10.0.100.69:9081/AC2/report
Reporter stopped successfully

mca-provision-rm

This command deletes provisioner information based on console url, public key file, or ID (if specified).

Example:

XW.v5.6.5# mca-provision-rm http://10.0.100.69:9081/AC2/report
Found 1 entries matching 'http://10.0.100.69:9081/AC2/report':
Removing: unknown @ http://10.0.100.69:9081/AC2/report ...
Found Backup1 on[1] ...
Found  Active on[2] ...
Storing Active[1] ... [%100]
Active->Backup[2] ... [%100]
done.


Viewing Logs


Back to Top

MCA logs are written to /var/log/messages. Connect to device using SSH and view logs by entering the following command:

XW.v5.6.5# cat /var/log/messages

Example below shows log entries of device initiating connection to airControl:

May 15 21:08:24 mca-ctrl[830]: Going to create 'FirstPing' reporter url = http://10.0.100.69:9081/AC2/report
May 15 21:08:24 mcad[810]: New reporter created, type = FirstPing, url = http://10.0.100.69:9081/AC2/report, interval = 10s
May 15 21:08:24 mca-ctrl[830]: FirstPing reporter created successfully
May 15 21:08:24 mcad[810]: Reporter type = FirstPing, url = http://10.0.100.69:9081/AC2/report got http response, http_code = 200
May 15 21:08:24 mcad[810]: FirstPing reporter success!
May 15 21:08:24 mcad[810]: Destroying reporter, type = FirstPing, url = http://10.0.100.69:9081/AC2/report
May 15 21:08:24 dropbear[832]: Child connection from 10.0.100.69:51486
May 15 21:08:27 dropbear[832]: Pubkey auth succeeded for 'mcuser' with key md5 cb:22:ba:80:a6:17:92:50:c4:7c:c4:49:8c:b7:7e:b5 from 10.0.100.69:51486
May 15 21:08:28 FileSystem: End check.
May 15 21:08:28 mca-ctrl[933]: Going to create 'Heartbeat' reporter version = 0, url = http://10.0.100.69:9081/AC2/report, interval = 30s, crypted = true, compressed = false
May 15 21:08:28 mcad[810]: New reporter created, type = Heartbeat, url = http://10.0.100.69:9081/AC2/report, interval = 30s
May 15 21:08:28 mca-ctrl[933]: Heartbeat reporter created successfully
May 15 21:08:28 dropbear[832]: Exit (mcuser): Exited normally 

Starting MCAD Reporting Agent Manually


Back to Top

Open initab file and comment out line that contains mcad:

# vi /etc/inittab

... <-- this is a file excerpt

null::respawn:/bin/ubntspecd -w -t -a -i wifi1 -j airview1 -m 4 -f 20 -s 200

#null::respawn:/bin/mcad

null::respawn:/bin/ulogger

ttyS0::askfirst:/sbin/getty -L ttyS0 115200 vt100

...

Restart init process:

# kill -1 1

Stop running mcad process:

# kill <pidof mcad>

Run mcad with debug options:

# mcad -vvv -l 3

Connect to server (run this in a separate SSH session):

# mca-ctrl -t connect -s http://<AC2 Server IP>:9081/AC2/report -i 15 -f 1 


How to Test Telnet Connection


Back to Top

Follow these steps to test connectivity:

1. Open SSH connection to device.

2. Run telnet 192.168.1.1 9081 

Where 192.168.1.1 is AC2 server IP address.

3. When connected using telnet you will get no indication of something happening. Execute these commands one after another and finish the last one by pressing enter twice. Don't forget to substitute the IP with your own.

GET /AC2/report HTTP/1.1
Host: 192.168.1.1
airControl-Ping: yes
Connection: close

Related Articles


Back to Top

Intro to Networking - How to Establish a Connection Using SSH