Flyway Database Migrations on Bluehost Shared Hosting - database-migration

Folks,
I'm trying to use Flyway on a shared Bluehost server and I'm getting a very cryptic error. Not sure how to troubleshoot.. I'm confident that the basic connection / credentials are working, since changing flyway config settings to a wrong password produces a different error.
Note that I'm able to connect to the database from the command line from the server box using 'mysql -u blah -p' just fine.
Any hints on how to troubleshoot the below? Output from flyway -X init is below.
Flyway config file: http://pastebin.com/8dsWE3W2
Output from ./flyway -X init
/usr/bin/tput
Flyway (Command-line Tool) v.3.0
DEBUG: Adding location to classpath: /home1/philost2/checkout/cocktailbuilder-master/server/_devtools/flyway/bin/../jars/mysql-connector-java-5.1.30-bin.jar
DEBUG: Adding location to classpath: /home1/philost2/checkout/cocktailbuilder-master/server/_devtools/flyway/bin/../jars/h2-1.3.170.jar
ERROR: Unexpected error
org.flywaydb.core.api.FlywayException: Unable to obtain Jdbc connection from DataSource (jdbc:mysql://localhost/philost2_cocktailbuilder_prod?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false) for user '<redacted>'
at org.flywaydb.core.internal.util.jdbc.DriverDataSource.getConnectionFromDriver(DriverDataSource.java:266)
at org.flywaydb.core.internal.util.jdbc.DriverDataSource.getConnection(DriverDataSource.java:226)
at org.flywaydb.core.internal.util.jdbc.JdbcUtils.openConnection(JdbcUtils.java:50)
at org.flywaydb.core.Flyway.execute(Flyway.java:1144)
at org.flywaydb.core.Flyway.init(Flyway.java:970)
at org.flywaydb.commandline.Main.executeOperation(Main.java:118)
at org.flywaydb.commandline.Main.main(Main.java:88)
Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '??????????????' at line 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1049)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4232)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4164)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2615)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2776)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2832)
at com.mysql.jdbc.ConnectionImpl.configureClientCharacterSet(ConnectionImpl.java:1937)
at com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3720)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2554)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2321)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:832)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:413)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:344)
at org.flywaydb.core.internal.util.jdbc.DriverDataSource.getConnectionFromDriver(DriverDataSource.java:264)

Related

AWS: ERROR: Pre-processing of application version xxx has failed and Some application versions failed to process. Unable to continue deployment

