•   over 5 years ago

Connect to Biginsight from desktop RStudio


I triy to connect to Biginsight from desktop RStudio. I follow these instructions: https://www.ibm.com/developerworks/community/blogs/a4hblogs/entry/how_to_connect_to_analytics_for_hadoop_bigr_from_local_rstudio?lang=en

Unfortunatelly I can't do the 6. steps. In Biginsight the connection works but in Rstudio doesn't. My parameteres are:

bigr.connect(host="bi-hadoop-prod-365.services.dal.bluemix.net", 7052, "default", user="biblumix", password="xxmypasswordxx")
Error: BigR[bigr.connect]: Connection could not be established. Verify connection parameters.

What could be wrong?



  •   •   over 5 years ago

    Try stoping and restarting the BIg SQL scheduler on the big insights cluster tab. I had the same issue and this worked.

  •   •   over 5 years ago

    Thanks! I tired it, but doesn't work :)

  •   •   over 5 years ago

    It takes several minutes for the service to get back up and running after stopping. Make sure it is running before trying to connect through R Studio.

  •   •   over 5 years ago

    Hi Melinda, I was able to connect to your cluster from local RStudio. Make sure you enter the correct biblumix password from your A4H service page.
    > library(bigr)
    Loading required package: rJava
    > bigr.connect(host="bi-hadoop-prod-365.services.dal.bluemix.net", 7052, "default", user="biblumix", password="ReplaceWithBiblumixPasswordOnA4HPage")
    > is.bigr.connected()
    [1] TRUE

  •   •   over 5 years ago


    I think the problem is rJava :)
    I followed the steps from: https://www.ibm.com/developerworks/community/blogs/a4hblogs/entry/how_to_connect_to_analytics_for_hadoop_bigr_from_local_rstudio?lang=en

    1.) I set in rStudio base64enc, rJava, data.table and finally the bigr package.
    The error message is:

    Error : package 'rJava' could not be loaded
    ERROR: lazy loading failed for package 'bigr'
    * removing 'C:/Users/Melinda/Documents/R/win-library/3.1/bigr'
    * restoring previous 'C:/Users/Melinda/Documents/R/win-library/3.1/bigr'
    Warning in install.packages :
    running command '"C:/PROGRA~1/R/R-31~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\Melinda\Documents\R\win-library\3.1" "C:/Users/Melinda/Downloads/bigr-1.0.tar.gz"' had status 1
    Warning in install.packages :
    installation of package ‘C:/Users/Melinda/Downloads/bigr-1.0.tar.gz’ had non-zero exit status

    2.) I found the sollution on Internet. I set JAVA-HOME (didnt work), but finaly I used this code from: http://stackoverflow.com/questions/7019912/using-the-rjava-package-on-win7-64-bit-with-r

    if (Sys.getenv("JAVA_HOME")!="")

    3.) After that the bigR package setings was OK.

    Or not? :) because I can't connect bluemix?

    Sorry, I'm not IT expert, just a transport modeller with IT and data curiosity! (beginner)

    Thanks for your all help!

  •   •   over 5 years ago

    Hi Melinda, Can you please try these steps :
    1. Make sure Oracle Java 7 is set in your JAVA_HOME and path. What Java version do you use ? Please try with Oracle Java 7. Also , ensure that its 64 bit or 32 bit Java pertaining to your environment. As the stackoverflow link states , you can set JAVA_HOME inside R in the following way
    Sys.setenv(JAVA_HOME="C:\\Program Files\\Java\\jre7\\")
    options(java.home="C:\\Program Files\\Java\\jre7\\")
    2. One more thing : please make sure the underlying R in your environment is either 32 bit or 64 bit and not both. If you have installed for both, uninstall R and then re-install only one.
    Hope this helps and let me know .

  •   •   over 5 years ago

    Hi Rakhi,
    your last instructions were helpful :) Connection is working. I can continue the next challenge in this topic.
    Many thanks!

Comments are closed.