Explore Courses Blog Tutorials Interview Questions
0 votes
in AWS by (19.1k points)

I have a small site I built using the Play framework that I'm trying to run on an EC2 server against an Amazon RDS instance. I can run the app on my machine against the RDS instance and everything works fine. But when I deploy it to my EC2 server it gets this error:

The last packet successfully received from the server was 1,282,977,731,085 milliseconds ago.  The last packet sent successfully to the server was 0 milliseconds ago.

        at play.db.DBPlugin.onApplicationStart(

        at play.Play.start(

        at play.Play.init(

        at play.server.Server.main(

Caused by: Connection refused

My first thought was it was some kind of security setting, but I have a Spring-based application running in Tomcat on the same EC2 server connecting to the same RDS instance with the same username and password, and it works just fine. Only the Play app has connection issues.

I can't seem to come up with an explanation for why this is happening, or ideas on how to fix it. 

Did anyone saw anything like this before?

1 Answer

0 votes
by (44.4k points)

Connect to the Database, in the same way, both locally and in production. This worked:









Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
0 votes
1 answer

Browse Categories