EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB482918: User failed to connect to Presto DB in MicroStrategy although the connection string is correct


Ruiyu Han

Senior Support Engineer • MicroStrategy


User might fail to connect to Presto DB in MicroStrategy although the connection string is correct

SYMPTOM
Presto DB instance in Strategy Developer could be created according to below article:
https://community.strategy.com/article/How-to-Connect-to-Presto?language=en_US
But the error is returned when using this Presto DB instance although the connection string could work properly in a java program or other tools.
The error log in DSSErrors.log is like below:


2019-02-21 12:52:45.078+09:00 [HOST:xxx.xxx.xxx.xxx][SERVER:][PID:5250][THR:2700367616][JdbcWrapper][Error] JdbcSQLException occur. Error Message: Error executing query, Java Trace: java.sql.SQLException: Error executing query
        at com.facebook.presto.jdbc.PrestoStatement.execute(PrestoStatement.java:243)
        at com.Strategy.database.Jdbc.JdbcStatement.execute(Unknown Source)
Caused by: com.facebook.presto.jdbc.internal.jetty.client.HttpResponseException: HTTP protocol violation: bad response on HttpConnectionOverHTTP@6ca5457(l:/xxx.xx.xxx.xxx:52622 <-> r:xxx.xxx.xxx.xxx.xx.xx/xxx.xx.xxx.1:8443,closed=false)[HttpChannelOverHTTP@51586fd8(exchange=HttpExchange@713b72c req=TERMINATED/null@null res=PENDING/null@null)[send=HttpSenderOverHTTP@59ce3ddc(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@d72a25e{s=START}],recv=HttpReceiverOverHTTP@248f519b(rsp=IDLE,failure=null)[HttpParser{s=CLOSE,0 of 0}]]]
        at com.facebook.presto.jdbc.internal.jetty.client.http.HttpReceiverOverHTTP.badMessage(HttpReceiverOverHTTP.java:304)
        at com.facebook.presto.jdbc.internal.jetty.http.HttpParser.parseNext(HttpParser.java:1420)
        at com.facebook.presto.jdbc.internal.jetty.client.http.HttpReceiverOverHTTP.parse(HttpReceiverOverHTTP.java:159)
        at com.facebook.presto.jdbc.internal.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:120)
        at com.facebook.presto.jdbc.internal.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:70)
        at com.facebook.presto.jdbc.internal.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:90)
        at com.facebook.presto.jdbc.internal.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:115)
        at com.facebook.presto.jdbc.internal.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
        at com.facebook.presto.jdbc.internal.jetty.io.FillInterest.fillable(FillInterest.java:95)
        at com.facebook.presto.jdbc.internal.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
        at com.facebook.presto.jdbc.internal.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
        at com.facebook.presto.jdbc.internal.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
        at com.facebook.presto.jdbc.internal.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
        at com.facebook.presto.jdbc.internal.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
        at com.facebook.presto.jdbc.internal.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
        at java.lang.Thread.run(Thread.java:748)
 

CAUSE
One possible reason is that multiple Presto JDBC driver from different versions might be placed under the driver folder and a parameter named “driverfile” in the connection string has been used to specify the driver file which should be used. But actually the parameter “driverfile” would not take effect.
This issue would happen typically when users try to connect to Presto Database via SSL in Strategy 10.4.x. 
In certain versions on 10.4.x line, the bundled Presto JDBC driver was old which doesnt support SSL connection. User might download the new driver and copy to the folder so that there are multiple driver files like presto-jdbc-0.jar and presto-jdbc-0.189.jar.
Even if user specifies presto-jdbc-0.189.jar in driverfile, old version driver is still used which doesn't support SSL and leads to error. 
ACTION
Ensure that only 1 driver file is placed in the driver folder specified by the parameter "MSTR_JDBC_JAR_FOLDER" and do not rely on parameter "driverfile".
  KB482918


Comment

0 comments

Details

Knowledge Article

Published:

March 11, 2019

Last Updated:

March 11, 2019