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

  • Home
  • SEARCH
  • 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 5967809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:59:51+00:00 2026-05-22T19:59:51+00:00

There are already several threads where this question is discussed, and I have already

  • 0

There are already several threads where this question is discussed, and I have already tried implementing suggestions discussed in
Elastic Beanstalk -> RDS connection error using Grails.

  • I have also opened ports to accept connections from “All” for ICMP, TCP and UDP in my EC2 instance.

  • I have made sure that my RDS and EC2 instances are in the same zone (Eastern)

  • I have also added the “elasticbeanstalk-default” security group in RDS default security group

  • I have added my local machine’s IP address in RDS CIDR settings, and I am able to connect to RDS through SQLYog from my machine.

BUT when I try to connect my RDS instance from Elastic Beanstalk I am getting the following exception

Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:310)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:176)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:163)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
at java.net.Socket.connect(Socket.java:546)
at java.net.Socket.connect(Socket.java:495)
at java.net.Socket.<init>(Socket.java:392)
at java.net.Socket.<init>(Socket.java:235)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:256)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:293)
... 18 more

Jun 1, 2011 5:12:41 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Jun 1, 2011 5:12:41 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [] startup failed due to previous errors
Jun 1, 2011 5:12:41 AM org.apache.catalina.core.StandardContext listenerStop
SEVERE: Exception sending context destroyed event to listener instance of class         org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener
 org.springframework.beans.factory.BeanCreationException: Error creating bean with name.....
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)

My DataSource.groovy parameters are as follows.

production {
    dataSource {
        pooled = true
        dbCreate = "update" // one of 'create', 'create-drop','update'
        url = "jdbc:mysql://[MyEndPoint]:3306/*****"
        username = "*****"
        password = "*****"
        dialect = org.hibernate.dialect.MySQL5InnoDBDialect
        properties {
            validationQuery = "SELECT 1"
            testOnBorrow = true
            testOnReturn = true
            testWhileIdle = true
            timeBetweenEvictionRunsMillis = 1000 * 60 * 30
            numTestsPerEvictionRun = 3
            minEvictableIdleTimeMillis = 1000 * 60 * 30
        }
    }
}
  • 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-22T19:59:52+00:00Added an answer on May 22, 2026 at 7:59 pm

    I solved it, pretty foolish answer though.

    I always felt (thought) that when building a new WAR file for a Grails project in NetBeans it is created in a “production” environment, but that was not the case. I had to go to the project properties and change “Active grails environment” setting to “production” and this fixed it.

    In a nutshell Amazon Web Services Elastic Beanstalk was trying to connect to my development environment database “localhost”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There have been several questions already posted with specific questions about dependency injection ,
I know there is already a question about this but my issue is more
There are several threads already on how to make custom layouts in the notification
Before this question is marked as duplicate, please read it. ;) There are already
I realize there's already been several questions like this, but I think my case
OK, I know there have already been questions about getting started with TDD ..
There is a very similar question already. One of the solutions uses code like
I have a program with several worker threads, and a main thread that receives
I have some class it is a singleton we have this class in already
Apologies if there is a thread for this already, I couldn't find one that

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.