I am trying to push some of my code to live. I am using aws codebuild and bitbucket pipeline to deploy. When I try to push my change through, the pipeline loops for 40 mins and eventually fails once the codebuild fails. Checking the logs, this is the last thing that happens before it fails.
Step 4/5 : RUN bundle exec rake db:migrate -X -s -q
---> Running in c556f46950e3
WARNING: Use strings for Figaro configuration. true was converted to "true".
rake aborted!
Mysql2::Error: Can't connect to MySQL server (110)
It is also giving this error afterwards.
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
W, [2024-08-06T14:11:25.992477 #6] WARN -- : Creating scope :active. Overwriting existing method Professional.active.
I, [2024-08-06T14:13:26.227433 #6] INFO -- [Bugsnag]: Notifying https://notify.bugsnag.com of Mysql2::Error
D, [2024-08-06T14:13:26.318774 #6] DEBUG -- [Bugsnag]: Request to https://notify.bugsnag.com completed, status: 200
D, [2024-08-06T14:13:26.325314 #6] DEBUG -- [Bugsnag]: Not notifying Mysql2::Error due to ignore being signified in internal middlewares
The command '/bin/sh -c bundle exec rake db:migrate -X -s -q' returned a non-zero code: 1
I am using ruby on rails. I am worried it might be something wrong with how I handled the database but I was hoping somebody could point me in a direction of where to check for problems.
I have tried cleaning up migrations in my ruby on rails and deploying again. (I unfortunately deleted the files manually instead of the proper way)
I tried updating my rds instances as they said they needed an update
The EC2 Security Group is assigned to my RDS correctly.
For more context, This pipeline was working just fine before I tried to push in this new code, so I am thinking it might have something to do with the code. Please let me know if there is any more context I can give
codingman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.