Flyway migrations: [WARNING] Unable to restore connection to having no default schema - database-migration

I'm encountering a warning when running my migrations and I don't understand what the message means.
The message is: [WARNING] Unable to restore connection to having no default schema: Access denied for user ''#'%' to database ''
My migrations appear to be running correctly, so I know my DB connection is ok.
What is the significance of "having no default schema" in this message?

I did some googling around this issue and here's what I have found: https://github.com/flyway/flyway/issues/793
Apparently, at a certain point of time, there is a DB connection with no schema selected, which causes that warning to be thrown.
As a solution, you could make sure to always have the default schema name in your JDBC connection string.

Related

Unable to create environments on Google Cloud Composer

I tried to create a Google Cloud Composer environment but in the page to set it up I get the following errors:
Service Error: Failed to load GKE machine types. Please leave the field
empty to apply default values or retry later.
Service Error: Failed to load regions. Please leave the field empty to
apply default values or retry later.
Service Error: Failed to load zones. Please leave the field empty to apply
default values or retry later.
Service Error: Failed to load service accounts. Please leave the field
empty to apply default values or retry later.
The only parameters GCP lets me change are the region and the number of nodes, but still lets me create the environment. After 30 minutes the environment crashes with the following error:
CREATE operation on this environment failed 1 day ago with the following error message:
Http error status code: 400
Http error message: BAD REQUEST
Errors in: [Web server]; Error messages:
Failed to deploy the Airflow web server. This might be a temporary issue. You can retry the operation later.
If the issue persists, it might be caused by problems with permissions or network configuration. For more information, see https://cloud.google.com/composer/docs/troubleshooting-environment-creation.
An internal error occurred while processing task /app-engine-flex/flex_await_healthy/flex_await_healthy>2021-07-20T14:31:23.047Z7050.xd.0: Your deployment has failed to become healthy in the allotted time and therefore was rolled back. If you believe this was an error, try adjusting the 'app_start_timeout_sec' setting in the 'readiness_check' section.
Got error "Another operation failed." during CP_DEPLOYMENT_CREATING_STANDARD []
Is it a problem with permissions? If so, what permissions do I need? Thank you!
It looks like more of a temporary issue:
the first set of errors is stating you cannot load the metadata :
regions list, zones list ....
you dont have a clear
PERMISSION_DENIED error
the second error: is suggesting also:
This might be a temporary issue.

Why cannot superset connect to Athena using PyAthena and rest scheme and throws HTTP 422 "unexpected error"?

Installing Superset with docker-compose. App is up and running. When adding a new database using PyAthena connector, error Unexpected error occurred, please check your logs for details happens with no details in the logs.
First, if you are using docker-compose, check whether you have added driver to the build environment.
echo "PyAthena>1.2.0" >> ./docker/requirements-local.txt
If you don't you will get Driver not found error.
Second, check your URI scheme. It must be of the following form:
awsathena+rest://AKIAXXXX:XXXXXX#athena.{region}.amazonaws.com/{database_name}?s3_staging_dir=s3://{bucket_name_for_results}
If you are missing the query string part you may get mysterious error without a detail reason.
Also note that PyAthena does not check you AK/SK against the staging bucket.

How to fix `column "xlog_position" does not exist` error when using AWS DMS for Postgres to Postgres data migration

