goncalotomas / FMKe

🛠️ Realistic benchmark for key value stores
Other
23 stars 8 forks source link

Instructions for running the benchmark in multiple databases #201

Closed yunhaom94 closed 5 years ago

yunhaom94 commented 5 years ago

Hello,

Sorry if this sounds trivial. I'm new to erlang and trying to compare perfomance of my Redis(geo-replicatied CRDB) set-up and AntidoteDB set-up. I read the documention and don't understand how should I run it, I tried to make bench-redis but turns out travis.sh is missing and I don't know how to connect to my running Redis server.

Thank you.

goncalotomas commented 5 years ago

Hi!

You're completely right. I checked and there were some changes that have broken the previous bench-redis Makefile target, and this makes some of the existing documentation outdated. I'll try to see if I can help you benchmark both systems while I fix the issue.

I see that you've forked Redis, and I would like to know if your Redis database is compatible with the Redis Cluster protocol. If so, then we can use the existing drivers for it.

Here are some instructions to run the FMKe benchmark.

Software you will need:

To compare the results of multiple databases you can follow these steps:

  1. Launch your Redis instances and set them up as a cluster
  2. [FMKe application server]: configure config/fmke.config too look something like this, changing the port numbers according to your deployment
  3. [FMKe application server]: Run rebar3 shell on a terminal, this will run the FMKe application server
  4. Compile fmke_populator, it will serve to populate the database through the FMKe server before the benchmark.
  5. [fmke_populator]: Run ./_build/default/bin/fmke_populator fmke@127.0.0.1. It might take a few minutes but it will populate your Redis cluster through the already running FMKe application server.
  6. Compile fmke_client. This is the part of the benchmark that will now generate load and measure the performance of the database. If you are running the setup in localhost with the fmke.config file I provided, you don't need to change the configuration.
  7. [fmke_client]: Run ./_build/default/bin/lasp_bench fmke_client.config. This will start the benchmark and will keep going for 20 minutes (configurable in config/fmke_client.config). After it is done, you can use make results and that will run an R script that will generate graphs from the benchmark that you just run. Give this file an appropriate name so that you don't forget which configuration was used to generate those results.
  8. [fmke_client]: Repeat the above steps for any supported database that you want to compare your version of Redis with (or even a vanilla version of Redis Cluster!).

Once you're able to do these tests, you can distribute the components through different machines and the only thing you'll need to change are some configuration files.

Please let me know if you have any issues going through these steps!

yunhaom94 commented 5 years ago

Thanks! I will try it later and report any problems.

yunhaom94 commented 5 years ago

Hi,

I am actually testing Redis Enterprise's CRDB, but it still running on Redis clusters anyway so I think it should work.

Also I'm at step 3 and got the following error after rebar3 shell, I'm running erlang 21 and latest binary of rebar3.

...
===> Booted runtime_tools
===> Booted tools
===> Booted poolboy
===> Booted syntax_tools
===> Booted compiler
===> Booted goldrush
===> Booted lager
===> Booted cowlib
===> Booted ranch
===> Booted cowboy
===> Booted jsx
===> Booted antidote_pb_codec
===> Booted antidotec_pb
===> Booted riak_pb
===> Booted riak_client
===> Booted eredis
===> Booted eredis_cluster
===> Booted fmke
00:14:51.394 [error] CRASH REPORT Process eredis_cluster_monitor with 0 neighbours exited with reason: bad return value: {error,cannot_connect_to_cluster} in gen_server:init_it/6 line 366
00:14:51.394 [error] Supervisor eredis_cluster_sup had child eredis_cluster_monitor started with eredis_cluster_monitor:start_link() at undefined exit with reason bad return value: {error,cannot_connect_to_cluster} in context start_error
00:14:51.395 [error] CRASH REPORT Process <0.836.0> with 0 neighbours exited with reason: {{shutdown,{failed_to_start_child,eredis_cluster_monitor,{bad_return_value,{error,cannot_connect_to_cluster}}}},{eredis_cluster,start,[normal,[]]}} in application_master:init/4 line 138
00:14:51.401 [info] Application eredis_cluster exited with reason: {{shutdown,{failed_to_start_child,eredis_cluster_monitor,{bad_return_value,{error,cannot_connect_to_cluster}}}},{eredis_cluster,start,[normal,[]]}}

Thanks!

