Trying to connect from DataStax Studio to my Astra cluster - Connection test failed - cassandra

Just got my brand new 6.8 DataStax Astra (Cassandra) and downloaded studio from https://www.datastax.com/dev/datastax-studio. My Nodejs connection works great. But trying connect from Studio - everything fails with SSL configurations:
All host(s) tried for query failed.. (com.datastax.driver.core.exceptions.TransportException:
It looks like port should be 29080 as per secure-connect .. /config.json
I used API User Admin Token for Client and Secret keys.
Not sure if it's related but python connection fails with:
...cassandra.cluster.NoHostAvailable: ('Unable to connect to any servers'
...Unauthorized('Error from server: code=2100 [Unauthorized] message="No SELECT permission on <table system_virtual_schema.keyspaces>"')

It can't connect to Astra because it's connecting to the wrong CQL port.
The correct port configuration is in the cqlshrc file in the [connection] section. For example:
[connection]
hostname = db-uuid-us-east1.db.astra.datastax.com
port = 39876
ssl = true
This is the correct CQL port to use to connect from Studio or other clients. Cheers!

Cassandra 6.8 Astra is currently using port 29042 by default.
Both Python connector and Studio work great under Admin User credentials, but not under the Admin API User. So the authorization error message was ligid. NodeJS works great with Admin API User credentials..

Related

Python: Error while connecting to SQL Server (ODBC 17)

Getting below error while executing SQL statement using pd.read_sql()
sqlalchemy.exc.OperationalError: (pyodbc.OperationalError) ('08001',
'[08001] [unixODBC][Microsoft][ODBC Driver 17 for SQL Server]SSL
Provider: [error:0A0C0103:SSL routines::internal error] (-1)
(SQLDriverConnect)')
Python version 3.10.8. Other packages:
pyodbc==4.0.35
pandas==1.5.2
pymysql==1.0.2
sqlalchemy==1.4.46
I want to execute the above command successfully.
The error message 'ODBC 17' distinctively specifies a failure in establishing a connection to a SQL Server database through ODBC driver. This can be caused by;
Incorrect connection details such as server name, database name, username, and password.
ODBC driver not installed or not properly configured on the machine.
In order to solve this, try and verify the connection details and ensure they are correct or Install or reinstall the ODBC driver and make sure it's properly configured.
If the above doesn't work, kindly check the firewall settings and ensure that the connection is not being blocked.
Hope this helps.

How to create the connection string for a database generated with pgAdmin4

I developed my app with SQLAlchemy testing it on an SQLite database.
Now I would like to testing more using PostgreSQL but in a localhost once again.
For this reason, I tried to create a local Postgre database with pdAdmin4 (my laptop has Windows 7 so I installed the v4 version of the database manager).
Now I am trying to generate the connection string for this Postgre database but I cannot understand how to do it.
This is what I created in pgAdmin4:
while the details of the server are these:
The connection string I am trying to use is this:
selected_engine = create_engine('postgresql+psycopg2://postgres:123#localhost/test_server/test_database')
The password 123 is the password I set at the first access to pgdAmin4.
However, I got this error:
OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: FATAL: database "test_server/test_database" does not exist
I am sure I am wrong and I cannot figure out what is the correct URL for my database.

SQLanywhere & SqllanyDB Specified database not found', -83

I'm trying to connect to a SAP SQLANYWHERE server using syqlanydb library and even sqlalchemy however both scenarios I get
sqlanydb.OperationalError: (b'Specified database not found', -83)
I can use the same connection details to connect using clients such as DBeaver but no matter what can't connect to this server, I've also tried ODBC drivers but server wasn't returning anything.
I have sqlanywhere 17 installed matching server and port 2638 is open. Have in mind this is a remote server.
My connection string:
sybase_connection_string = "sqlalchemy_sqlany://{user}:{pwd}#{host}:{port}/{db}".format(user=user, pwd=pwd, host=host, port=port, db=database)
engine = create_engine(sybase_connection_string)
engine.connect(sybase_connection_string)
Has anyone experienced this?
Thanks

Using mLab on Google App Engine through Wiki.js (Connection timeout)

I'm trying to set up a Node.js application using wiki.js: https://github.com/Requarks/wiki
I just started with Google App Engine and using their Cloud Shell. I installed Wiki.js using their bash command and ran a command that ran a server on port 3000 which I then used Google's shell to view.
It brings you to Wiki.js' configuration UI where you insert info including the mongodb connection string.
I have a DB in mlab set up with a user. I tested it locally to make sure I can connect, but when I try to do this process through the Google App Engine "Web Preview" they have on their command line, on the step where I am to add the mongodb connection string, it times out, giving the error:
Error: failed to connect to server [secret.mlab.com:secret] on first connect [MongoError: connection 8 to secret.mlab.com:secret timed out]
(i hid the actual address)
So i'm wondering if I'm missing something with this Google App Engine, since this connects successfully on my localhost

Resource temporarily unavailable. Authentication by key failed (Error -18). (Error #35)

I'm using EC2 Amazon Web Service to launch my server using NodeJS, MongoDB.
I completed to save and load the data using my android application through NodeJS server and MongoDB but when I tried to check the data using RoboMongo (Robo 3T), the error occurred.
Resource temporarily unavailable. Authentication by key (path of the .pem key) failed (Error -18). (Error #35)
Robomongo 1
Robomongo 2
Error dialog
This is what I did in Robomongo.
These are the result of searching the google... I think I did right...
What is wrong?
I Solved the problem myself.
When you have this problem,
1. Check out /etc/mongod.conf
In network interfaces.
bindIP must be 0.0.0.0
not 127.0.0.1
2. Check the SSH User Name.
For an Amazon Linux AMI, the user name is ec2-user.
For the others, Check out the link ! https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html
3. If it didn't help,
try to download what developer uploaded (1.2 - Beta)
https://github.com/Studio3T/robomongo/issues/1189#issuecomment-353279070

Resources