1
votes

I am using https://github.com/chitika/cberl.

My current application version is 1.2.1. Which is running fine. I created a new release 1.2.2 which upgraded fine. But when I started a new instance it failed on 1.2.2. It keep on throwing cberl error.

If I start my prev release 1.2.1 and then upgrade it to 1.2.2 again then it works fine. But starting from scratch doesn't.

My application (say test) failed to start. Command I used : bin/test console.

OTP version used : 18.2.
Compiled on OTP 18.2.
Linux version : 3.2.0-4-amd64 #1 SMP Debian 3.2.63-2 x86_64 GNU/Linux.

The full error message:

erl_crash.dump Slogan: Kernel pid terminated (application_controller) ({application_start_failure,kernel,{{shutdown,{failed_to_start_child,kernel_safe_sup,{on_load_function_failed,cberl_nif}}},{kernel,start,[normal,[]]}}} System version: Erlang/OTP 18 [erts-7.2] [source] [64-bit] [smp:16:16] [async-threads:10] [kernel-poll:true]

Things I tried till now:

1) I checked my libcouchbase. It is installed.

2

2 Answers

1
votes

It looks like the cberl_nif is compiled with two different versions of Erlang.

The Erlang version you are running seem to be 18.2, and the one used for compiling cberl_nif is 18 . So the NIF interface will have different versions resulting in the error message you see.

So, if you rebuild from scratch make sure all caches are cleaned and rebuild again. Especially all .so and .o files.

0
votes

So, I was able to solve this problem. I was an erlang library mismatch. Thanks to @fredrikvensson I was able to solve it. I was intended to use OTP 15 but had 17.