0
votes

I am attempting to connect to a presto coordinator that resides on an EMR cluster. I am using the Terradata ODBC driver. I have both tested the driver by putting the pertinent details into the DSN via ODBC connections dialog and written a simple C# application that creates a connection (see the code below).

The problem is that I am getting a 404 error returned when the connection is either tested in the DSN dialog or opened in the C# code.

I believe the security group settings in AWS are fine as I am definitely getting through to the master node which is configured to have port 8080 open.

var connectionString = "Driver=Teradata Presto ODBC Driver;Host=xxx;Port=8080";
OdbcConnection cn = new OdbcConnection(connectionString);
OdbcCommand cmd = new OdbcCommand(sql, cn);
cn.Open();

This code when run will throw an exception with "ERROR [HY000] [Teradata][Presto] (1040) Error with HTTP request, response code: 404" as a message.

Am banging my head against the wall with this one. Any insights are very much appreciated.

1
Uhh, hang on. Do you need to use the Terradata distribution of presto to use the ODBC driver they produced??tetsuo
I can confirm that the 404 error is being returned when going through the Facebook JDBC driver. So not a Terradata ODBC specific thing...tetsuo
It may sound stupid, but are you absolutely positive that the host you are connecting to is the presto coordinator and not a presto worker? They recently changed the workers to no longer answer requests, and we had mistakenly connected to workers all along, so we got a lot of 404 errors as well...Jan Dörrenhaus
Im fairly sure that its the coordinator as its the master public dns name Im using and Im assuming that the coordinator goes on that. This is the node Im SSHing into too (which works fine). Thanks for the info though. Thought for a second it could be the port as it states here blogs.aws.amazon.com/bigdata/post/Tx1BF2DN6KRFI27/… that the default port for prest is 8889 (not 8080). But I just get a timeout with that. Going to go and try to be very sure its the coordinator Im talking to. Thanks again...tetsuo
Update: completely forgot to open up port 8889 in the AWS security group. So it ends up that it was the port issue. I can now connect via my DSN dialog and through my Java test code (which gives me presto specific error). My C# code is now returning http 400. So not quite there yet but a hell of a lot closer. Boy that feels good.tetsuo

1 Answers

0
votes

The problem was the port I was connecting to Presto on. I had got it in my head that it was 8080 but in fact it was 8889.