Jump to content

Help with Installing ESMC Server on CentOS 7


CO11WRX
 Share

Go to solution Solved by MartinK,

Recommended Posts

Hi everyone

I have been frustratingly trying to get the ESMC server installed on CentOS 7.  I think I was eventually able to get through the instructions but I am running into a problem I cannot seem to fix.  I am attempting to run the following installation script (I have sanitized it by removing my hostname and IP)

sudo ./server-linux-x86_64.sh \
--skip-license \
--db-driver=MySQL \
--db-hostname=my.hostname.com \
--db-port=3306 \
--db-admin-username=root \
--db-admin-password=mypass \
--server-root-password=mypass \
--db-user-username=root \
--db-user-password=mypass \
--cert-hostname="my.hostname.com;111.111.111.111"

The output of the script is below: 

ESET Security Management Center Server Installer (version: 7.2.2236.0), Copyright © 1992-2020 ESET, spol. s r.o. - All rights reserved.

Extracting archive, please wait...
Archive extracted to /tmp/tmp.1MuOANeZHX.
Checking OpenSSL ... done [OpenSSL 1.0.2k-fips 26 Jan 2017]
Reading previous installation settings ... failure
Checking installed version... done
Status of current installation is: NEW
Checking database connection ... failure

Error: Unknown database driver or data source name (DSN)
 

I assume this error is a result of my /etc/odbcinst.ini settings but for the life of me I cannot figure out how to fix it.  For reference, here are the settings in my odbcinst.ini file. 

[MySQL]
Description = ODBC for MySQL
Driver=/usr/lib64/libmyodbc5w.so
Setup=/usr/lib/libodbcmyS.so
FileUsage = 1

Unfortunately the instructions I am using don't really go over how to install the ODBC connector so I tried to figure this out on my own. When I downloaded the ODBC connector RPM and tried to install, I received an error regarding dependencies. I found a site that said to use the --nodeps flag to bypass this.  I am wondering if this is where I went wrong. Does anyone have any recommendations on how to resolve this issue? Alternatively, can someone point me to an Eset article on how to actually install the ODBC connector? I found the steps to configure it, but I think the installation part is where I screwed up.

Any help would be greatly appreciated. 

Thanks! 
 

 

Link to comment
Share on other sites

  • Administrators

Just to make sure, did you follow the instructions at https://help.eset.com/esmc_install/72/en-US/mysql_configuration.html

and also made sure to install a supported version of MySQL and ODBC driver per https://help.eset.com/esmc_install/72/en-US/database_requirements.html?

Link to comment
Share on other sites

  • ESET Staff

Also note that during installation attempts, also more detailed log is present in:

/var/log/eset/RemoteAdministrator/EraServerInstaller.log

which might help to locate source of the problem.

Regarding mentioned error, it indeed points that there is something wrong with driver name - but from provided data is seem to be correct, i.e. you are referencing proper ODBC driver name. I would recommend to check that driver library referenced in ODBC entry is actually accessible. Also I would propose to switch SELInux to permissive mode, just to be sure it is not just a problem with SELinux labels caused by manual modifications of files.

There might be also problems with ODBC driver dependencies, but this should not be the case if driver for CentOS7 was installed.

Link to comment
Share on other sites

19 hours ago, Marcos said:

Just to make sure, did you follow the instructions at https://help.eset.com/esmc_install/72/en-US/mysql_configuration.html

and also made sure to install a supported version of MySQL and ODBC driver per https://help.eset.com/esmc_install/72/en-US/database_requirements.html?

Thanks! I did indeed follow the instructions in your first link. For the ODBC connector, I could not find any actual step by step instructions for installing the connector. I just went to the MYSQL Community Downloads site and downloaded the ODBC 5.3.10 version. I used the RPM -i command to install the package. This is where I received an error regarding the dependencies.  

 

17 hours ago, MartinK said:

Also note that during installation attempts, also more detailed log is present in:


