Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

CDSW Job Exits with "Engine exited with status 2." on Importing

avatar
Explorer

Hi,
I am getting the following error on Importing R globalenv module with Python3, other modules are importing fine. 
Error comes on following modules:
from rpy2.robjects import globalenv
import rpy2.robjects as robjects
from rpy2.robjects.packages import importr
from rpy2.robjects import pandas2ri

import os

for key in os.environ:
    if key in ['R_LIBS', 'LD_LIBRARY_PATH', 'R_HOME']:
        print(key, '=>', os.environ[key])
LD_LIBRARY_PATH => /data/cloudera/parcels/CDH-7.1.7-1.cdh7.1.7.p78.21656418/lib/hadoop/lib/native:/data/cloudera/parcels/PTY_BDP-7.2.0.26_CDP7.p0/jpeplite/lib/*:/data/cloudera/parcels/PTY_BDP-7.2.0.26_CDP7.p0/pepspark/lib/*:/data/cloudera/parcels/PTY_BDP-7.2.0.26_CDP7.p0/pephive/lib/*:/usr/lib/x86_64-linux-gnu/:/usr/local/lib/R/lib/
R_LIBS => /usr/lib/x86_64-linux-gnu/:/usr/local/lib/R/lib/:/home/cdsw/R:/usr/local/lib/R/library
R_HOME => /usr/local/bin/R
import rpy2
from rpy2 import situation
from rpy2.robjects import globalenv
Engine exited with status 2.

 
Configurations used:

DataSphereX_0-1679034176937.png

 

These Environment variables are important cannot change that,
I have tried running the code from CDSW sessions and even through python shell of my docker container that works fine. 
I cannot find any documentation regarding this particular error.
There is another solved question on the community: Workbench-exits-every-time-lm-fit-command-is-run-in-python-2/td-p/60758 
My job Engine is : Base Image v15 , docker repository engine:15
Don't have Admin rights so reinstalling R and other stuff is not possible. 

Any leads are helpful 
Thanks

1 ACCEPTED SOLUTION

avatar
Explorer

Solved

R_HOME was not setup properly, I set the environment variable to /usr/local/lib/R and that solved the problem. 

View solution in original post

1 REPLY 1

avatar
Explorer

Solved

R_HOME was not setup properly, I set the environment variable to /usr/local/lib/R and that solved the problem.