# Solutions

# Keitaro is working weirdly. How can I find the reason?

Go to Maintenance > Logs > System Log page. Find the error log and check if there are errors.

Check php error log /var/log/errors.log (path from Keitaro root).

Some descriptions of errors you'll find below. Also, you can contact us at support@keitaro.io.

# Cannot get the license, the connection to the servers fails

Here are some reasons:

  • Nameserver, which is set in /etc/resolve.conf, is not available.
  • Firewall is configured so that it blocks all outbound connections.
  • The server keitaro.io is not available.

The solution for hostings:

  1. Check if a website http://keitaro.io is working.
  2. Download the script http://keitaro.io/getfile/test, upload it to a domain directory and run on the browser.
  3. If you see some errors contact your hoster support team.

The solution for servers:

  1. Open keitaro.io in your browser. If the website is not available email us at support@keitaro.io.

  2. If you have shared hosting contact the hosting support team and ask them “Why the connection to keitaro.io is blocked?”.

  3. If you have your own server, send a ping to keitaro.io from the server console.

ping keitaro.io

If there is an error “Unknown host” check which ns-servers are contained in the file /etc/resolve.conf of the server. You can add there DNS from Google;

nameserver 8.8.8.8
nameserver 8.8.4.4

If you still have an “Unknown host” error write at /etc/hosts:

78.46.91.189 keitaro.io

If there is an error “Timed out” check your firewall settings. Contact a hosting support team if necessary.

# Connection attempt failed: SQLSTATE[08004] [1040] Too many connections

The maximum limit of connections set in MySQL configuration is exceeded. Increase the max_connections value in /etc/my.cnf and reload MySQL.

# Got error 28 from storage engine"

It means not enough disk space.

To show disc space in a server console, use the following command:

$ df -h

# Error while connecting redis: Redis server went away

For hostings

  1. Open the page Maintenance > Settings > Performance.
  2. Set “Files” at the “Storage for draft data” option.

For servers

  1. Check if Redis is running:

$ service redis status 2. If it is stopped run it

$ service redis start 3. Add to autoload (CentOS)

$ chkconfig redis on Test Redis with this script:

<?php
$redis = new Redis();
$redis->connect('127.0.0.1', 6379);

# "1286: Unknown storage engine 'InnoDB'

For hostings Contact a hoster support team to help resolve this error.

For owners of the servers Add in my.cnf:

default-storage-engine=innodb 
default-table-type=innodb

and reboot MySQL:

service mysql restart

# Data is not stored in Redis

Try to clear Redis:

redis-cli -r FLUSHALL

If this helped you, check the memory limit at the Redis configuration.

# MySQL server has gone away or No file or directory

  1. Check if there is wait_timeout.

You can do this in a terminal:

mysql -e "show variables like 'wait_timeout';"

+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| wait_timeout  | 30 |
+---------------+-------+

To disable, delete or comment in a config /etc/my.cnf line

#wait_timeout=10

Then restart MySQL.

service mysqld restart
service mysql restart
service mariadb restart
  1. Make sure that “Files” or “Redis” are chosen in database settings.

  2. If there is an opportunity, install Redis.

# Unable to save the updated license

Check the available free space. For example, using the console:

df -h

You will see something like this result:

Filesystem      Size   Used  Avail Capacity   iused    ifree %iused  Mounted on
/dev/disk1     465Gi  407Gi   57Gi    88% 106779354 15058244   88%   /
...

The penultimate column shows the percentage of used space.

# User 'xxx' has exceeded the 'max_connections_per_hour'

The user has the limit number of connections per hour.

Solutions:

  1. Remove or increase the limit

GRANT USAGE ON *.* TO 'xxx'@'localhost' WITH MAX_CONNECTIONS_PER_HOUR 0;

  1. Switch the handler storage to Files or Redis (Maintenance > Settings > Performance).

# 1054: Unknown column 'conversions' in 'field list'

Open the page “Maintenance > Migrations” and run the migration #95.

# Redis is LOADING the dataset.

That solution drop all the temp stats, but restores tracker stability. Run these commands in server terminal:

rm -rf /var/lib/redis/*
service redis restart

# How to get rid of "[IPv6]" in reports

We need to disable IPv6 on a server for this. All visitors will connect to the server with IPv4. In CentOS edit the /etc/sysctl.conf file:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

Then execute:

sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1

# Cloudflare

Cloudflare imposes IPv6 on all new domains. To disable this, you need some tech knowledge and experience with the terminal.

  1. Go to “Network”. Find “IPv6 Compatibility” domain settings. It is in “On” position and you can't disable it.

  2. Copy the code below to the notepad:

curl -X PATCH "https://api.cloudflare.com/client/v4/zones/ZONEID/settings/ipv6" \
     -H "X-Auth-Email: EMAIL" \
     -H "X-Auth-Key: API_KEY" \
     -H "Content-Type: application/json" \
     --data '{"value":"off"}'
  1. Change ZONEID to the zone, which can be taken on “Overview” page.

  2. Change EMAIL to your account's email.

And API_KEY to the key, which can be found on “My Profile” page - “Global API Key”.

  1. Now copy the edited code from a notepad and launch this code in any terminal.

  2. Check if the domain's “IPv6 Compatibility” settings are Off.

IPv6 for each domain is disabled separately, which means you need to repeat the steps for every domain.

# Tracker failed to load, while MySQL wont start

Following steps should be used if your tracker not loading or not starting, because MySQL service won't start while DB of tracker is corrupted. Mostly this occurs when MySQL database of your tracker crashed because of major failure in SSD's read/write error(bad blocks, I/O error, bad or defectife SSD drive) First of all, you need to start MySQL service in recovery mode, so tracker start working, and you could make a mysql dump for further transfer to server with working and stable SSD.

  1. In the terminal of your Linux server, please execute:
sudo touch /forcefsck
  1. Now reboot VPS/VDS from control panel of your VDS/VPS hosting, or execute following command in the terminal of your server:
reboot
  1. Start MySQL DB service with next command:
service mysql start

or

systemctl start mysql

After mentioned steps, MySQL service will be started in recovery mode, which will allow creation of mysql dump, and further transfer to the server with working SSD.

# Change or replace table prefix

When transfering tracker, you may encounter DB prefix error, while auto-installation of tracker was checking it for integrity. This error occurs when prefix of tables in your DB, was changed (manually or intentionaly.) Auto-installation of tracker will not accept such mysql dump, but we can change prefix of table directly in the terminal of our server( if no other methods available, like phpmyadmin). . We can use sed - streaming text editor, which will help us change prefix of table to keitaro_ To do this, you need to unpack mysqldump of your DB(it is better if it is a copy of your mysqldump). After this, you need to execute following command in the same folder as your unarchived mysqldump is:

sed -i s/someprefix_/keitaro_/g dump.sql

Where someprefix_ - is your current prefix of DB. So for example, if we have table prefix test_ and we want to change it to keitaro_ then our command wil look like this:

sed -i s/test_/keitaro_/g dump.sql

WARNING This command is working on the strict accordance - so if your will make a mistake in the word of prefix or missplace a character or space - sed will change any of matching words in your mysqldump file and will make it unusuble further. If you don't know what you are doing or you are not sure in your actions - please refer to our technical support of tracker. In any other case - if you will make unsuccessful replacment of database prefix, you will damage your database of tracker, making it impossible to restore tracker from it's DB.

Last Updated: 5/14/2020, 9:40:59 AM