I'm trying to migrate and synchronize a PostgreSQL database using AWS DMS and I'm getting the following error.
Last Error Task error notification received from subtask 0, thread 0 [reptask/replicationtask.c:2673] [1020487]
RetCode: "SQL_ERROR SqlState: 42703 NativeError: 1
Message: ERROR: column "xlog_position" does not exist; No query has been executed with that handle; RetCode: SQL_ERROR SqlState: 42P01 NativeError: 1
Message: ERROR: relation "pglogical.replication_set" does not exist; No query has been executed with that handle; RetCode: SQL_ERROR SqlState: 42703 NativeError: 1 Message: ERROR: column "xlog_position" does not exist; No query has been executed with that handle;
Could not find any supported plugins available on source; Could not resolve default plugin; Could not assign a postgres plugin to use for replication; Failure in setting Postgres CDC agent control structure; Error executing command; Stream component failed at subtask 0, component st_0_JX7ONUUGB4A2AR2VQ4FMEZ7PFU ; Stream component 'st_0_JX7ONUUGB4A2AR2VQ4FMEZ7PFU' terminated [reptask/replicationtask.c:2680] [1020487] Stop Reason FATAL_ERROR Error Level FATAL
I'm using two PostgreSQL instances as both source and target. I have already tested and verified that both database instances are accessible by replication instance. Target instance user has full access to the database. Do I need to install any plugins or do additional configurations to get this migration setup working?
I managed to resolve the issue by following the steps mentioned at
https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.PostgreSQL.html.
The issue was due to the fact that I was using DMS engine v3.1.4 which required some additional configuration for the replication process to start. These instructions can be found at https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.PostgreSQL.html#CHAP_Source.PostgreSQL.v10
If you are experiencing this issue double check the DMS replication engine version. This can be viewed under Replication Instances in Resource Management.
To enable logical decoding for an Amazon RDS for PostgreSQL DB instance
The user account requires the rds_superuser role to enable logical
replication. The user account also requires the rds_replication role
to grant permissions to manage logical slots and to stream data using
logical slots.
Set the rds.logical_replication static parameter to 1. As part of
applying this parameter, we also set the parameters wal_level,
max_wal_senders, max_replication_slots, and max_connections. These
parameter changes can increase WAL generation, so you should only set
the rds.logical_replication parameter when you are using logical
slots.
Reboot the DB instance for the static rds.logical_replication
parameter to take effect.
Create a logical replication slot as explained in the next section.
This process requires that you specify a decoding plugin. Currently
we support the test_decoding output plugin that ships with
PostgreSQL.
The last item can be done with the following command:
SELECT * FROM pg_create_logical_replication_slot('test_slot', 'test_decoding');
Reference: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.FeatureSupport.LogicalReplication

Error when running sails project in development mode on AWS EC2 instance

I have created an Sails project and I able to run migrations and seeders properly when I connected to localhost mySQL database and AWS RDS instance database from my local system.
But when I have pulled the code on EC2 instance and tried command:
sails lift
It is giving me error while running migrations in alter mode.
Below is the error which I am getting:
When attempting to perform the alter auto-migration strategy on
model archive, Sails encountered an unexpected error when performing
the drop step. This could have happened for a number of different
reasons: be it because your database went offline, because of a db
permission issue, because of some database-specific edge case, or
(more rarely) it could even be due to some kind of bug in this
adapter.
Error details:
{ error:
{ Error: Handshake inactivity timeout
at Handshake.<anonymous> (/home/ubuntu/ipts/ipts-backend-sailjs/node_modules/mysql/lib/protocol/Protocol.js:164:17)
at Handshake.emit (events.js:182:13)
at Handshake.EventEmitter.emit (domain.js:441:20)
at Handshake._onTimeout (/home/ubuntu/ipts/ipts-backend-sailjs/node_modules/mysql/lib/protocol/sequences/Sequence.js:129:8)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)

Stop/Abort PowerExchange Logger Service

I'm getting following errors while trying to stop the PWX logger:
Could not exectute action...
[DOM_10213] Internal error. Could not update the service state in the domain configuration repository because of the following errors:
[RSVCSHARED_00018] Internal error. The request processing failed for the following reason:
['Exception Class[Class javax.persistence.persistenceException] Exception message [org.hibernate.exception.GenericJDBCException: cannot open connection]']
I Tried both complete and Abort option but same issue persists .
Please help me to fix it.
I found the answer.
Actually the password for the informatica user had been expired. I alter the user with the same old password and its working fine.