/var/log/eset/RemoteAdministrator/EraServerInstaller.log

which might help to locate source of the problem.

Regarding mentioned error, it indeed points that there is something wrong with driver name - but from provided data is seem to be correct, i.e. you are referencing proper ODBC driver name. I would recommend to check that driver library referenced in ODBC entry is actually accessible. Also I would propose to switch SELInux to permissive mode, just to be sure it is not just a problem with SELinux labels caused by manual modifications of files.

There might be also problems with ODBC driver dependencies, but this should not be the case if driver for CentOS7 was installed.

Thank you for the info! I checked that log file and below is what is displayed. NOTE: I edited the hostname for privacy purposes.  From what I can tell the error message is similar to what is shown on screen when I try to run my install script.  

As you suggested, I will try to switch SELinux to permissive mode then test again. 

 

2020-11-07 00:36:24 Information: DbCheckConnection: Set output property: P_DB_CONNECTION_STATUS =
2020-11-07 00:36:24 Information: DbCheckConnection: Set output property: P_DB_STATUS =
2020-11-07 00:36:24 Information: DbCheckConnection: Set output property: P_DB_UPGRADE =
2020-11-07 00:36:24 Information: DbCheckConnection: Set output property: P_DB_USE_FIRST_USER =
2020-11-07 00:36:24 Information: DbCheckConnection: Set output property: P_DB_PORT = 3306
2020-11-07 00:36:24 Information: GetDatabaseServerConnectionStringWithoutEscape: Created connection string: 'Driver=[MySQL];Server=serverhostname.com;Port=3306;User=******;Password={******};CharSet=utf8;NO_LOCALE=1;NO_SSPS=1;'
2020-11-07 00:36:24 Information: Entering function: void Era::Setup::Common::CustomActions::CDatabaseReader::TestConnection(const string&, Era::Setup::Common::Database::Framework::ConnectOptions)
2020-11-07 00:36:24 Information: Leaving function: void Era::Setup::Common::CustomActions::CDatabaseReader::TestConnection(const string&, Era::Setup::Common::Database::Framework::ConnectOptions)
2020-11-07 00:36:24 Information: Exception thrown while connecting to the specific database as a user.. Error code: 0, DB specific error code: 0, error message:
2020-11-07 00:36:24 Information: DbCheckConnection: Set output property: P_DB_CONNECTION_STATUS = 0
2020-11-07 00:36:24 Information: DbCheckConnection: Return code: 0
2020-11-07 00:36:24 Information: Installer: Unknown database driver or data source name (DSN)
2020-11-07 00:36:24 Information: Installer: Error: Unknown database driver or data source name (DSN)
 

Link to comment
Share on other sites

Alright, it looks like we may be getting somewhere! I set SELINUX to permissive mode and now it looks like the Server installation is able to connect to the MySQL DB; however, I am getting a different error now (User Login Failed invalid credentials provided).  I assume this is in reference to the MySQL user account. I am able to connect to the MySQL database using the same credentials I provided in the script so I am not sure what is gong on.  For example, using the command mysql -u root -p allows me to connect to the MySQL instance without issue. Do I need to create a separate DB user and use those credentials in the Server installation script?  I have also included the contents of the ERAServerInstaller log file.  

 

Extracting archive, please wait...
Archive extracted to /tmp/tmp.ODmf2NxF1y.
Checking OpenSSL ... done [OpenSSL 1.0.2k-fips 26 Jan 2017]
Reading previous installation settings ... failure
Checking installed version... done
Status of current installation is: NEW
Checking database connection ... failure

Error: User login failed (invalid credentials provided)
 

 

 