Hi I am trying to deploy a node application from cloud 9 to ELB but I keep getting the below error.
Starting environment deployment via CodeCommit
--- Waiting for Application Versions to be pre-processed --- ERROR: Pre-processing of application version app-491a-200623_151654 has
failed. ERROR: Some application versions failed to process. Unable to
continue deployment.
I have attached an image of the IAM roles that I have. Any solutions?
Go to your console and open up your elastic beanstalk console. Go to both applications and environments and delete them. Then in your terminal hit
eb init #Follow instructions
eb create --single ##Follow instructions.
It would fix the error, which is due to some application states which are failed. If you want to check those do
aws elasticbeanstalk describe-application-versions
I was searching for this answer as a result of watching a YouTube tutorial for how to pass the AWS Certified Developer Associate exam. If anyone else gets this error as a result of that tutorial, delete the 002_node_command.config file created in the tutorial and commit that change, as that is causing the error to occur.
A failure within the pre-processing phase, may be caused by an invalid manifest, configuration or .ebextensions file.
If you deploy an (invalid) application version using eb deploy and you enable the preprocess option, The details of the error will not be revealed.
You can remove the --process flag and enable the verbose option to improve error output.
in my case I deploy using this command:
eb deploy -l "XXX" -p
And can return a failure when I mess around with .ebextensions:
ERROR: Pre-processing of application version xxx has failed.
ERROR: Some application versions failed to process. Unable to continue deployment.
With that result I can't figure up what is wrong,
but deploying without -p (or --process)and adding -v (verbose) flag:
eb deploy -l "$deployname" -v
It returns something more useful:
Uploading: [##################################################] 100% Done...
INFO: Creating AppVersion xxx
ERROR: InvalidParameterValueError - The configuration file .ebextensions/16-my_custom_config_file.config in application version xxx contains invalid YAML or JSON.
YAML exception: Invalid Yaml: while scanning a simple key
in 'reader', line 6, column 1:
(... details of the error ...)
, JSON exception: Invalid JSON: Unexpected character (#) at position 0.. Update the configuration file.
Now I can fix the problem.

OpenStack Keystone: "The service catalog is empty." after issuing any command

I'm just back after installing Keystone following the OpenStack docs: Install and configure of Keystone.
I'm running CentOS 7 and OpenStack Stein.
I've noted on this page a missing step on the recipe (keystone-manage db_sync that creates the tables on keystone DB and keystone-manage bootstrap ... well, I'd like to know what exactly performs this command!).
Well, issuing the command:
openstack domain create --description "An Example Domain" example
(as documented in Create a domain, projects, users, and roles) I get the following message:
The service catalog is empty.
Also issuing the command openstack domain list I get the same result.
On /var/log/keystone.log I have:
WARNING keystone.access_rules_config.backends.json [-] No config file found for access rules, application credential access rules will be unavailable.: IOError: [Errno 2] No such file or directory: '/etc/keystone/access_rules.json'
On /var/log/httpd/keystone_access.log I have all 201 (Created) status or 200 when raising commands.
So, it's sure I'm missing something in my configuration; I've already googled around with no results; any help will be strongly appreciated.

Issue with Heoku Postgres "could not access file “$libdir/postgis-2.1"

I have a project that works with GeoDjango, Postgis and its deploy it in Heroku.
Some info of what I'm using:
Python 2.7.15
Django 1.11.20
Heroku-18 (Stack)
Postgres 9.4.20
Postgis 2.1.8
In the last months the system threw me an error every time I want to load de geografic info, when I execute a geocode query.
ERROR: could not access file "$libdir/postgis-2.1": No such file or
directory
I have looked for the web and stackoverflow for the solutions and I found some that was really near of my problem but I tried their solutions and doesn't work for me.
I tried the "ALTER EXTENSION postgis UPDATE" solution but throw me this error:
ERROR: cannot create temporary table within security-restricted
operation
I tried the "backup your DB, Drop the local database and restaurations" but when I run the comand pg:backups:capture I get
An error occurred and the backup did not finish.
When I run the pg:backups:info
And trow me this:
2019-03-02 23:08:31 +0000 pg_dump: [archiver (db)] query failed:
ERROR: could not access file "$libdir/postgis-2.1": No such file or
directory ... (some database code) 2019-03-02 23:08:31 +0000
waiting for pg_dump to complete 2019-03-02 23:08:31 +0000 pg_dump
finished with errors
Then I found this entry
Update PostGIS extensions on Heroku
And found that it's the same problem that I have with heroku postgres, (but the author is using ruby) and the author says that was helped by the support team of Heroku. Well I create a ticket and find that "Technical support for Free applications is provided by the online community" and stackoverflow, so I tried to add a comment to this user to say samething like "hey, can you share the solution please? I have the same problem." but I haven't enough reputation to do it.
So what can I do?
I found the solution !!!
With an old db backup archive that I had, I reset the db from the heroku datastores section and after that I restored with the backup archive (with pgAdmin III) and the problem its gonne.
Its seems like the error was with postgis version, becouse when I had the problem my postgis version was 2.1.8 and now with the error solved my versión of postgis is 2.4.4.
I hope it is useful to someone.

Drush 7 does not work with 'localhost'

I'm not able to use 'drush status' when 'localhost' is in my settings. If I switch to '127.0.0.1', Drush status works, but it isn't connected properly; ading a port hangs it. I'm using MAMP Pro 3, and it prefers 'localhost' and port 8889. If I use the IP version, MAMP throws a PDO exception (or times out, depending on whether I add a port).
How do I configure MAMP 3 to work with Drush?
Except for the MAMP version, my problem is similar to Drush enable error and Drush install on local server error (Command pm-enable needs a higher bootstrap level). I have created the symbolic link recommended there, but I'm not sure whether MAMP uses the /var path.
My error is:
<h1>Additional uncaught exception thrown while handling exception.</h1>
<h2>Original</h2><p>PDOException: SQLSTATE[HY000] [2002] No such file or directory in drupal_is_denied()
(line 1921 of /Users/mypath/includes/bootstrap.inc).</p><h2>Additional</h2><p>PDOException: SQLSTATE[HY000] [2002]
No such file or directory in _registry_check_code() (line 3194 of /Users/mypath/includes/bootstrap.inc).</p>
<hr />Drush command terminated abnormally due to an unrecoverable error.
[error]
Found my own answer. This error is related to MAMP using a different version of PHP. When I changed my $PATH to point to the correct version, Drush started working correctly.
Steps:
Check MAMP's phpinfo to find the path to the PHP version it is using.
Edit .bash_profile with something like (making sure to use the correct PHP version):
export PATH="/Applications/MAMP/Library/bin:/Applications/MAMP/bin/php/php5.6.10/bin:$PATH"

WSO2 Identity Server SAML Error encrypting XMLObject at Example Travelocity

When setting in the sample app: Travelocity.properties
#Specify if SAM LAssertion element is encrypted
SAML.EnableAssertionEncryption=true
And also tick the Identity server configuration option:
Enable Assertion Encryption [ticked]
Certificate Alias: wso2carbon
I receive the following error at the server log:
Error at Log: 2015-05-05 15:56:10,282 Error encrypting XMLObject
Without the encryption feature enabled, the SAML authentication flow with the Travelocity sample code starts working.
Hints are welcome how to fix this issue.
Regards,
Claude
It seems like you are working on the installed java runtime for the first time. I am using ubuntu 14. The same problem came to me. For me it worked in the following way.
1. Download the respective files according to your runtime from here.
http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html
http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html
http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
2. Extract the folder you downloaded. There will be two .jar files.
3. For ubuntu you can run echo $JAVA_HOME to find the java home. Copy above jar files into {JAVA_HOME}/jre/lib/security. You may need sudo access depending on you JAVA_HOME location. If so run the following from the location you extracted the zip file.
cp local_policy.jar /{JAVA_HOME}/jre/lib/security
cp US_export_policy.jar /{JAVA_HOME}/jre/lib/security
There should be only one slash (/) at /{JAVA_HOME}.
4. Restart wso2 identity server again and retry the procedure to login to travelocity.com
Hope this will fix your issue.