Re: struts failed connection to remote mySQL
From: Sudsy (bitbucket44_at_hotmail.com)
Date: 08/14/04
- Previous message: rgans: "Re: Tomcat 5.0 and JAVA_HOME problem"
- In reply to: David: "struts failed connection to remote mySQL"
- Next in thread: David: "Re: struts failed connection to remote mySQL"
- Reply: David: "Re: struts failed connection to remote mySQL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 13 Aug 2004 20:28:27 -0400
David wrote:
<snip>
> Here is my jdbc connection info:
> <data-source key="musiccollection"
> type="org.apache.commons.dbcp.BasicDataSource">
> <set-property property="description" value="Music Collection
> Database"/>
> <set-property property="driverClassName"
> value="com.mysql.jdbc.Driver"/>
> <set-property property="username" value="sqluser"/>
> <set-property property="password" value="sqluser"/>
> <set-property property="url"
> value="jdbc:mysql://192.168.0.1:3306/musiccollection?autoReconnect=true"/>
> <set-property property="maxCount" value="8"/>
> <set-property property="minCount" value="2"/>
> </data-source>
>
>
> When I try to startup my struts app I get the following error:
>
> INFO: Initializing, config='ApplicationResources', returnNull=true
> Aug 13, 2004 4:49:18 PM org.apache.struts.action.ActionServlet
> initModuleDataSources
> SEVERE: Initializing application data source musiccollection
> org.apache.commons.dbcp.SQLNestedException: Cannot create
> PoolableConnectionFactory (Unable to connect to any hosts due to
> exception: java.net.ConnectException: Operation timed out
<snip>
Looks like mysql isn't listening. On the RedHat server type the
following command:
netstat -a | grep 3306
If you don't see a line somthing like this:
tcp 0 0 *:3306 *:* LISTEN
then you don't have a listener. Also run the following command:
ifconfig eth0
It should show an IP address of 192.168.0.1 if your parameters
are to be believed.
- Previous message: rgans: "Re: Tomcat 5.0 and JAVA_HOME problem"
- In reply to: David: "struts failed connection to remote mySQL"
- Next in thread: David: "Re: struts failed connection to remote mySQL"
- Reply: David: "Re: struts failed connection to remote mySQL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]