Creating RDS database failed Reason: Cannot upgrade mysql - mysql

I'm following the instruction here to deploy my ruby on rails app on elastic beanstalks
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Ruby_rails.html
But I got following error when creating RDS database:
2014-04-19 18:35:49 INFO Creating RDS database named: aa8njgjixa22x5. This may take a few minutes.
2014-04-19 18:45:17 ERROR Creating RDS database: aa8njgjixa22x5 failed Reason: Cannot upgrade mysql from 5.6.13 to 5.5.33
2014-04-19 18:45:36 ERROR Stack named 'awseb-e-qzjpemepuc-stack' aborted operation. Current state: 'CREATE_FAILED' Reason: The following resource(s) failed to create: [AWSEBRDSDatabase].
2014-04-19 18:45:39 INFO Launched environment: drinkchatbackend-master. However, there were issues during launch. See event log for details.
Description :
2014-04-19 18:45:36 ERROR Stack named 'awseb-e-qzjpemepuc-stack' aborted operation. Current state: 'CREATE_FAILED' Reason: The following resource(s) failed to create: [AWSEBRDSDatabase].
2014-04-19 18:45:17 ERROR Creating RDS database: aa8njgjixa22x5 failed Reason: Cannot upgrade mysql from 5.6.13 to 5.5.33
Running "eb status --verbose" shows below
RDS Database: AWSEBRDSDatabase | aa8njgjixa22x5.cuokqzbpcqzr.us-west-1.rds.amazonaws.com:3306
Database Engine: mysql 5.6.13
Allocated Storage: 5
Instance Class: db.t1.micro
Multi AZ: False
Master Username: drinkchat
Creation Time: 2014-04-19 18:40:43
DB Instance Status: available
My .elasticbeanstalk/optionsettings080 config does not specifying 5.5.x
[aws:rds:dbinstance]
DBDeletionPolicy=Snapshot
DBEngine=mysql
DBInstanceClass=db.t1.micro
DBSnapshotIdentifier=drinkchatstaging-final-snapshot
DBUser=ebroot
Questions I have:
why it is trying to update to mysql 5.5.33?
how can I proceed investigation? I don;t see the application in
https://console.aws.amazon.com
I can't find the DB instance in the Amazon RDS console.

The work around I used was to not use elastic beanstalk's RDS configuration. instead just launch RDS manually and connect through my app.

Related

Python manage.py dumpdata killed prematurely

I'm migrating a database from MySQL to Postgres. This question has been very helpful. When running the python manage.py dumpdata --exclude contenttypes --indent=4 --natural-foreign > everything_else.json to create a json fixture the connection is aborted by the database server. All other steps have been successful.
The MySQL database is hosted on RDS and the connection is aborted at the same point in the file each time I try to run this (file size is always 12288 bytes). Logs from the RDS instance state the problem as follows (db, user and host changed to dummy values):
[Note] Aborted connection 600000 to db: 'mydb' user: 'myUsername' host: '127.0.0.1' (Got an error writing communication packets)
In the terminal the message is simply killed.
Why would this error be happening and how can I create this json fixture?
Update
To test for timeout issues I've followed the advice in this post to change default timeout values. This has no effect on the problem.
I've also tried modifying the DB instance to one with more memory etc. This had no effect.
Further update
I didn't get to the bottom of this but instead took a different route and used AWS database migration service (DMS). There's a good walkthrough for this here. For my small ~5GB database the migration process took 5 minutes with negligible costs on the smallest DMS instance.

Unable to analyse MySQL error logs in OSSEC

