Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master branch: failed to connect #35

Open
hissssst opened this issue Mar 17, 2020 · 4 comments
Open

Master branch: failed to connect #35

hissssst opened this issue Mar 17, 2020 · 4 comments

Comments

@hissssst
Copy link

Connection fails when connecting to the localhost with timeout

config :triton,
  clusters: [
    [
      conn: Triton.Conn,
      nodes: ["127.0.0.1"],
      pool: Xandra.Cluster,
      underlying_pool: DBConnection.Poolboy,
      pool_size: 10,
      keyspace: "my_keyspace",
      health_check_delay: 2500,  # optional: (default is 5000)
      health_check_interval: 500  # optional: (default is 1000)
    ]
  ]

with
[error] Xandra.Connection (#PID<0.2804.0>) failed to connect: ** (Xandra.ConnectionError) action "TCP connect" failed with reason: :timeout

But this works

$ iex -S mix run --no-start
Erlang/OTP 22 [erts-10.4] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]
iex(1)> Application.ensure_all_started :xandra
{:ok, [:connection, :db_connection, :xandra]}
iex(2)> {:ok, conn} = Xandra.start_link(nodes: ["127.0.0.1"])
{:ok, #PID<0.451.0>}
iex(3)> Xandra.execute conn, "USE my_keyspace"
{:ok, %Xandra.SetKeyspace{keyspace: "my_keyspace", tracing_id: nil}}
@tdtadeu
Copy link

tdtadeu commented Sep 10, 2020

is this repo still active?

@hissssst
Copy link
Author

@tdtadeu I don't think so, you can try https://github.com/cafebazaar/ecto-cassandra

@tdtadeu
Copy link

tdtadeu commented Sep 10, 2020

@hissssst But that's even older, isn't it? Are you using that one in prod?

@hissssst
Copy link
Author

@tdtadeu I am not using triton in prod. It has no migrations logic and creates tables at compile time.
I've been using ecto_cassandra, but later we decided to change database from cassandra/scylla to HBase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants