{"action":"created","issue":{"url":"https://api.github.com/repos/blitzstudios/triton/issues/10","repository_url":"https://api.github.com/repos/blitzstudios/triton","labels_url":"https://api.github.com/repos/blitzstudios/triton/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/blitzstudios/triton/issues/10/comments","events_url":"https://api.github.com/repos/blitzstudios/triton/issues/10/events","html_url":"https://github.com/blitzstudios/triton/issues/10","id":318055094,"node_id":"MDU6SXNzdWUzMTgwNTUwOTQ=","number":10,"title":"Receiving a RuntimeError after establishing a connection with Cassandra instance","user":{"login":"Relrin","id":1627100,"node_id":"MDQ6VXNlcjE2MjcxMDA=","avatar_url":"https://avatars3.githubusercontent.com/u/1627100?v=4","gravatar_id":"","url":"https://api.github.com/users/Relrin","html_url":"https://github.com/Relrin","followers_url":"https://api.github.com/users/Relrin/followers","following_url":"https://api.github.com/users/Relrin/following{/other_user}","gists_url":"https://api.github.com/users/Relrin/gists{/gist_id}","starred_url":"https://api.github.com/users/Relrin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Relrin/subscriptions","organizations_url":"https://api.github.com/users/Relrin/orgs","repos_url":"https://api.github.com/users/Relrin/repos","events_url":"https://api.github.com/users/Relrin/events{/privacy}","received_events_url":"https://api.github.com/users/Relrin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-04-26T14:28:34Z","updated_at":"2018-10-15T16:08:08Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\n\r\nI'm trying to compile the project and automatically create keyspaces with tables in Cassandra, but receiving an error of compilation:\r\n```\r\nCompiling 12 files (.ex)\r\n\r\n== Compilation error in file lib/models/cassandra/keyspaces/default.ex ==\r\n** (exit) an exception was raised:\r\n    ** (RuntimeError) Connect raised a RuntimeError error. The exception details are hidden, as\r\nthey may contain sensitive data such as database credentials.\r\n\r\n        lib/xandra/protocol.ex:65: Xandra.Protocol.encode_request/3\r\n        lib/xandra/connection/utils.ex:70: Xandra.Connection.Utils.authenticate_connection/4\r\n        lib/xandra/connection.ex:24: Xandra.Connection.connect/1\r\n        lib/db_connection/connection.ex:135: DBConnection.Connection.connect/2\r\n        lib/connection.ex:622: Connection.enter_connect/5\r\n        (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3\r\n\r\n14:19:38.849 [error] GenServer #PID<0.204.0> terminating\r\n** (RuntimeError) Connect raised a RuntimeError error. The exception details are hidden, as\r\nthey may contain sensitive data such as database credentials.\r\n\r\n    lib/xandra/protocol.ex:65: Xandra.Protocol.encode_request/3\r\n    lib/xandra/connection/utils.ex:70: Xandra.Connection.Utils.authenticate_connection/4\r\n    lib/xandra/connection.ex:24: Xandra.Connection.connect/1\r\n    lib/db_connection/connection.ex:135: DBConnection.Connection.connect/2\r\n    lib/connection.ex:622: Connection.enter_connect/5\r\n    (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3\r\nLast message: nil\r\nState: Xandra.Connection\r\n```\r\n\r\nThis is the part of configuration which is using for development on my local machine:\r\n```elixir\r\nconfig :triton,\r\n  clusters: [\r\n    [\r\n      conn: Cassandra.Cluster.Connection,\r\n      authentication: {\r\n        Xandra.Authenticator.Password,\r\n        [\r\n          username: System.get_env(\"CASSANDRA_USERNAME\") || \"cassandra\",\r\n          password: System.get_env(\"CASSANDRA_PASSWORD\") || \"cassandra\"\r\n        ]\r\n      },\r\n      nodes: [System.get_env(\"CASSANDRA_CLUSTER_ADDRESS\") || \"cassandra:9042\"],\r\n      pool: Xandra.Cluster,\r\n      underlying_pool: DBConnection.Poolboy,\r\n      pool_size: 10,\r\n      keyspace: \"default_keyspace\",\r\n      health_check_delay: 5000,\r\n      health_check_interval: 500\r\n    ]\r\n  ]\r\n```\r\n\r\nAnd the file when the error raised, but here is nothing special (just copy-pasted from the Readme file with small changes):\r\n```elixir\r\ndefmodule Cassandra.Default.Keyspace do\r\n  use Triton.Keyspace\r\n\r\n  keyspace :default_keyspace, conn: Cassandra.Cluster.Connection do\r\n    with_options [\r\n      replication: \"{'class' : 'SimpleStrategy', 'replication_factor': 3}\",\r\n    ]\r\n  end\r\nend\r\n```\r\n\r\nThe `cassandra` user has the following permissions (granted manually in CQL shell):\r\n```bash\r\ncassandra@cqlsh> LIST ALL of cassandra;\r\n\r\n role      | username  | resource        | permission\r\n-----------+-----------+-----------------+------------\r\n cassandra | cassandra | <all keyspaces> |     CREATE\r\n cassandra | cassandra | <all keyspaces> |      ALTER\r\n cassandra | cassandra | <all keyspaces> |       DROP\r\n cassandra | cassandra | <all keyspaces> |     SELECT\r\n cassandra | cassandra | <all keyspaces> |     MODIFY\r\n cassandra | cassandra | <all keyspaces> |  AUTHORIZE\r\n cassandra | cassandra |     <role user> |      ALTER\r\n cassandra | cassandra |     <role user> |       DROP\r\n cassandra | cassandra |     <role user> |  AUTHORIZE\r\n```\r\n\r\nAny ideas how to fix this issue?"},"comment":{"url":"https://api.github.com/repos/blitzstudios/triton/issues/comments/429915439","html_url":"https://github.com/blitzstudios/triton/issues/10#issuecomment-429915439","issue_url":"https://api.github.com/repos/blitzstudios/triton/issues/10","id":429915439,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTkxNTQzOQ==","user":{"login":"sewinter","id":15021073,"node_id":"MDQ6VXNlcjE1MDIxMDcz","avatar_url":"https://avatars1.githubusercontent.com/u/15021073?v=4","gravatar_id":"","url":"https://api.github.com/users/sewinter","html_url":"https://github.com/sewinter","followers_url":"https://api.github.com/users/sewinter/followers","following_url":"https://api.github.com/users/sewinter/following{/other_user}","gists_url":"https://api.github.com/users/sewinter/gists{/gist_id}","starred_url":"https://api.github.com/users/sewinter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sewinter/subscriptions","organizations_url":"https://api.github.com/users/sewinter/orgs","repos_url":"https://api.github.com/users/sewinter/repos","events_url":"https://api.github.com/users/sewinter/events{/privacy}","received_events_url":"https://api.github.com/users/sewinter/received_events","type":"User","site_admin":false},"created_at":"2018-10-15T16:08:08Z","updated_at":"2018-10-15T16:08:08Z","author_association":"NONE","body":"Thanks for the prompt reply, @Relrin. I might have to do the same. If I end up finding a solution, I'll ping you here. "}}
{"actor":{"display_login":"sewinter"}}