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

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

Open
nguyenthai0107 opened this issue May 29, 2023 · 1 comment
Open

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

nguyenthai0107 opened this issue May 29, 2023 · 1 comment

Comments

@nguyenthai0107
Copy link

nguyenthai0107 commented May 29, 2023

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

  • output of nodetool status
    NONPROD [root@node01-pdc-dev-cassandra-nonprod:/etc/cassandra/conf] # nodetool -u jmx_admin -pwf /etc/cassandra/conf/jmxremote.password status
    Datacenter: DC1
    ===============
    Status=Up/Down
    |/ State=Normal/Leaving/Joining/Moving
    -- Address Load Tokens Owns Host ID Rack
    UN xx.xx.xxx.2 1.63 MiB 8 ? RACK1
    UN xx.xx.xxx.3 1.47 MiB 8 ? RACK1
    Datacenter: DC2
    ===============
    Status=Up/Down
    |/ State=Normal/Leaving/Joining/Moving
    -- Address Load Tokens Owns Host ID Rack
    UN yy.yy.yyy 417.53 KiB 8 ? RACK1
    UN yy.yy.yyy 631.54 KiB 8 ? RACK1

  • output of SELECT peer, rpc_address FROM system.peers
    -> cannot use cqlsh for login

  • output of describe keyspace system_auth
    -> cannot use cqlsh for login
    Hello, please take a look on this issue.
    Thanks.
    Regards.

@sri-postgres-cassandra
Copy link

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?

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