Closed ajose01 closed 5 years ago
I've been scratching my head on this now for a few... tried both with a remote nats and a localhost nats, same error:
23:00:32.175 [error] GenServer #PID<6858.5843.0> terminating ** (FunctionClauseError) no function clause matching in Nats.Connection.send_packet/2 lib/nats/connection.ex:169: Nats.Connection.send_packet({:write_flush, {:msg, 108, "CONNECT {\"lang\": \"elixir\", \"name\": \"elixir-nats\", \"pedantic\": false, \"verbose\": false, \"version\": \"0.1.4\"}\r\n"}, true, {:packet_flushed, #PID<6858.5843.0>, #Reference<6858.2267846929.1015021569.234781>}}, %{ack_ref: #Reference<6858.2267846929.1015021569.234781>, close_fn: &:gen_tcp.close/1, make_active: true, opts: %{auth: %{}, host: "172.17.0.2", port: 4222, socket_opts: [:binary, {:active, :once}], ssl_opts: [], timeout: 5000, tls_required: false, verbose: false}, ps: nil, send_fn: &:gen_tcp.send/2, sep_writer: true, sock: #Port<6858.1958>, state: :ack_connect, worker: #PID<6858.5842.0>, writer_pid: nil}) lib/nats/connection.ex:350: Nats.Connection.nats_info/2 lib/nats/connection.ex:284: Nats.Connection.handle_packet/2 lib/nats/connection.ex:270: Nats.Connection.transport_input/2 (stdlib) gen_server.erl:637: :gen_server.try_dispatch/4 (stdlib) gen_server.erl:711: :gen_server.handle_msg/6 (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Any thoughts?
I had similar error, when updated elixir to 1.7 and erlang to 21 OTP. Try to downgrade versions
Especially, try to use erlang esl-erlang_20.3-1 and elixir elixir_1.6.6-1
@ajose01 - I had a chance to look at this today and created a fork with what I believe to be a working version. I ran the code through the formatter so it may be hard to pick up exactly what I changed, but the gist of it is in the following lines:
Basically, there were a bunch of unsafe variables set inside of if blocks / case statements. Once I've verified everything's working correctly I'll add a PR here.
@ajose01 - I had a chance to look at this today and created a fork with what I believe to be a working version. I ran the code through the formatter so it may be hard to pick up exactly what I changed, but the gist of it is in the following lines:
Basically, there were a bunch of unsafe variables set inside of if blocks / case statements. Once I've verified everything's working correctly I'll add a PR here.
Hello, is the final far ?
I'll try to get a PR over the weekend - no guarantees for when they merge it though!
@aby2503 - PR is here
Thank you all for using NATS! Note that this client has largely been unmaintained and so has been deprecated. Moving forward we suggest you migrate to the nats.ex client which will be actively maintained. We'll keep this repository public in case you'd prefer to make a copy to maintain yourselves, but hope you'll have a good experience with the new client. We sincerely apologize for the inconvenience.
I've been scratching my head on this now for a few... tried both with a remote nats and a localhost nats, same error:
Any thoughts?