Issue
- The ERA Web Console displays the error message "Error loading data" after updating Linux ODBC Connector (mysql-connector-odbc) package to version 5.6.40-2.e17 and restarting the MySQL service
If you were not logged in during the upgrade, the ERA Web Console will not connect to ERA Server and will report the error "Not connected"
You can find following error message in the ERA Server trace log (located at /var/log/eset/RemoteAdministrator/Server/trace.log
):
Error: CDataMinersModule [Thread 7f935ebc7700]: Failed to write some logs because: [unixODBC][Driver Manager]Can't open lib 'MySQL ODBC 5.3 Unicode Driver' : file not found (0). Rescheduling.
If you have not updated yet, you can prevent the issue by freezing the MySQL version or editing the ERA configuration during the update.
Details
Solution
- Open your Virtual Machine (when running ERA Virtual Appliance) and log in to Terminal.
- Run the following command as root (or with
sudo
, the command is in one line):sed -i 's/MySQL ODBC 5.3/MySQL ODBC 8.0/g' /etc/opt/eset/RemoteAdministrator/Server/StartupConfiguration.ini
Restart mysql service:
service mysqld restart
Restart ERA Server service:
service eraserver restart
Wait a minute until the service starts and log in to ERA Web Console.
The sed
command
The sed
command replaces every occurrence of “MySQL ODBC 5.3” with “MySQL ODBC 8.0” in the selected file.
Fix the driver during the update to prevent the failure
Before you update the MySQL and ODBC driver, you can modify the configuration to prevent the database connection failure.
- Open your Virtual Machine (when running ERA Virtual Appliance) and log in to Terminal.
- Check your current ODBC drivers version:
odbcinst -q -d
Drivers with version 5.3 should be listed.
- Run the update of mysql components.
yum update mysql*
- Check your current ODBC drivers version:
odbcinst -q -d
Drivers with version 8.0 should be listed.
- After the MySQL is updated but before the restart of the machine or MySQL service, run the following command:
sed -i 's/MySQL ODBC 5.3/MySQL ODBC 8.0/g' /etc/opt/eset/RemoteAdministrator/Server/StartupConfiguration.ini
- Restart the MySQL and ERA Server services.
service mysqld restart
service eraserver restart
Prevent MySQL from updating
If you have not updated your ODBC driver yet, you can prevent yum from upgrading the ODBC driver and MySQL components by freezing current version.
- Open your Virtual Machine (when running ERA Virtual Appliance) and log in to Terminal.
- Install YUM Versionlock plugin:
yum install yum-plugin-versionlock
- Add MySQL components to the Versionlock:
yum versionlock mysql-*
Freezing the version in YUM will prevent myslq components from future updates
It is safer to schedule the update and restart with fix than freezing the mysql version indefinitely.
ERA MDMCore component
If you have deployed ERA MDMCore on ERA Virtual Appliance and you have update MySQL on that appliance, you can have the same problem as was described above. ERA MDMCore component will not be able to connect to its database. To fix this issue follow these steps:
- Open your Virtual Machine with MDMCore and log in to Terminal.
- Run the following command as root (or with
sudo
, the command is in one line):sed -i 's/MySQL ODBC 5.3/MySQL ODBC 8.0/g' /etc/opt/eset/RemoteAdministrator/MDMCore/startupconfiguration.ini
Restart mysql service:
service mysqld restart
Restart ERA MDMCore service:
service eramdmcore restart
Wait a minute until the service starts and log in to ERA Web Console.
Reactie toevoegen
Log in of registreer om een reactie te plaatsen.