Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6023941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:04:52+00:00 2026-05-23T04:04:52+00:00

I have a small site I built using the Play framework that I’m trying

  • 0

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(DBPlugin.java:87)
        at play.Play.start(Play.java:381)
        at play.Play.init(Play.java:247)
        at play.server.Server.main(Server.java:85)
Caused by: java.net.ConnectException: 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 any explanation for why this is happening, or ideas on how to fix it.

Anyone seen anything like this before?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T04:04:53+00:00Added an answer on May 23, 2026 at 4:04 am

    The problem is with the application.conf file. If you specify your local DB like this:

    db=mysql:root:pass@db
    

    and your prod DB like this:

    %prod.db.url=jdbc:mysql://<your-db-ip>:3306/db
    %prod.db.user=db_user
    %prod.db.pass=db_pass
    

    You will get this error when trying to run in production because Play! is actually trying to use the db=mysql:root:pass@db param to connect since the prod params don’t override that parameter sepecifically. To fix this, be sure to connect to the DB in the same way locally and in prod. This worked for me:

    db.url=jdbc:mysql://localhost:3306/db
    db.user=root
    db.pass=pass
    
    %prod.db.url=jdbc:mysql://<your-db-ip>:3306/db
    %prod.db.user=db_user
    %prod.db.pass=db_pass
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small app/site on a dev server with a data table in
i have a page for a small mobile site that has an image that
I have a small VB.NET application that I'm working on using the full version
I built a small cms for personal websites using Rails. Each site has a
I have a site built on codeigniter but I have come accross a small
After testing a small site that I built for my school in Firefox, SeaMonkey,
I have a small site (8 or 10 pages) that needs to be translated
I have a small site that sorts news topics by date of submission to
I have a gallery I quickly coded up for a small site, and under
I have a small JS function that does Ajax for me and another like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.