K2InformaticsGmbH / erloci

Erlang Oracle native driver - DEPRECATED, see https://github.com/K2InformaticsGmbH/oranif instead
Apache License 2.0
37 stars 11 forks source link

Error starting a session #52

Open kagux opened 6 years ago

kagux commented 6 years ago

Hi,

Thanks for doing massive work on this driver! I've tried using it and have issues establishing connection. Here's the log:

27.09.2017 21:32:36.094314 [debug] [_OCI_] {oci_logger,,71} ---- ERLOCI PORT PROCESS LOGGER ----
27.09.2017 21:32:36.097670 [debug] [_OCI_] {oci_port,,292} LD_LIBRARY_PATH = .../Projects/milo/_build/dev/lib/erloci/priv
27.09.2017 21:32:36.098060 [debug] [_OCI_] {oci_port,,300} Extra Env :[]
27.09.2017 21:32:36.098455 [debug] [_OCI_] {oci_port,,310} Executable "/Projects/milo/_build/dev/lib/erloci/priv/ocierl"
27.09.2017 21:32:36.098859 [debug] [_OCI_] {oci_port,,311} Options :[{packet,4},
          binary,exit_status,use_stdio,
          {args,["262144","true","55461"]},
          {env,[{"LD_LIBRARY_PATH",
                 "/usr/lib/oracle/12.1/client64/lib:/Projects/milo/_build/dev/lib/erloci/priv"}]}]
27.09.2017 21:32:36.099386 [debug] [_OCI_] {oci_port,,325} started log disabled new port:
[{name,"/Projects/milo/_build/dev/lib/erloci/priv/ocierl"},
 {links,[<0.433.0>]},
 {id,85392},
 {connected,<0.433.0>},
 {input,0},
 {output,19},
 {os_pid,251}]
27.09.2017 21:32:36.099857 [debug] [_OCI_] {oci_logger,,116} 27.09.2017 21:32:36.099829 Waiting for peer to connect on 55461
27.09.2017 21:32:36.107492 [debug] [_OCI_] {oci_logger,,124} 27.09.2017 21:32:36.107444 Connection from 57618 to 55461
27.09.2017 21:32:36.108115 [info] [_OCI_] {c_src/erloci_drv/erloci.cpp,main,83} [251] Port process configs : erlang term max size 0x00040000 bytes, logging enabled, TCP port for logs 55461, NLS_LANG
27.09.2017 21:32:36.111050 [info] [_OCI_] {c_src/erloci_lib/ocisession.cpp,config,69} OCI Initialize
27.09.2017 21:32:36.112281 [info] [_OCI_] {c_src/erloci_drv/command.cpp,change_log_flag,46} Disabling logging..
27.09.2017 21:32:36.112370 [debug] [_OCI_] {oci_port,,369} no reply for log_disabled
** (exit) exited in: :gen_server.call(#PID<0.433.0>, {:port_call, [2, "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp) (HOST=127.0.0.1) (PORT=4421)) (CONNECT_DATA=(SID=sid_name)))", "user", nil, "nonode@nohost:<0.429.0>"]}, :infinity)
    ** (EXIT) an exception was raised:
        ** (FunctionClauseError) no function clause matching in :oci_port.handle_result/3
            (erloci) /Projects/milo/deps/erloci/src/oci_port.erl:428: :oci_port.handle_result(0, {<<131, 104, 2, 103, 100, 0, 13, 110, 111, 110, 111, 100, 101, 64, 110, 111, 104, 111, 115, 116, 0, 0, 1, 173, 0, 0, 0, 0, 0, 114, 0, 3, 100, 0, 13, 110, 111, 110, 111, 100, 101, 64, 110, 111, 104, 111, 115, 116, 0, ...>>, 2}, {:oci_logger, #PID<0.434.0>})
            (erloci) /Projects/milo/deps/erloci/src/oci_port.erl:367: :oci_port.handle_info/2
            (stdlib) gen_server.erl:616: :gen_server.try_dispatch/4
            (stdlib) gen_server.erl:686: :gen_server.handle_msg/6
            (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
    (stdlib) gen_server.erl:214: :gen_server.call/3
    (erloci) /Projects/milo/deps/erloci/src/oci_port.erl:82: :oci_port.get_session/5
    (milo) lib/milo/repo.ex:7: Milo.Repo.all/1
iex(1)>
21:32:36.122 [error] GenServer #PID<0.433.0> terminating
** (FunctionClauseError) no function clause matching in :oci_port.handle_result/3
    (erloci) /Projects/milo/deps/erloci/src/oci_port.erl:428: :oci_port.handle_result(0, {<<131, 104, 2, 103, 100, 0, 13, 110, 111, 110, 111, 100, 101, 64, 110, 111, 104, 111, 115, 116, 0, 0, 1, 173, 0, 0, 0, 0, 0, 114, 0, 3, 100, 0, 13, 110, 111, 110, 111, 100, 101, 64, 110, 111, 104, 111, 115, 116, 0, ...>>, 2}, {:oci_logger, #PID<0.434.0>})
    (erloci) /Projects/milo/deps/erloci/src/oci_port.erl:367: :oci_port.handle_info/2
    (stdlib) gen_server.erl:616: :gen_server.try_dispatch/4
    (stdlib) gen_server.erl:686: :gen_server.handle_msg/6
    (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
Last message: {#Port<0.10674>, {:data, <<131, 104, 2, 109, 0, 0, 0, 61, 131, 104, 2, 103, 100, 0, 13, 110, 111, 110, 111, 100, 101, 64, 110, 111, 104, 111, 115, 116, 0, 0, 1, 173, 0, 0, 0, 0, 0, 114, 0, 3, 100, 0, 13, 110, 111, 110, 111, 100, ...>>}}
State: {:state, #Port<0.10674>, false, 0, {:oci_logger, #PID<0.434.0>}, :undefined, 0, :undefined}
c-bik commented 5 years ago

@kagux Sorry that it took so long (about a year now) to get back to you!

We released a few versions in the mean time. So...