1748171 Members
3856 Online
108758 Solutions
New Discussion

Re: Failed to connect database

 
SOLVED
Go to solution
HP-Browniee
Respected Contributor

Failed to connect database

Hello guys

I recently installed IMC at a customer and after the instalation was complete i received following critical error:

Failed to conenct to database imc_icc@127.0.0.1/icc_db. Reason: Connecting to the database failed.

Any ideas how to solve this? I did a basic installation.

Thanks in advance!

 

 

 

17 REPLIES 17
jjacobs
Occasional Advisor

Re: Failed to connect database

I'm having the same issue and haven't been able to figure it out. I have opened an HPE case but still hasn't been resolved.

I'm getting "Failed to connect to database" on several databases, at random times. Not sure if you are experiencing the same.

RPapaux
Valued Contributor

Re: Failed to connect database

Hi Guys,

It happened to me time to time, but each time it was because my SQLServer service did not restart after a VM reboot.

But I assume you have already checked this.

Greetings

Ray

 

 

 

 

jjacobs
Occasional Advisor

Re: Failed to connect database

My issue seems to be occuring throughout the day, not even after a reboot. iMC seems to run fine, I just get random cirtical alerts throughout the day with that error "Failed to connect to database ..."

I checked to see if it was a password issue by running these commands on a couple of databases giving the alert but it is responding with a password .

pwdmgr.bat -query 127.0.0.1 aclm_db imc_aclm
pwdmgr.bat -query 127.0.0.1 invent_db imc_inventory

HP-Browniee
Respected Contributor

Re: Failed to connect database

Hello

Yes it is the same with me, also several databases. :/

LindsayHill
Honored Contributor

Re: Failed to connect database


@jjacobs wrote:

I checked to see if it was a password issue by running these commands on a couple of databases giving the alert but it is responding with a password .

pwdmgr.bat -query 127.0.0.1 aclm_db imc_aclm
pwdmgr.bat -query 127.0.0.1 invent_db imc_inventory


Those commands will only be querying the local configuration file, they won't be querying the database. You need to use something that connects to the DB & runs a query. Do you have any sort of server monitoring system in use? Might be worth configuring that to monitor SQL. 

I would also check the SQL Server logs.

jjacobs
Occasional Advisor

Re: Failed to connect database

Ok, i was wondering if those commands actually queried the databases.  I checked our SQL logs and I'm not seeing any errors. Were running SQL Server ont the same server as iMC.

jjacobs
Occasional Advisor

Re: Failed to connect database

Quick Update. Spoke to a HPE tech today and it appears there are multiple people with this very issue.

We found the error by going to dmalog.txt

Under your IMC installation directory ($\Program Files\iMC\deploy\log\) and viewing the latest dmalog.txt. Matching up the times we were seeing the error he was able to identify the following error:


 

2016-09-27 11:58:45 [ERROR] [iMC-Database-Connect-Check] [com.h3c.imc.deploy.dma.monitor.DatabaseConnectMonitor::run(74)] Access database error
com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "SQL Server returned an incomplete response. The connection has been closed. ClientConnectionId:7c006254-891a-4088-972a-645e9c2d37b6".
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1667)
    at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1668)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1323)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827)
    at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)
    at java.sql.DriverManager.getConnection(DriverManager.java:582)
    at java.sql.DriverManager.getConnection(DriverManager.java:154)
    at com.h3c.imc.deploy.dma.monitor.DatabaseConnectMonitor.run(DatabaseConnectMonitor.java:74)
Caused by: java.io.IOException: SQL Server returned an incomplete response. The connection has been closed. ClientConnectionId:7c006254-891a-4088-972a-645e9c2d37b6
    at com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.ensureSSLPayload(IOBuffer.java:651)
    at com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.readInternal(IOBuffer.java:708)
    at com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.read(IOBuffer.java:700)
    at com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream.readInternal(IOBuffer.java:895)
    at com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream.read(IOBuffer.java:883)
    at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:422)
    at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:460)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:863)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1188)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1215)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1199)
    at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1618)


    He confirmed that is this same error that was found on other customers experiencing the same critical alerts. He did have a customer disable their windows firewall and that seemed to make the alerts stop. In my case windows firewall has already been disabled. He said they are going to do more research and should hopefully have a fix soon.

 

 

 

jjacobs
Occasional Advisor
Solution

Re: Failed to connect database

Well that was quick. Here is a workaround they gave me. Fingers crossed!


 

Here is the new workaround provided by our IMC Engineering, once this workaround is done - the previously removed/uninstalled Microsoft security KB (KB numbers below) can be re-installed.

Microsoft company provided another solution for those customers who have installed the latest updates. It can fix the issue without removing the installed updates. We have verified it in LAB, and it works fine.

To configure the SSL Cipher Suite Order Group Policy setting, follow these steps:

1. At a command prompt, enter gpedit.msc, and then press Enter. The Local Group Policy Editor is displayed.
2. Go to Computer Configuration > Administrative Templates > Network > SSL Configuration Settings.
3. Under SSL Configuration Settings, select SSL Cipher Suite Order, right click, then select Edit
4. Click Enabled, then go to the Options > SSL Cipher Suites, please move the cursor to find and delete the following two cipher suites (please see the attached picture ‘delete+new_cipler+suites.png’):

TLS_DHE_RSA_WITH_AES_256_CBC_SHA
TLS_DHE_RSA_WITH_AES_128_CBC_SHA

Note: It's not recommended to copy the string from 'Options >> SSL Cipher Suites' and edit it in other editor, e.g. notepad, because when you copy back, the length of the string will be limited.
5. Click OK to save
6. Reboot the physical server to take effect
 

IMC started to report this issue after MS Windows update of;

     For Windows 7 and Windows Server 2008 – MS update KB3172605 (replacement of KB3161608)

     For Windows 8.1 and Windows Server 2012 – MS update KB3172614 (replacement of KB3161606)

IMC Alarms are generated by the system process lsass.exe which is related with the Windows’ Security.  This is affecting IMC application (only), yet no IMC application user issues are reported -only intermittent IMC alarms are reported from different imc_** databases’.

Note: No changes/fixes in iMC for that issue currently.


 

HP-Browniee
Respected Contributor

Re: Failed to connect database

Hi

Thanks for all this info, i really appreciate it.

I'll test this next week when i am back with the customer. Then i'll let you know what the results were.

Kind regards