DbManager could not retrieve a connection
Posted: 27 Apr 2010, 12:28
Hi,
Everthing works fine with the dbManager on my developpement environnement but in production I can't connect to the database.
This is the log file :
INFO | jvm 1 | 2010/04/27 13:51:10 | Errors found in configuration files.
My config.xml works in my developpement environement so why this error?
This is the last part of config.xml file :
Hope you can help me.
Everthing works fine with the dbManager on my developpement environnement but in production I can't connect to the database.
This is the log file :
I don't know what the problem is. My connection string seems ok, login and password too. I tried to connect to the mySql database through phpMyAdmin with my password and login and it works fine. I can't understand why this appears :INFO | jvm 1 | 2010/04/27 13:51:09 | DB Manager Activated ( com.mysql.jdbc.Driver )
INFO | jvm 1 | 2010/04/27 13:51:10 | 13:51:10.691 - [ SEVERE ] > DbManager could not retrive a connection. com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
INFO | jvm 1 | 2010/04/27 13:51:10 |
INFO | jvm 1 | 2010/04/27 13:51:10 | The last packet sent successfully to the server was 10 milliseconds ago. The driver has not received any packets from the server.
INFO | jvm 1 | 2010/04/27 13:51:10 | it.gotoandplay.smartfoxserver.exceptions.DbManagerException: The Test SQL statement failed! Please check your configuration.
INFO | jvm 1 | 2010/04/27 13:51:10 | at it.gotoandplay.smartfoxserver.SmartFoxServer.setupZone(SmartFoxServer.java:1843)
INFO | jvm 1 | 2010/04/27 13:51:10 | at it.gotoandplay.smartfoxserver.lib.ConfigReader.parse_Zones(ConfigReader.java:806)
INFO | jvm 1 | 2010/04/27 13:51:10 | at it.gotoandplay.smartfoxserver.lib.ConfigReader.readZoneConfig(ConfigReader.java:174)
INFO | jvm 1 | 2010/04/27 13:51:10 | at it.gotoandplay.smartfoxserver.SmartFoxServer.initServerSocket(SmartFoxServer.java:339)
INFO | jvm 1 | 2010/04/27 13:51:10 | at it.gotoandplay.smartfoxserver.SmartFoxServer.run(SmartFoxServer.java:607)
INFO | jvm 1 | 2010/04/27 13:51:10 | Problems in config file: The Test SQL statement failed! Please check your configuration.
INFO | jvm 1 | 2010/04/27 13:51:10 | it.gotoandplay.smartfoxserver.exceptions.ConfigurationException: The Test SQL statement failed! Please check your configuration.
INFO | jvm 1 | 2010/04/27 13:51:10 | at it.gotoandplay.smartfoxserver.lib.ConfigReader.readZoneConfig(ConfigReader.java:199)
INFO | jvm 1 | 2010/04/27 13:51:10 | at it.gotoandplay.smartfoxserver.SmartFoxServer.initServerSocket(SmartFoxServer.java:339)
INFO | jvm 1 | 2010/04/27 13:51:10 | at it.gotoandplay.smartfoxserver.SmartFoxServer.run(SmartFoxServer.java:607)
INFO | jvm 1 | 2010/04/27 13:51:10 |
INFO | jvm 1 | 2010/04/27 13:51:10 | Errors found in configuration files.
INFO | jvm 1 | 2010/04/27 13:51:10 | Unable to start the server.
INFO | jvm 1 | 2010/04/27 13:51:10 |
INFO | jvm 1 | 2010/04/27 13:51:10 |
INFO | jvm 1 | 2010/04/27 13:51:10 | Shutting down server...
INFO | jvm 1 | 2010/04/27 13:51:10 | Errors found in configuration files.
My config.xml works in my developpement environement so why this error?
This is the last part of config.xml file :
<!--
Zones Configuration.
-->
<Zones>
<!-- COLONY ZONE START HERE -->
<Zone name="colony_fr" uCountUpdate="false" maxUsers="1000" customLogin="true">
<Rooms>
<Room name="galaxy1" maxUsers="300" isPrivate="false" isTemp="false" uCountUpdate="true" />
<Room name="galaxy2" maxUsers="300" isPrivate="false" isTemp="false" uCountUpdate="true" />
<Room name="galaxy3" maxUsers="300" isPrivate="false" isTemp="false" uCountUpdate="true" />
</Rooms>
<DatabaseManager active="true">
<Driver>com.mysql.jdbc.Driver</Driver>
<ConnectionString>jdbc:mysql://localhost:3306/colony_fr</ConnectionString>
<UserName>root</UserName>
<Password>xxxxx</Password>
<TestSQL><![CDATA[SELECT COUNT(*) FROM users]]></TestSQL>
<MaxActive>10</MaxActive>
<MaxIdle>10</MaxIdle>
<OnExhaustedPool>fail</OnExhaustedPool>
<BlockTime>5000</BlockTime>
</DatabaseManager>
<Extensions>
<extension name="CoreExt" className="colony.ext.CoreExt" type="java" />
<extension name="LoginExt" className="colony.ext.LoginExt" type="java" />
</Extensions>
</Zone>
<!-- COLONY ZONE END HERE -->
</Zones>
Hope you can help me.