goncalotomas commented 5 years ago

Hmm, this seems to be a problem with the eredis_cluster library, which apparently is not being able to connect to your cluster. Do you know how to use the Redis Cluster version instead of the Redis Enterprise CRDB?

If you are able to use it with Redis Cluster but not with the Enterprise version, then it means that either the communication protocol is different, or that some unexpected error is not allowing eredis_cluster to start. Would it be OK to ask you to try configuring a Redis Cluster and trying FMKe with that? We've been running several tests with it and we have not had issues. I ask this because I assume since it is an enterprise version that I might need some sort of license to use it. If that's not the case and you can link me some documentation I'd be happy to try it out myself.

Thanks for sticking with me.

yunhaom94 commented 5 years ago

So I tried using open sourced Redis version 4.0.10 and set-up a cluster, FMKe application server seemed to be able to connect(No more errors after ===> Booted fmke), however step 5 failed again with another connection error.

$./_build/default/bin/fmke_populator fmke@127.0.0.1
Using opts=[{cookie,fmke},
            {dataset,"standard"},
            {force,false},
            {nodename,'fmke_populator@127.0.0.1'},
            {procs,100},
            {queue,100},
            {retries,3},
            {timeout,10},
            {update,10},
            {skip_prescriptions,false},
            {only_prescriptions,false}]
=INFO REPORT==== 15-Oct-2018::22:39:37.366588 ===
Protocol 'inet_tcp': register/listen error: econnrefused

=SUPERVISOR REPORT==== 15-Oct-2018::22:39:37.366775 ===
    supervisor: {local,net_sup}
    errorContext: start_error
    reason: {'EXIT',nodistribution}
    offender: [{pid,undefined},
               {id,net_kernel},
               {mfargs,{net_kernel,start_link,
                                   [['fmke_populator@127.0.0.1',longnames],
                                    false]}},
               {restart_type,permanent},
               {shutdown,2000},
               {child_type,worker}]
Error: unable to start distributed erlang node: {{shutdown,
                                                  {failed_to_start_child,
                                                   net_kernel,
                                                   {'EXIT',nodistribution}}},
                                                 {child,undefined,
                                                  net_sup_dynamic,
                                                  {erl_distribution,
                                                   start_link,
                                                   [['fmke_populator@127.0.0.1',
                                                     longnames],
                                                    false]},
                                                  permanent,1000,supervisor,
                                                  [erl_distribution]}}

Here is the fmke.config

{database_addresses, ["172.17.0.2"]}.
{database_ports, [15399]}.
{target_database, redis}.
{optimized_driver, true}.
{data_model, non_nested}.
{connection_pool_size, 1}.
{http_port, 9090}.

As for CRDB, it's from RedisLab's Redis Enterpise, which is basically another layer on top of Redis cluster that connect many clusters and replicate the dabase between them for geo-replication. There is a trial version which I am using, and I followed these two instructions: https://redislabs.com/redis-enterprise-documentation/getting-started/docker/linux/ https://redislabs.com/redis-enterprise-documentation/administering/database-operations/create-crdb/ and setting up 2 clusters running in docker for testing. I ran YCSB before on it and it was successful.

On thing I suspect is that maybe FMKe is sending commands that are not allowed by CRDB and will return error but I don't know enough erlang to check that 🙃.

Thanks a lot for your help, I greatly appreciate it since you have the only Benchmark that supports the databases I need to test.

goncalotomas commented 5 years ago

There are some clues as to what is happening on the traces you've provided. Since we last spoke I was told by a Redis Labs employee that the protocols that Redis Cluster and Redis Enterprise CRDB speak are supposed to be compatible. So we can rule out issues in the client library (for now).

