Page 1 of 2

Error creating R library

Posted: Tue Mar 12, 2013 4:18 am
by rytaft
I am using the Community Edition of Vertica and trying to create an R library. I followed all of the instructions listed here, and it seems like everything was installed correctly. However, when I try to create the example library, I am getting the following error:

dbadmin=> CREATE LIBRARY rLib AS '/opt/vertica/sdk/examples/RFunctions/RFunctions.R' LANGUAGE 'R';
ROLLBACK 2929: Couldn't create new UDx side process, failed to get UDx side process info from zygote: UDx side process has exited abnormally

I know that they addressed this issue in the documentation as follows:
Note: If you get the following error when attempting to create an R library "ROLLBACK 2929: Couldn't create new UDx side process, failed to get UDx side process info from zygote: UDx side process has exited abnormally", and the corresponding dbLog entry states "cannot find system Renviron", then the R_HOME variable has not been set correctly or it is not being picked up by Vertica.
However, I checked dbLog and did not see anything about system Renviron. I followed all of the instructions to set the R_HOME variable. Is there any other issue that could be causing this error, or any way I can confirm if R_HOME was set correctly in Vertica?

Re: Error creating R library

Posted: Tue Mar 12, 2013 11:57 am
by id10t
Hi!

Probably it's because you installed R package from repository too. Vertica comes with it own instance of R.
Uninstall R package from repository and clean all environment variables after it.
Should help.

PS Community edition supports R? I know that by docs - yes, but in forum of my.vertica.com :
@Francesco >> This means that R UDFs are not available in the community edition?

@andrew >> Sadly, yes that is true. If you wish to help influence this decision, I would be most appreciative if you sent me email with your usecase so I can be more well informed in discussions with our Product Management and Sales about it.

Re: Error creating R library

Posted: Tue Mar 12, 2013 3:33 pm
by rytaft
Thanks so much for your response, but actually I did not install R other than using the Vertica Udx R instructions. Any other ideas about what the problem might be?

I think the Community Edition does support R since the CE 6.0 manual includes a whole section on Developing a User Defined Function in R. Maybe that forum post is for an older version?

Re: Error creating R library

Posted: Tue Mar 12, 2013 9:08 pm
by rytaft
I figured out the problem! I was looking through log files trying to solve this problem, and I noticed that the following line kept appearing in /home/dbadmin/dbadmin/dbLog:
/opt/vertica/bin/vertica-udx-R: error while loading shared libraries: libmsgpack.so.3: cannot open shared object file: No such file or directory

It turns out that I did not copy the libmsgpack.so file to the correct directory after building it. Once I realized this, I copied libmsgpack.so.3.0.0 to /usr/lib64 and added symbolic links for libmsgpack.so.3 and libmsgpack.so. Now it works perfectly!

Re: Error creating R library

Posted: Fri Mar 15, 2013 12:30 pm
by id10t
Hi!

Thanx for sharing a solution!

---
Daniel

Re: Error creating R library

Posted: Fri Apr 05, 2013 10:58 am
by ravivj
Hi All,

I am trying to create R library in 6.1.1. Getting the dreaded “failed to get UDx side process info from zygote” error. Db logs read “cannot find system Renviron. Fatal error: unable to open the base package”. No "libmsgpack.so.3' error as well. Referring to this documentation :

https://my.vertica.com/docs/6.1.x/HTML/ ... #17824.htm

The docs don’t mention setting R_HOME anywhere. Have also tried setting R_HOME to /opt/vertica/R and /opt/vertica/R/lib to no avail. Any help would be appreciated.

Also the R shell(/opt/vertica/R/bin/R) works fine. I get a "WARNING: ignoring environment value of R_HOME" while starting the R shell if R_HOME is set.

Re: Error creating R library

Posted: Fri Apr 05, 2013 6:29 pm
by fsalvelt
# ravivj,

A lot of folks have issues if they've installed the both the standard R language rpm and the Vertica R language rpm.

You don't have both installed, right?