Connection error for cassandra and influxdb when using docker-compose - docker-compose

I am using docker-compose for influxdb and Cassandra for my application but when I am trying to run application locally on my mac system I am getting below error - I am new for both so not sure where to make the changes for IPs for both docker images.
for Cassandra -
Connection error: ('Unable to connect to any servers', {'127.0.0.1': error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error: Connection refused"), '::1': error(99, "Tried connecting to [('::1', 9042, 0, 0)]. Last error: Cannot assign requested address")})
For Influxdb - when trying to create a user programmatically
curl: (6) Could not resolve host: influxdb

Related

unable to make connection between MSSQL and python image using Docker compose

I am using Docker compose to build images of python and MSSQL and making connection between DB and python app and added DB container as a server in python.connection file but getting errors like
pyodbc.OperationalError: ('08001', '[08001] [FreeTDS][SQL Server]Unable to connect to data source (0) (SQLDriverConnect)')
Adaptive Server is unavailable or does not exist
'DRIVER={FreeTDS};''SERVER=MSSQL_DB;''PORT=1433;' 'DATABASE=MYDATABASE;''TDS_Version=7.4', autocommit=True) my_python_app | pyodbc.OperationalError: ('08001', '[08001] [FreeTDS][SQL Server]Unable to connect to data source (0) (SQLDriverConnect)')

Liquibase-Github actions (Connection timed out error while running liquibase in github actions and while doing diff generation)

When I'm trying to run Liquibase in Github actions workflows getting the below error
Unexpected error running Liquibase: Connection could not be created to jdbc:mariadb://10.13.10.2:3306/liquibase_test with driver org.mariadb.jdbc.Driver. Socket fail to connect to host:address=(host=10.13.10.2)(port=3306)(type=primary). Connect timed out
not only in github actions when I'm trying to do diff generation in server where liquibase is installed getting the same error.
Unexpected error running Liquibase: Connection could not be created to jdbc:mariadb://10.13.10.2:3306/liquibase_test with driver org.mariadb.jdbc.Driver. Socket fail to connect to host:address=(host=10.13.10.2)(port=3306)(type=primary). Connect timed out
Can anyone please help me?

CraftCMS with Redis: Failed to open redis DB connection (tcp://:, database=): 0 - Failed to parse address ":"

I have yii2 and yii2-redis installed on a CraftCMS project, but when I fire up the project, I get an error message that reads:
Database Exception – yii\db\Exception
Failed to open redis DB connection (tcp://:, database=): 0 - Failed to parse address ":"
Error Info: Failed to parse address ":"
I'm not quite sure what to do with this error. In my .env file, I put in:
REDIS_HOST=localhost
REDIS_PORT=3306
REDIS_PASSWORD=
REDIS_KEY_PREFIX=craft
But that only yielded a different error:
Database Exception – yii\db\Exception
Failed to open redis DB connection (tcp://:3306, database=): 0 - php_network_getaddresses:
getaddrinfo failed: nodename nor servname provided, or not known
Error Info: php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known
Help?
Additional context: I didn't set up the build for this project, so I more or less inherited this Redis setup.
Update:
I went and dug into the config file for the Redis setup and found a misnaming between the .env variables and what was present in the .env file. Now I'm getting a completely different error:
"Received illegal data from redis: Redis command was: SELECT 0"
Please check that your configuration matches the environment variables you use.
Turns out I'd deleted the Redis database (don't remember how or when), so creating a new one (with the correct .env variables set) fixed the problem immediately.
Whew.

using mongdb in docker with Go

i tried to run MongoDB in docker-compose and connect my Go server with MongoDB in docker seem not to work for me, thought i already use mongodb:MyContanerName:27017
when i run my go server and then i tired to request on my client, the error something like this
2019/09/08 14:10:37 Unexpected error: rpc error: code = Internal desc = internal error: server selection error: server selection timeout
current topology: Type: Unknown
Servers:
Addr: mongo:27017, Type: Unknown, State: Connected, Average RTT: 0, Last error: connection(mongo:27017[-125]) connection is closed
i already did docker-compose up -d for my docker, and it was running on my docker ,
the full code is trigger here golang and mongodb

GCloud SQL Proxy cannot connect, unclear errors

I am having difficulty getting the gcloud sql proxy working on my local machine. I have gone through all the steps here however I am getting the following errors. It is unclear to me what is actually going wrong. Important things to note, I am not using a service account, I am authenticating with my own account through gcloud auth login and I am following the TCP sockets steps.
MySQL
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0
GCloud SQL Proxy
couldn't connect to "<my instance connection name>": googleapi: Error 400: This operation isn"t valid for this instance., invalidOperation
GCloud Logs
... status: {
code: 2
message: "UNKNOWN"
}
}
receiveTimestamp: "2017-09-08T15:45:10.179994989Z"
resource: {…}
severity: "ERROR"
timestamp: "2017-09-08T15:45:04.289Z"
}
The most likely reason you are receiving this error message is because you are using a First Generation instance.
Proxy connectivity is only supported for Second Generation instances.