instaclustr / cassandra-ldap

LDAP Authenticator for Apache Cassandra
Apache License 2.0
24 stars 16 forks source link

'Unable to connect to any servers ip:9042' #40

Open nguyenthai0107 opened 1 year ago

nguyenthai0107 commented 1 year ago

Please answer these questions before submitting your issue. Thanks!

What version of Cassandra are you using?

4.1.0

What version of Cassandra LDAP are you using?

1.1.0

What LDAP server you are using? Any specifics?

Window server

What did you do?

  1. I was add 3 line to cassandra.yaml

authenticator: LDAPAuthenticator authorizer: CassandraAuthorizer role_manager: LDAPCassandraRoleManager

  1. I was built mvn with this project, and then copy file cassandra-ldap-4.1.0-1.1.0.jar to /usr/share/cassandra/lib/ -> /usr/share/cassandra/lib/cassandra-ldap-4.1.0-1.1.0.jar

  2. I also created ldap.properties in /etc/cassandra/conf ( im use Oracle ) here is detail

# Ldap server URI. Specify ldaps when using a secure LDAP port (strongly recommended)
# ldap_uri: ldaps://127.0.0.1:636/dc=example,dc=org
ldap_uri=ldaps://xxx-xxx-xxx:389

# Service user distinguished name. This user will be a SUPERUSER and be used for looking up
# user details on authentication
service_dn=serviceaccount@domain (1)

# Service user password
service_password=xxxxxxxxxx

# filter used for searching in LDAP, "%s" is placeholder, it will be replaced by login name
filter_template=(cn=%s)

# True by default, tells whether internal cache of user -> password combination will be used
# This option is irrelevant for Cassandra version <= 3.0
#auth_cache_enabled: false

# if you set this property, Cassandra will internally consider 'dba` to be same as 'cassandra'.
# so you might get rid of `cassandra` role (not recommended) or you might make it unable to log in at least.
# You need to create this admin role beforehand, it has to be super user.
cassandra_ldap_admin_user=serviceaccount@domain ( same as (1))
# consistency level to use for retrieval of a role to check if it can log in - defaults to LOCAL_ONE
#consistency_for_role: LOCAL_ONE

# Default role for new users to be added to
default_role_membership=default_role

What did you expect to see?

After config everything, and i ran systemctl restart casssandra.services for apply new config. I detected the port 9042 doesn't open anymore. I use cmd to check netstat -tln and don't see port 9042 open. So that i cannot use command cqlsh -u user1 -p xxx --ssl for login or cannot do some thing else.

What did you see instead?

Error: Connection error: ('Unable to connect to any servers', {'12.345.678.910:9042': ConnectionRefusedError(111, "Tried connecting to [('12.345.678.910', 9042)]. Last error: Connection refused")})

If you are having connectivity related issues please share the following additional information

Describe your Cassandra cluster

please provide the following information

sri-postgres-cassandra commented 3 months ago

Hi , We are facing the same issue; the port is not being displayed. Could you please let me know if you were able to find a solution for this issue?