Failure in UDx RPC call InvokeSetExecContext()
When running the demo code for a user defined function in R, it produces the following error. This error is not documented anywhere in the documentation, does anyone have any idea what it means? (This used to work, but now fails, so our production servers are all down). dbadmin=> create library mark as '/home/dbadmin/v_lib/R/mul.r'; ROLLBACK 3399: Failure in UDx RPC call InvokeSetExecContext(): Error calling setupContext() in User Defined Object [] at [/scratch_a/release/vbuild/vertica/UDxFence/vertica-udx-C++.cpp:132], error code: 0, message: Error happened in dlopen(): [/home/dbadmin/v_lib/R/mul.r: invalid ELF header]
0
Comments
I tried to create a library with the information that we needed:
CREATE LIBRARY PIEXPFunctions AS '/opt/vertica/udflib/piexp_udf.so' ;ROLLBACK 3399: Failure in UDx RPC call InvokeSetExecContext(): Error calling setupContext() in User Defined Object [] at [/scratch_a/release/vbuild/vertica/UDxFence/vertica-udx-C++.cpp:132], error code: 0, message: Error happened in dlopen(): [/opt/vertica/udflib/piexp_udf.so: file too short]
I have tried this a number of ways but it is not clear what is too short. It is a brand new / empty lib file.
Any help you could give would be greatly appreciated. Thanks.
--Matthew
Check dlopen outside to Vertica.
source code - http://pastebin.com/kK0Z8CT1 (file: /tmp/dl.cpp)
compile: verify:
PS
Function/Library Gaussian.so you can find here - http://pastebin.com/gDPcQTE5
but you should define your path to "piexp_udf.so" instead of "/tmp/Gaussian.so" in line:
Path for UDF isn't important. Vertica runs with root privileges so UDF can be located in any path.
When you creates a library from UDF, Vertica copies an UDF to appropriate folder.
Example:
I created an UDF - NormalDistribution.cpp(see link from my post above), compiled a library with name Gaussian.so as you can see Vertica puts a library to catalog folder.
PS
And I did a test - compiled as root and as regular user - no difference, everything works fine.
BTW: I suggested to check dlopen outside to Vertica just to check that library coded and compiled well.
Also check linker, sometimes GNU linker can't find a library to link UDF.
Example: Regards
Hi, I received this error message when trying to install the PlaceLib. In my situation, vertica is installed in a three node cluster, however, the installation seems to be failed in one of the node. My error message looks like below:
\i install.sql
CREATE TYPE
CREATE TYPE
vsql:install.sql:12: ROLLBACK 2175: An error occurred when loading library file on node v_bamboo_node0002, message:
Failure in UDx RPC call InvokeSetExecContext(): Error calling setupExecContext() in User Defined Object [] at [/scratch_a/release/30493/vbuild/vertica/OSS/UDxFence/vertica-udx-C++.cpp:195], error code: 0, message: Error happened in dlopen(): [libgeos_c.so.1: cannot open shared object file: No such file or directory]
vsql:install.sql:19: ROLLBACK 3861: Library not found: public.PlaceLib
vsql:install.sql:20: ROLLBACK 3861: Library not found: public.PlaceLib
vsql:install.sql:21: ROLLBACK 3861: Library not found: public.PlaceLib
vsql:install.sql:22: ROLLBACK 3861: Library not found: public.PlaceLib
vsql:install.sql:23: ROLLBACK 3861: Library not found: public.PlaceLib
vsql:install.sql:24: ROLLBACK 3861: Library not found: public.PlaceLib
vsql:install.sql:25: ROLLBACK 3861: Library not found: public.PlaceLib
vsql:install.sql:26: ROLLBACK 3861: Library not found: public.PlaceLib