2020-11-08 03:07:41 Information: GetDatabaseServerConnectionStringWithoutEscape: Created connection string: 'Driver=MySQL;Server=hostname.com;Port=3306;User=******;Password={******};CharSet=utf8;NO_LOCALE=1;NO_SSPS=1;'
2020-11-08 03:07:41 Information: Entering function: void Era::Setup::Common::CustomActions::CDatabaseReader::TestConnection(const string&, Era::Setup::Common::Database::Framework::ConnectOptions)
2020-11-08 03:07:41 Information: Leaving function: void Era::Setup::Common::CustomActions::CDatabaseReader::TestConnection(const string&, Era::Setup::Common::Database::Framework::ConnectOptions)
2020-11-08 03:07:41 Information: Exception thrown while connecting to the specific database as a user.. Error code: 1045, DB specific error code: 1045, error message: [unixODBC][MySQL][ODBC 5.3(w) Driver]Access denied for user 'root'@'localhost' (using$
2020-11-08 03:07:41 Information: Entering function: void Era::Setup::Common::CustomActions::CDatabaseReader::TestConnection(const string&, Era::Setup::Common::Database::Framework::ConnectOptions)
2020-11-08 03:07:41 Information: Leaving function: void Era::Setup::Common::CustomActions::CDatabaseReader::TestConnection(const string&, Era::Setup::Common::Database::Framework::ConnectOptions)
2020-11-08 03:07:41 Information: Exception thrown while connecting to the database SERVER as a user.. Error code: 1045, DB specific error code: 1045, error message: [unixODBC][MySQL][ODBC 5.3(w) Driver]Access denied for user 'root'@'localhost' (using p$
2020-11-08 03:07:41 Information: DbCheckConnection: Set output property: P_DB_CONNECTION_STATUS = 1045
2020-11-08 03:07:41 Information: DbCheckConnection: Return code: 0
2020-11-08 03:07:41 Information: Installer: User login failed (invalid credentials provided)
2020-11-08 03:07:41 Information: Installer: Error: User login failed (invalid credentials provided)
 

Link to comment
Share on other sites

  • ESET Staff
  • Solution

I think it might be one of following problems:

  • Password is not escaped correctly when provided to installer script (or maybe even there are special characters that broke our installer) - I guess password contains special characters?
  • Version of MySQL -> MySQL 8 uses new authentication mechanisms by default and authentication would work only with ODBC 8 drivers.
  • Wrong password for user root@localhost -> it might happen that you have multiple root users, for example root@127.0.0.1 or root@% and in case of local command line client, different user might have been used...
Link to comment
Share on other sites

On 11/8/2020 at 12:43 AM, MartinK said:

I think it might be one of following problems:

  • Password is not escaped correctly when provided to installer script (or maybe even there are special characters that broke our installer) - I guess password contains special characters?
  • Version of MySQL -> MySQL 8 uses new authentication mechanisms by default and authentication would work only with ODBC 8 drivers.
  • Wrong password for user root@localhost -> it might happen that you have multiple root users, for example root@127.0.0.1 or root@% and in case of local command line client, different user might have been used...

Thank you!  I was able to get the installer to complete and now have a functioning ESMC server! I marked your last post as the answer; however, there were two different issues that were causing the installer to fail. Below is a quick summary of the issues and their resolution: 

1. As you suggested in a previous post, setting SELINUX to "Permissive" resolved the issue where the installer script was returning the following message: "Error: Unknown database driver or data source name (DSN)"  After setting SEL to permissive and rebooting, this error went away. 

2. After resolving issue #1, the installer script returned a different error "User login failed (invalid credentials provided)"  It turns out one of the variables in my installer script was using a password containing the "@" symbol. I removed this character from the password an re-ran the script. It completed without any problems.  

At this point I am good to go! Thanks to both Marcos and MartinK for your help in getting my issues resolved! 

Link to comment
Share on other sites

  • ESET Staff
1 hour ago, CO11WRX said:

It turns out one of the variables in my installer script was using a password containing the "@" symbol. I removed this character from the password an re-ran the script. It completed without any problems.

Thanks for detailed confirmation. We will have to check how this character is processed -> this one is actually one of 3 special characters that do require special handling when used in ODBC connection strings, and it seems it does not work correctly.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...