basho / riak-erlang-client

The Riak client for Erlang.
Apache License 2.0
311 stars 188 forks source link

Error with riakc_pb_socket:start_link() using rebar3 and Erlang [JIRA: CLIENTS-1058] #340

Closed oladipo closed 7 years ago

oladipo commented 7 years ago

I created an erlang application using the cowboy rest http handler. The application stores data in riak kv. However I am unable to connect to my riak node to return data for the rest api.

When I call riakc_pb_socket:start_link("127.0.0.1", 8087) in line 38 of /src/paddylenderapi_rest_handler.erl file I get errors.

see attached.

NB: Issue occurs on Ubuntu 16.04 paddylender.zip

lukebakken commented 7 years ago

Thank you for the issue report. Which version of Erlang are you using to build your code?

oladipo commented 7 years ago

Erlang/OTP 19.2 [erts-8.2]

lukebakken commented 7 years ago

Hello,

I created a repository here with your code:

https://github.com/lukebakken/riak-erlang-client_340

The Makefile uses rebar to build the project. I do not have experience with rebar3.

To build the code, use GNU make:

make

I tested that start_link works correctly using the following command:

erl -pa ./ebin -pa ./deps/*/ebin

In the shell, I executed this statement:

Erlang/OTP 19 [erts-8.2] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V8.2  (abort with ^G)
1> paddylenderapi_rest_handler:get_json(undefined, undefined).
{true,undefined,undefined}
2>
Basho-JIRA commented 7 years ago

Fixed, or closed via GitHub issues.

[posted via JIRA by Alexander Moore]