0 votes

Hi All,

I wanted to test exposing an R function. But folowing the manual in version 5.00 I can not run a test query. I have setup an R code env, R recipes work fine.

The log is quit big, the errors I get are given in the text below. When following the example for a custom python function everything goes fine,

Any thoughts?

Cheers, Longhow

 

[2018/07/30-16:25:36.027] [KNL-r-single-command-kernel-out-134] [INFO] [dku.utils]  - > setTCPNoDelay(con, value=TRUE)[2018/07/30-16:25:36.028] [KNL-r-single-command-kernel-err-135] [INFO] [dku.utils]  - Error in setTCPNoDelay(con, value = TRUE) : [2018/07/30-16:25:36.028] [KNL-r-single-command-kernel-err-135] [INFO] [dku.utils]  -   Socket operation on non-socket[2018/07/30-16:25:36.028] [KNL-r-single-command-kernel-err-135] [INFO] [dku.utils]  - Execution halted[2018/07/30-16:25:36.033] [KNL-r-single-command-kernel-monitor-133] [INFO] [dku.kernels]  - Process done with code 1[2018/07/30-16:25:36.033] [qtp1315795813-102] [DEBUG] [dku.tracing]  - [ct: 237] Done call: /admin/api/services/{serviceId}/actions/switchToNewest [POST] time=237ms user=none [serviceId=rtest] thrown=EOFException[2018/07/30-16:25:36.034] [qtp1315795813-102] [ERROR] [dku.lambda.api]  - API call '/admin/api/services/rtest/actions/switchToNewest' failedjava.io.EOFException	at com.dataiku.dip.io.SocketBlockLink.receiveInt(SocketBlockLink.java:329)	at com.dataiku.dip.io.SocketBlockLink.receiveStringResponse(SocketBlockLink.java:133)	at com.dataiku.dip.io.SecretProtectedKernelLink.waitForProcess(SecretProtectedKernelLink.java:40)	at com.dataiku.dip.io.SecretProtectedKernelLink.waitForProcess(SecretProtectedKernelLink.java:48)	at com.dataiku.dip.io.RSecretProtectedKernel.start(RSecretProtectedKernel.java:57)	at com.dataiku.lambda.endpoints.rfunction.RFunctionPipeline.<init>(RFunctionPipeline.java:39)	at com.dataiku.lambda.endpoints.rfunction.RFunctionEndpointHandler.instantiatePipeline(RFunctionEndpointHandler.java:52)	at com.dataiku.lambda.endpoints.rfunction.RFunctionEndpointHandler.instantiatePipeline(RFunctionEndpointHandler.java:22)	at com.dataiku.lambda.endpoints.pool.PipelinePool.acquire(PipelinePool.java:168)	at com.dataiku.lambda.endpoints.pool.PipelinePool.init(PipelinePool.java:67)	at com.dataiku.lambda.endpoints.rfunction.RFunctionEndpointHandler.init(RFunctionEndpointHandler.java:47)	at com.dataiku.lambda.services.ServiceManager.mount(ServiceManager.java:310)	at com.dataiku.lambda.services.ServiceManager.mountIfNeeded(ServiceManager.java:357)	at com.dataiku.lambda.services.ServicesService.setMapping(ServicesService.java:268)	at com.dataiku.lambda.services.ServicesService.switchToSingleGeneration(ServicesService.java:311)	at com.dataiku.lambda.services.ServicesService.switchToNewestGeneration(ServicesService.java:298)	at com.dataiku.lambda.admin.ServicesAdminController.switchToNewest(ServicesAdminController.java:211)	at com.dataiku.lambda.admin.ServicesAdminController$$FastClassBySpringCGLIB$$3c7950d9.invoke(<generated>)	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:701)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)	at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)	at com.dataiku.lambda.LambdaCallTracingAspect.doCall(LambdaCallTracingAspect.java:72)	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	at java.lang.reflect.Method.invoke(Method.java:498)	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)	at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:633)	at com.dataiku.lambda.admin.ServicesAdminController$$EnhancerBySpringCGLIB$$6eba6b7.switchToNewest(<generated>)	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	at java.lang.reflect.Method.invoke(Method.java:498)	at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)	at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:440)	at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:428)	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:933)	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:867)	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:951)	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:853)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:827)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:738)	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:551)	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1111)	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:478)	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1045)	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)	at org.eclipse.jetty.server.Server.handle(Server.java:462)	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:279)	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:232)	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:534)	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607)	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536)	at java.lang.Thread.run(Thread.java:748)[2018/07/30-16:25:36.040] [qtp1315795813-120] [DEBUG] [dku.tracing]  - [ct: 1] Start call: /public/api/v1/ping [POST] user=none[2018/07/30-16:25:36.040] [qtp1315795813-120] [DEBUG] [dku.tracing]  - [ct: 1] Done call: /public/api/v1/ping [POST] time=1ms user=non
asked by
Hello, Can you please provide the full log for this error?
The full log is more than 12000 characters long. So here is the part with the error:

[2018/07/30-22:18:08.217] [KNL-r-single-command-kernel-out-38] [INFO] [dku.utils]  - > setTCPNoDelay(con, value=TRUE)
[2018/07/30-22:18:08.218] [KNL-r-single-command-kernel-err-39] [INFO] [dku.utils]  - Error in setTCPNoDelay(con, value = TRUE) :
[2018/07/30-22:18:08.218] [KNL-r-single-command-kernel-err-39] [INFO] [dku.utils]  -   Socket operation on non-socket
[2018/07/30-22:18:08.218] [KNL-r-single-command-kernel-err-39] [INFO] [dku.utils]  - Execution halted
[2018/07/30-22:18:08.223] [KNL-r-single-command-kernel-monitor-37] [INFO] [dku.kernels]  - Process done with code 1
[2018/07/30-22:18:08.223] [qtp1315795813-22] [DEBUG] [dku.tracing]  - [ct: 17736] Done call: /admin/api/services/{serviceId}/actions/switchToNewest [POST] time=17736ms user=none [serviceId=rtest] thrown=EOFException
[2018/07/30-22:18:08.227] [qtp1315795813-22] [ERROR] [dku.lambda.api]  - API call '/admin/api/services/rtest/actions/switchToNewest' failed
java.io.EOFException
    at com.dataiku.dip.io.SocketBlockLink.receiveInt(SocketBlockLink.java:329)
    at com.dataiku.dip.io.SocketBlockLink.receiveStringResponse(SocketBlockLink.java:133)
    at com.dataiku.dip.io.SecretProtectedKernelLink.waitForProcess(SecretProtectedKernelLink.java:40)
    at com.dataiku.dip.io.SecretProtectedKernelLink.waitForProcess(SecretProtectedKernelLink.java:48)
    at com.dataiku.dip.io.RSecretProtectedKernel.start(RSecretProtectedKernel.java:57)
    at com.dataiku.lambda.endpoints.rfunction.RFunctionPipeline.<init>(RFunctionPipeline.java:39)
    at com.dataiku.lambda.endpoints.rfunction.RFunctionEndpointHandler.instantiatePipeline(RFunctionEndpointHandler.java:52)
    at com.dataiku.lambda.endpoints.rfunction.RFunctionEndpointHandler.instantiatePipeline(RFunctionEndpointHandler.java:22)
    at com.dataiku.lambda.endpoints.pool.PipelinePool.acquire(PipelinePool.java:168)
    at com.dataiku.lambda.endpoints.pool.PipelinePool.init(PipelinePool.java:67)
    at com.dataiku.lambda.endpoints.rfunction.RFunctionEndpointHandler.init(RFunctionEndpointHandler.java:47)
    at com.dataiku.lambda.services.ServiceManager.mount(ServiceManager.java:310)
    at com.dataiku.lambda.services.ServiceManager.mountIfNeeded(ServiceManager.java:357)
    at com.dataiku.lambda.services.ServicesService.setMapping(ServicesService.java:268)
    at com.dataiku.lambda.services.ServicesService.switchToSingleGeneration(ServicesService.java:311)
    at com.dataiku.lambda.services.ServicesService.switchToNewestGeneration(ServicesService.java:298)
    at com.dataiku.lambda.admin.ServicesAdminController.switchToNewest(ServicesAdminController.java:211)
    at com.dataiku.lambda.admin.ServicesAdminController$$FastClassBySpringCGLIB$$3c7950d9.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:701)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
    at com.dataiku.lambda.LambdaCallTracingAspect.doCall(LambdaCallTracingAspect.java:72)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
    at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:633)
    at com.dataiku.lambda.admin.ServicesAdminController$$EnhancerBySpringCGLIB$$6eba6b7.switchToNewest(<generated>)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
    at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:440)
    at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:428)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:933)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:867)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:951)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:853)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:827)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:738)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:551)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1111)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:478)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1045)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
    at org.eclipse.jetty.server.Server.handle(Server.java:462)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:279)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:232)
    at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:534)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536)
    at java.lang.Thread.run(Thread.java:748)
[2018/07/30-22:18:08.243] [qtp1315795813-23] [DEBUG] [dku.tracing]  - [ct: 1] Start call: /public/api/v1/ping [POST] user=none
[2018/07/30-22:18:08.243] [qtp1315795813-23] [DEBUG] [dku.tracing]  - [ct: 1] Done call: /public/api/v1/ping [POST] time=1ms user=none
Hello, We need the full log to diagnose what is going on. Can you please paste the full log in a text editor, save it as a file, and use a file transfer service such as WeTransfer to include it in this thread? Thank you, Alexandre
Hi, Thanks we'll investigate and get back to you. Do R notebooks work correctly?
Yes, notebooks are working fine.
Could you replay these steps: https://doc.dataiku.com/dss/latest/installation/r.html and try again? If you encounter a new error, please send the full log gain. Thanks!

1 Answer

0 votes
For a R function endpoint, you need the "gtools" package in the code environment
answered by
I installed gtools, but I am getting a different error now.

[2018/08/14-21:22:04.058] [KNL-r-single-command-kernel-out-45] [INFO] [dku.utils]  - > setTCPNoDelay(con, value=TRUE)
[2018/08/14-21:22:04.059] [KNL-r-single-command-kernel-err-46] [INFO] [dku.utils]  - Error in setTCPNoDelay(con, value = TRUE) :
[2018/08/14-21:22:04.059] [KNL-r-single-command-kernel-err-46] [INFO] [dku.utils]  -   Socket operation on non-socket
[2018/08/14-21:22:04.059] [KNL-r-single-command-kernel-err-46] [INFO] [dku.utils]  - Execution halted
[2018/08/14-21:22:04.064] [KNL-r-single-command-kernel-monitor-44] [INFO] [dku.kernels]  - Process done with code 1
[2018/08/14-21:22:04.064] [qtp1315795813-31] [DEBUG] [dku.tracing]  - [ct: 20881] Done call: /admin/api/services/{serviceId}/actions/switchToNewest [POST] time=20880ms user=none [serviceId=rtest] thrown=EOFException
[2018/08/14-21:22:04.065] [qtp1315795813-31] [ERROR] [dku.lambda.api]  - API call '/admin/api/services/rtest/actions/switchToNewest' failed
java.io.EOFException
944 questions
978 answers
996 comments
2,162 users

©Dataiku 2012-2018 - Privacy Policy