Skip to main content

RStudio, Distributed R and vRODBC/Vertica

  • September 29, 2014
  • 6 replies
  • 28 views

Iwan_Williams
Hi,

I have been experimenting with setting up a Vertica->DistributedR->RStudio stack.

I have managed to get it working with a DistributedR cluster being used in the RStudio environment and connecting to Vertica via vRODBC.

That was using the dbadmin login and co-locating DistributedR on the Vertca nodes. Not recommended but I only want to test the functionality, not conduct a load test.

When I create a new login that is not dbadmin I'm having issues with vRODBC. The error is on the creation of the connection:
> connect <- odbcConnect("Test")
Warning messages: 1: In odbcDriverConnect("DSN=Test") : [vRODBC] ERROR: state HY000, code 10430, message [unixODBC][Vertica][ODBC] (10430) Not enough information provided to establish a connection to the data source and specified to not prompt for more information. 2: In odbcDriverConnect("DSN=Test") : ODBC connection failed
>

It is reminiscent of an issue where odbc.ini an vertica.ini environmental parameters weren't configured but I have checked and they are. I've also ensured ranalysis has read access to the ini files but to no effect. 

Works fine if I use dbadmin.

Just for clarity, the logins discussed are linux logins not Vertica.

Any ideas?

6 replies

Forum|alt.badge.img+2
  • Participating Frequently
  • September 29, 2014
Hello Iwan,


Yes, that error indicate those parameters were not configured correctly.  I am wondering the error you get is from RStudio or R console?


To set those parameters in RStudio:
Sys.setenv(ODBCINI="/home/hzhang/Desktop/hzhang/odbc.ini")
Sys.setenv(VERTICAINI="/home/hzhang/Desktop/hzhang/vertica.ini")




To set those parameters in R console(before entering R console):
export ODBCINI=/home/hzhang/Desktop/hzhang/odbc.ini
export VERTICAINI=/home/hzhang/Desktop/hzhang/vertica.ini



Let me know if it helps.


Thanks,
Hua







Iwan_Williams
  • Author
  • New Participant
  • September 30, 2014
Hi Hua!

I have ensured that the RStudio session has those variables and also the user too but to no avail. I get the error in both RStudio and the R console.

Forum|alt.badge.img+2
  • Participating Frequently
  • October 1, 2014
Well then, would you mind to post your odbc.ini and vertica.ini file here?

I suspect it has something to do with your odbc.ini file. Because the error indicates not enough information is provided for the connection to start. 



Iwan_Williams
  • Author
  • New Participant
  • October 8, 2014

Of course. Bear in mind that I'm using the same ini files when I use dbadmin and it works. I've also ensured the new account has read access to these too.

odbc.ini

[Test]
Description = vRODBC Test
Driver = /opt/vertica/lib64/libverticaodbc.so
Database = DBNumber01
Servername = SERVER1.DEV.ENV.LOCAL
UserName = getme_access
Password = password123
Port = 5433
ConnSettings =
Locale = en_US

 vertica.ini

[Driver]
DriverManagerEncoding = UTF-16
ODBCInstLib = /usr/lib64/libodbcinst.so
ErrorMessagesPath = /opt/vertica/lib64
LogLevel = 0
LogPath = /tmp


Forum|alt.badge.img+2
  • Participating Frequently
  • October 8, 2014
Thanks, Iwan. How about give this new user write permission to the ini files?

Iwan_Williams
  • Author
  • New Participant
  • October 9, 2014
That seems to have worked! I'm not sure I understand why though!

The process won't be altering anything in th eini files will it?

Thanks for the help though Hua!

Right - on to the next issue!

Iwan