Dealing with aircontrol issue where can't login to server message is show.

OS: NAME="Ubuntu"
VERSION="16.04.1 LTS (Xenial Xerus)"
Package name: aircontrol-v2.0-Beta12.1089.131211.1450-ubuntu.deb
Primary test to find other problem:
ping the aircontrol ip address see if it is reachable.
Aircontrol version airControl 2.0.3 Linux Server
Solution:
Most probable case is that the database might be full

Find top 10 largest file residing in your system
du -cksh /* | sort -rn | head
You have to be patient while this command run it may take more than 1 Minute.

Check status of storage and find if critical directory like / , /var is full or not if it is delete any unnecessary files like logs


check the folder size of /opt as this folder is used as installation target for third party software
If the size is large like 90% of the total size of root directory like if your main root directory is / then 90% of 890 ie 9.8 gb is free then Postgress database might be full.

Delete any old data from the database using command

Delete from ac2.hours_statistics WHERE timestamp < NOW() - INTERVAL '60 days';
and restart the aircontrol service using
]#systemctl restart  airControl2Server.service
If it still not working then, Reboot the server.

Reference:
http://www.postgresqltutorial.com/psql-commands/

Script to  clean up database from https://community.ubnt.com/t5/airControl-v2-Beta/AC2-Beta-19-Database-Cleanup-Pruning/td-p/1499315
### Add a password file
### Syntax : hostname:port:database:username:password
sudo echo "localhost:5432:ac2:ubnt:ubnt" > /opt/Ubiquiti/AirControl2/pgsql/.pgpass
sudo chown postgres.postgres /opt/Ubiquiti/AirControl2/pgsql/.pgpass
sudo chmod 0600 /opt/Ubiquiti/AirControl2/pgsql/.pgpass

### Add a SQL file
echo "delete from ac2.hours_statistics WHERE timestamp < NOW() - INTERVAL '60 days';" > /opt/Ubiquiti/AirControl2/pgsql/db-clean.sql
echo "delete from ac2.minutes_statistics WHERE timestamp < NOW() - INTERVAL '60 days';" >> /opt/Ubiquiti/AirControl2/pgsql/db-clean.sql
echo "delete from ac2.seconds_statistics WHERE timestamp < NOW() - INTERVAL '60 days';" >> /opt/Ubiquiti/AirControl2/pgsql/db-clean.sql

### Run script/cron
su - postgres -c "/opt/Ubiquiti/AirControl2/pgsql/bin/psql -U ubnt -d ac2 -f '/opt/Ubiquiti/AirControl2/pgsql/db-clean.sql'"

Comments

Popular Posts