I am trying to analyze MySQL error logs that are generated on my OSSEC agent and raise alerts using OSSEC server.
here is the code block added to /var/ossec/etc/ossec.conf on the agent side to read the error logs of MySQL from the agent:
<localfile>
<log_format>mysql_log</log_format>
<location>/var/log/mysql/error.log</location>
</localfile>
After doing so I have restarted the agent and server but unable test any error logs that are getting generated on the agent side like:
2020-09-15T04:09:24.164859Z 12 [Note] Access denied for user 'root'#'localhost' (using password: YES)
As per doc https://ossec-docs.readthedocs.io/en/latest/docs/programs/ossec-logtest.html under Caveats we need to add MySQL log: to the log generated for the ossec-logtest.
This will be added automatically when we send these logs to the OSSEC server for analysis from the agent.
ossec-logtest result for MySQL error log
ossec-logtest is working fine after adding MySQL log: to the beginning but they are not working in the realtime.
Can anyone please help me through this problem.
The fact that ossec-logtest trigger an alert means that mysql decoder and rules are working fine
Check on Agent
MySql is running. systemctl status mysqld.service
MySql configuration (loglevel and output file) allow to log that kind of event . See here
If the value is greater than 1, aborted connections are written to the
error log, and access-denied errors for new connection attempts are
written.
MySql is effectively logging 'Access denied': grep "Access denied" /var/log/mysql/error.log
Ossec and their processes is running ok: /var/ossec/bin/ossec-control status
Check on Manager
log_alert_level field in /var/ossec/etc/ossec.conf is lower o equal than 9 (loglevel showed in your ossec-logtest)

Knowage installation, database error, mysql

I am trying to install Knowage to my Centos VM in command line and get the following error:
WARNING: please provide a database user that can create schemas. The
following schemas will be created (or overwritten):
knowage_demo
foodmart_demo
JDBC connection failed Database Management System Configuration Use an
already installed DBMS [1, Enter]
Select DBMS for metadata:
MariaDB [1, Enter]
MySQL [2]
2
[jdbc:mysql://localhost:3306]
Username: [root]
Password:
WARNING: please provide a database user that can create schemas.
Any ideas on how to make it working? It keeps getting back to this step.

Unable to start mysql in redmine

Hi I'm unable to start my mysql and subversion using root as user.When im trying to start it by ./ctlscript.sh start mysql it is showing that mysql could not be started.The same is happening in the case of subversion also.In logs its showing that
error: Can't connect to local MySQL server through socket '/data/redmine/mysql/tmp/mysql.sock' (2) (Mysql2::Error)
error: [ pid=6349 thr=139977144923904 file=ext/common/agents/HelperAgent/RequestHandler.h:1731 time=2014-09-29 12:54:58.7821 ]: [Client 23] Cannot checkout session. An error occured while starting up the preloader.
Can any one help?
Please check whether your root user has the permission to start the mysql and other services.
If not please give the permissions using CHMOD

Hive metastore configuration

I configured hive with MYSQL as repository. When I start the hive server using my standard user (infa_hadoop) it is giving me an error "cant connect to metastore using the URI provided".
But if I login as root and start the hive server it starts well.
command used:
hive --service hiveserver
But when I tried to execute the ETL job (informatica) it is giving me the Access control exception!
Error :
Function [INFASQLExecute] failed in adapter [/u01/app/informatica/plugins/dynamic/hiveruntime/libhive.so] with error code [-1].
FnName: INFASQLExecute -- execute(). SQLException: Query returned non-zero code: 12, cause: FAILED: Hive Internal Error: java.lang.RuntimeException(org.apache.hadoop.security.AccessControlException: org.apache.hadoop.security.AccessControlException: Permission denied: user=root, access=WRITE, inode="scratchdir":Infa_Linux:supergroup:rwxr-xr-x)
Function [INFASQLGetDiagRecW] failed in adapter [/u01/app/informatica/plugins/dynamic/hiveruntime/libhive.so] with error code [100].
FnName: INFASQLExecute -- execute(). SQLException: Query returned non-zero code: 12, cause: FAILED: Hive Internal Error: java.lang.RuntimeException(org.apache.hadoop.security.AccessControlException: org.apache.hadoop.security.AccessControlException: Permission denied: user=root, access=WRITE, inode="scratchdir":Infa_Linux:supergroup:rwxr-xr-x)
Function [INFASQLGetDiagRecW] failed in adapter [/u01/app/informatica/plugins/dynamic/hiveruntime/libhive.so] with error code [100].].
But hive is working fine in command promt ? Any suggestions..
First, please check if your hive thrift server is up and running .
It is advised to use the following command to start the hive thrift server
hive --service hiveserver -p 10001
Telnet and check if the server is running in port 10001 , If yes I suppose your issue would be resolved