One thing we can do to check connectivity between FMKe and Redis is to execute some command once FMKe boots up (press ENTER once you see the "Booted fmke" message to see the shell prompt:

===> Booted fmke
1> fmke:get_patient_by_id(1).
{error,not_found}
2> fmke:create_patient(1, "Jerry Smith", "Vancouver, BC").
ok
3> fmke:get_patient_by_id(1).
{patient,1,"Jerry Smith","Vancouver, BC",[]}

This will serve as a definite test that you can now speak to Redis Enterprise CRDB successfully.

With regards to the error that you're seeing, it seems to be more easily fixed. You see, Erlang nodes are able to connect to other nodes via a distributed communication layer, which is provided by epmd. What seems to be happening is that fmke_populator is trying to communicate with the application server and is failing because the distribution layer is not running. This typically manifests itself with the reason: {'EXIT',nodistribution} that I see in the error trace you provided.

To fix the issue, running epmd -daemon before starting both components should be enough. This way, both components will be able to find and communicate with each other.

I am updating the Wiki pages with information relative to the difficulties you're facing, since others are likely to bump into them as well. Thanks for sticking with me so far :)

yunhaom94 commented 5 years ago

fmke_populator gives me this error now

Booted distributed erlang node 'fmke_populator@127.0.0.1', using cookie fmke
Error: could not ping FMKe node: 'fmke@127.0.0.1'

Sorry for the late reply, having a busy week, I will try the CRDB test later and update.

goncalotomas commented 5 years ago

No problem. Are you running the FMKe application server and fmke_populator in the same machine? Were both running when you tried using fmke_populator?

yunhaom94 commented 5 years ago

Yes both were correct.

goncalotomas commented 5 years ago

This is strange. If the application server is running, then the populator app should have been able to find it.

When you see the ===> Booted fmke message, if you press ENTER, what is the prompt text? Is it fmke@127.0.0.1 or something else?

yunhaom94 commented 5 years ago

It shows 1> image

goncalotomas commented 5 years ago

Argh, this one is totally my fault, sorry! That was not supposed to happen. I had thought I had there was a default nodename fmke@127.0.0.1but apparently it is not set. To confirm this you can runnode().on that same shell and you will likely seenonode@nohost`.

This means that your rebar3 shell command that you run in step 3 should be replaced by rebar3 shell --name fmke@127.0.0.1. That way, the FMKe application will start a distributed Erlang node with the specified name, which is exactly what the populator is looking for.

I'm going to edit the instructions to reflect this change.

yunhaom94 commented 5 years ago

I was able to connect FMKe server to Redis Cluster now (I tried the commands from https://github.com/goncalotomas/FMKe/issues/201#issuecomment-430209913 in shell, they worked), however the populator still won't connect to FMKe node because it is refused somehow. 1

I am still not be able to run FMKe with Redis Enterprise version, FMKe exit with same error message. None of the commands work either.

goncalotomas commented 5 years ago

On one hand, great. The existing driver seems to work with Redis Enterprise. Now to fix the link between the application server and the populator.

The fmke_populator is not being able to connect to the application server because despite being able to reach it, it does not have a properly configured cookie (read this for more info). I have several instances where I am setting this value, but rebar3 shell is apparently not reading this configuration. I have written a patch that is pending CI tests that will fix this issue by adding specific defaults to both the nodename (previously nonode@nohost) and cookie (previously unset). GitHub seems to be going some issues, but once this PR is tested I will report back once done.

I have tested these new changes and I can confirm that the shell now has a correct cookie and nodename value and the populator is able to connect to it.

yunhaom94 commented 5 years ago

On one hand, great. The existing driver seems to work with Redis Enterprise. Now to fix the link between the application server and the populator.

Sorry I should mention that Redis Cluster is not with Enterprise instead the open-source version! I am testing both versions at the same time to figure out how FMKe works and how to make it work with Redis Enterprise CRDB. So I was reporting two things in my replies.

And right now connecting to Redis Enterpise still yeild errors in https://github.com/goncalotomas/FMKe/issues/201#issuecomment-429595398 .

goncalotomas commented 5 years ago

No problem, as I got informal confirmation from the Chief Developers Advocate at Redis Labs that the protocols are basically the same, so we should not have any issues with the existing driver.

As for the other changes that were pending, GitHub appears to be stabilised to I merged the changes over to master. When possible you can pull the latest changes from master and try again using only rebar3 shell in step 3. Again, I'll update the instructions above to reflect the recent changes.

Thanks!

yunhaom94 commented 5 years ago

I tried rebar3 shell and it was able started FMKe node correctly, the poplulator was able to connect but crashed immdetaly after 1

goncalotomas commented 5 years ago

I think I might have an idea why this is failing. Are you running the script on a clean cluster? Does the database contain data (e.g. data inserted through the shell of the application server)?

If you think there might be data already present in the database, you need to use the force flag (-f or --force):

./_build/default/bin/fmke_populator --force fmke@127.0.0.1

This will skip any errors in case the insertion procedure reports an existing record. I will work on a PR in order to add a more understandable error message. Sorry this process has been plagued with errors..

yunhaom94 commented 5 years ago

Ah, there was something in the database, I shall try it now with clean database.

Update: The pupolator worked successfully, I was trying to run the client but got a lot of errors. 1

I copied fmke_client.config to fmke_client's root folder and ran ./_build/default/bin/lasp_bench fmke_client.config

goncalotomas commented 5 years ago

Those benchmark errors are safe to ignore, this is why they are logged as [info].

Your procedure seems correct! Did you let it run for a while? By default the benchmark lasts for 20 minutes, and then you can generate the plots. You will see that there are plots separate successful from failed operations, and you will see that there aren't enough failed operations to visibly appear in the graphs.

Just to make sure you are using the right config, can you post the contents of fmke_client.config that you were passing in to ./_build/default/bin/lasp_bench?

Thanks.

yunhaom94 commented 5 years ago

Ahh, that's good, I'll try it again and report back later! I used the fmke_client.config from ./expamles/fmke_client.config

% Run at max, i.e.: as quickly as possible
{mode, max}.

%% test duration
{duration, 20}.

% Run 16 concurrent clients
{concurrent, 16}.

%% The module name of the driver that Basho Bench will use to generate load.
{driver, lasp_bench_driver_fmke_client}.

%% necessary code to run the client
{code_paths,
  [
    "_build/default/lib/lager",
    "_build/default/lib/unicode_util_compat",
    "_build/default/lib/jsx",
    "_build/default/lib/lasp_bench",
    "_build/default/lib/hackney",
    "_build/default/lib/idna",
    "_build/default/lib/mimerl",
    "_build/default/lib/metrics",
    "_build/default/lib/certifi",
    "_build/default/lib/ssl_verify_fun"
  ]
}.

%%
{key_generator, {int_to_bin_bigendian, {uniform_int, 5000000}}}.

%%
{value_generator, {fixed_bin, 10000}}.

%% Configuration settings for FMK servers.
%% List of server IPs
{fmk_server_ips, ["127.0.0.1"]}.
%% List of HTTP ports to connect (1-to-1 correspondence to above list)
{fmk_server_ports, [9090]}.

{numpatients,1000000}.
{numfacilities,50}.
{numpharmacies,300}.
{numstaff,10000}.
{numprescriptions,5000}.
{zipf_size,5000}.
{zipf_skew,1}.

{operations,[
  {get_pharmacy_prescriptions, 27},
  {get_prescription_medication, 27},
  {get_staff_prescriptions, 14},
  {create_prescription, 8},
  {get_processed_prescriptions, 7},
  {get_patient, 5},
  {update_prescription, 4},
  {update_prescription_medication, 4},
  {get_prescription, 4}
]}.
goncalotomas commented 5 years ago

That is the correct file. You should be able to get some results with that :smile:

yunhaom94 commented 5 years ago

Thanks a lot for the help!I generated the graph, this looks like what it should look like right? 1

I need to try this with AntidoteDB and Riak, I'll let you know if anything wrong. Also Redis Enterprise still doesn't seem to work.

goncalotomas commented 5 years ago

Hey!

Yes, that looks about right. Out of curiosity, what sized cluster did you use, and did you use the durability option? What errors are you getting on Redis Enterprise?

yunhaom94 commented 5 years ago

I am running on a 3 masters+3 slaves cluster with durability created by default create-cluster script in /utils/create-cluster/ of Redis.

For Redis Enterpise, is the same error I posted https://github.com/goncalotomas/FMKe/issues/201#issuecomment-429595398 here.

goncalotomas commented 5 years ago

OK, so I'm going to take a look into it, get a testing license for Redis Enterprise and see what I can do to fix those errors. Thanks for sticking with me.

yunhaom94 commented 5 years ago

Thanks! Although I am running on the trial version of Redis Enterprise, I am not sure if that will affact anything.

======= Update: I am testing AntidoteDB with FMKe and the popluator crashed after running for a few minutes with the following error: https://gist.github.com/yunhaom94/e25abeedcd7e2434d80d2d75be11cdd5

I set up antidoteDB cluster with 2 nodes with docker using the instructions here https://antidotedb.gitbook.io/documentation/

======= Update2: I again ran into problems with Riak, this time the populator crashed immediately. Here are the logs for the populator: https://gist.github.com/yunhaom94/62cc40e80bc825bafedbf78108efe229 and FMKe server: https://gist.github.com/yunhaom94/bab932903c3ca6d572144da00deb46bb

I'm running Riak with single node using docker following instructions here: http://basho.com/posts/technical/running-riak-in-docker/

yunhaom94 commented 5 years ago

Hi, is there any update on the issues I posted?

goncalotomas commented 5 years ago

Not yet. I'll provide an update before the week is out.

goncalotomas commented 5 years ago

Can you describe the exact steps you used to create the Redis CRDB database? I'm following the instructions from here and I am not being able to connect 2 clusters together via the web interface as described (tried in Safari, Firefox and Chrome).

I am getting a browser console error in the step where I connect the 2 different Redis clusters through the "Create CRDB" -> "Geo-Distributed" section.

yunhaom94 commented 5 years ago

That was the insturctions I followed. Make sure the addresses, ports, username and password are correct and all the fields are filled like it's showed on picture. What kind of error are you getting?

goncalotomas commented 5 years ago

Either a 400 Bad Request or a 401 Unauthorised in the last step of the connecting clusters step, when I clickActivate in the form. I'm copy pasting the database and cluster names off of the guide and I've tried many times in different browsers.

goncalotomas commented 5 years ago

using the following commands to start the nodes:

docker run -d --cap-add sys_resource -h rp1_node1 --name rp1_node1 -p 8443:8443 -p 9443:9443 -p 12000:12000 redislabs/redis
docker run -d --cap-add sys_resource -h rp2_node1 --name rp2_node1 -p 8445:8443 -p 9445:9443 -p 12002:12000 redislabs/redis

I'm noticing that once I set the admin details, I get logged out frequently. Is that normal?

yunhaom94 commented 5 years ago

Ah I think you should login to the server one at the time or use incognito mode for one of the server. I noticed that opening multiple broswer windows connecting to different servers causing weird issues with the inferface.

goncalotomas commented 5 years ago

Ok, thanks, going to try that and I'll get back to you soon

goncalotomas commented 5 years ago

Got past that point, but now clicking in Activate gives me a "Cluster memory is fully allocated" error. Have you seen this before?

yunhaom94 commented 5 years ago

I don't think I've seen that, have you changed the memory limit above it?

goncalotomas commented 5 years ago

I did. By default it was 0.1 GiB, I set it to 4 GiB

goncalotomas commented 5 years ago

Regardless of what I put there, I get the same result, despite having enough free memory: https://imgur.com/4UqqKH5 https://imgur.com/3vTa7O4 Googling for the error didn't help much either I'm afraid...

goncalotomas commented 5 years ago

Just to be sure I'm not being silly, can you show me the form data that you're submitting? Do you have to add cluster1.local and cluster2.local in /etc/hosts or something? Other than that, the credentials that you put in the interface don't have to be real right? I've tried multiple combinations with no luck so far :(

yunhaom94 commented 5 years ago

image I just tried it and this worked you don't need special hosts for running locally, I am not sure why are you seeing that error... maybe is a mac problem? I am running on a Ubuntu 18.04 Virtual Machine and there is no problem.

goncalotomas commented 5 years ago

I will create a VM with Ubuntu first thing tomorrow morning and I'll check back. Once you got past this point, what were you configuring in fmke.config? Which port did you select? The endpoint port?

yunhaom94 commented 5 years ago

That is correct.

goncalotomas commented 5 years ago

Tried in Ubuntu and I was able to get a database created immediately. Once I got past yesterday's errors, and I got to the cannot_connect_to_cluster like you did.

I think the first clue to what is happening is when you try to run cluster commands in the console directly:

goncalo@goncalotomas:~/git/FMKe$ docker exec -it rp1_node1 bash
root@rp1_node1:/opt# sudo /opt/redislabs/bin/redis-cli -p 12000
127.0.0.1:12000> SLOTS
(error) ERR unknown command 'SLOTS'
127.0.0.1:12000> CLUSTER SLOTS
(error) ERR command is not allowed
127.0.0.1:12000>

I think this is the first command ran by FMKe's Redis Cluster dependency, hence the failure. The interesting part is that the cluster operations seem to be disabled on this endpoint. Once you connect to this endpoint, you seem to be able to use the same interaction as if you were talking to a single master Redis node through redis-cli. I've found this to be the case testing the following:

goncalo@goncalotomas:~/git/FMKe$ erl -pa _build/default/lib/*/ebin
Erlang/OTP 21 [erts-10.1] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1]

Eshell V10.1  (abort with ^G)
1> {ok, C} = eredis:start_link("localhost", 12000).
{ok,<0.77.0>}
2> {ok, undefined} = eredis:q(C, ["GET", "foo"]).
{ok,undefined}
3> {ok, <<"OK">>} = eredis:q(C, ["SET", "foo", "bar"]).
{ok,<<"OK">>}
4> {ok, <<"bar">>} = eredis:q(C, ["GET", "foo"]).
{ok,<<"bar">>}
5> HashObj = ["id", "objectId", "message", "message", "receiver", "receiver", "status", "read"].
["id","objectId","message","message","receiver","receiver",
 "status","read"]
6> eredis:q(C, ["HMSET", "key" | HashObj]).
{ok,<<"OK">>}
7> {ok, Values} = eredis:q(C, ["HGETALL", "key"]).
{ok,[<<"receiver">>,<<"receiver">>,<<"message">>,
     <<"message">>,<<"id">>,<<"objectId">>,<<"status">>,
     <<"read">>]}

Now we're getting somewhere. The driver for Redis Cluster uses eredis_cluster, a dependency that adds a bunch of cluster commands and wraps around the eredis module, providing redirects when needed (which now don't work for Redis CRDB). What I think I need to do is duplicate my existing driver for Redis Cluster, and use eredis instead of eredis_cluster.

I need support for Redis CRDB so this is definitely on the todo list. Once I am able to get a working driver (I'm going to make some other changes as well) I'll ping you, and then you can test again. I count on getting this done today.

Again, you've stuck with me this far. Thanks, it means a lot.

yunhaom94 commented 5 years ago

I saw you pull request and will try it out once it's working. Thank you for the update, I appriated the work you have done, it's really helpful for me.

goncalotomas commented 5 years ago

Don't forget, the changes you want are in the driver/redis-crdb branch! (for now) I am going to test it now and if it works I'll merge it to master.

goncalotomas commented 5 years ago

Tried creating and fetching some entities and it worked for me. Going to merge in the changes :)

yunhaom94 commented 5 years ago

Hi,

I pulled the lastest version but I got error with running rebar3 shell in compiling, it didn't happen to my copy of previous version.

===> Compiling cowlib
===> Compiling hamcrest
===> Compiling riak_pb
===> Compiling riak_client
===> Compiling ranch
_build/default/lib/ranch/src/ranch_ssl.erl:131: Warning: ssl:ssl_accept/2: deprecated; use ssl:handshake/2 instead

===> Compiling goldrush
===> Compiling lager
===> Compiling antidote_pb_codec
===> Compiling antidotec_pb
===> Compiling erlcass
Linux, Ubuntu
sudo: no tty present and no askpass program specified
sudo: no tty present and no askpass program specified
~/FMKe/_build/default/lib/erlcass/_build/deps ~/FMKe/_build/default/lib/erlcass
Cloning into 'cpp-driver'...
~/FMKe/_build/default/lib/erlcass/_build/deps/cpp-driver ~/FMKe/_build/default/lib/erlcass/_build/deps ~/FMKe/_build/default/lib/erlcass
Note: checking out '0edf3d2eff88d7594ed7dc070f889b1bcacb677f'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 0edf3d2e CPP-616 - Use uv/version.h as version file for libuv v1.21.0+
~/FMKe/_build/default/lib/erlcass/_build/deps ~/FMKe/_build/default/lib/erlcass
~/FMKe/_build/default/lib/erlcass
~/FMKe/_build/default/lib/erlcass/_build/deps/cpp-driver/build ~/FMKe/_build/default/lib/erlcass
./build_deps.sh: line 93: cmake: command not found
make[1]: Entering directory '/home/redis1/FMKe/_build/default/lib/erlcass/_build/deps/cpp-driver/build'
make[1]: *** No targets specified and no makefile found.  Stop.
make[1]: Leaving directory '/home/redis1/FMKe/_build/default/lib/erlcass/_build/deps/cpp-driver/build'
~/FMKe/_build/default/lib/erlcass
make[1]: Entering directory '/home/redis1/FMKe/_build/default/lib/erlcass/c_src'
 CPP    nif_utils.cc
 CPP    cass_binding.cc
 CPP    nif_cass_statement.cc
 CPP    uuid_serialization.cc
 CPP    nif_cass_prepared.cc
 CPP    erlcass.cc
 CPP    nif_cass_uuid.cc
 CPP    nif_date_time.cc
In file included from /home/redis1/FMKe/_build/default/lib/erlcass/_build/deps/cpp-driver/src/address.hpp:22:0,
                 from /home/redis1/FMKe/_build/default/lib/erlcass/_build/deps/cpp-driver/src/serialization.hpp:20,
                 from /home/redis1/FMKe/_build/default/lib/erlcass/c_src/uuid_serialization.cc:2:
/home/redis1/FMKe/_build/default/lib/erlcass/_build/deps/cpp-driver/src/third_party/sparsehash/src/sparsehash/dense_hash_set:103:10: fatal error: sparsehash/internal/sparseconfig.h: No such file or directory
 #include <sparsehash/internal/sparseconfig.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
nif.mk:78: recipe for target '/home/redis1/FMKe/_build/default/lib/erlcass/c_src/uuid_serialization.o' failed
make[1]: *** [/home/redis1/FMKe/_build/default/lib/erlcass/c_src/uuid_serialization.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from /home/redis1/FMKe/_build/default/lib/erlcass/_build/deps/cpp-driver/src/ref_counted.hpp:20:0,
                 from /home/redis1/FMKe/_build/default/lib/erlcass/_build/deps/cpp-driver/src/data_type.hpp:24,
                 from /home/redis1/FMKe/_build/default/lib/erlcass/c_src/cass_binding.cc:7:
/home/redis1/FMKe/_build/default/lib/erlcass/_build/deps/cpp-driver/src/atomic.hpp:20:10: fatal error: cassconfig.hpp: No such file or directory
 #include "cassconfig.hpp"
          ^~~~~~~~~~~~~~~~
compilation terminated.
nif.mk:78: recipe for target '/home/redis1/FMKe/_build/default/lib/erlcass/c_src/cass_binding.o' failed
make[1]: *** [/home/redis1/FMKe/_build/default/lib/erlcass/c_src/cass_binding.o] Error 1
In file included from /home/redis1/FMKe/_build/default/lib/erlcass/_build/deps/cpp-driver/src/ref_counted.hpp:20:0,
                 from /home/redis1/FMKe/_build/default/lib/erlcass/_build/deps/cpp-driver/src/buffer.hpp:20,
                 from /home/redis1/FMKe/_build/default/lib/erlcass/_build/deps/cpp-driver/src/abstract_data.hpp:20,
                 from /home/redis1/FMKe/_build/default/lib/erlcass/_build/deps/cpp-driver/src/statement.hpp:20,
                 from /home/redis1/FMKe/_build/default/lib/erlcass/_build/deps/cpp-driver/src/execute_request.hpp:23,
                 from /home/redis1/FMKe/_build/default/lib/erlcass/c_src/nif_cass_statement.cc:3:
/home/redis1/FMKe/_build/default/lib/erlcass/_build/deps/cpp-driver/src/atomic.hpp:20:10: fatal error: cassconfig.hpp: No such file or directory
 #include "cassconfig.hpp"
          ^~~~~~~~~~~~~~~~
compilation terminated.
nif.mk:78: recipe for target '/home/redis1/FMKe/_build/default/lib/erlcass/c_src/nif_cass_statement.o' failed
make[1]: *** [/home/redis1/FMKe/_build/default/lib/erlcass/c_src/nif_cass_statement.o] Error 1
make[1]: Leaving directory '/home/redis1/FMKe/_build/default/lib/erlcass/c_src'
Makefile:12: recipe for target 'nif_compile' failed
make: *** [nif_compile] Error 2
===> Hook for compile failed!
goncalotomas commented 5 years ago

This is an error compiling the Cassandra library. I'm assuming, for the compiling step to fail, that you don't have the Cassandra dependencies. Please follow the steps listed here and try again to see if you still get the error. I'm assuming you are using 18.04.

yunhaom94 commented 5 years ago

Hi, I am still getting the same errors after installing the dependencis, it's weird because I didn't have any error before.