Sfs 2x not able to connect to MySql database

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

xenomorphangel
Posts: 6
Joined: 17 Sep 2011, 04:45

Sfs 2x not able to connect to MySql database

Postby xenomorphangel » 23 Sep 2011, 02:35

i'm having problems connecting SFS 2x to MySql, i followed the tutorial at http://docs2x.smartfoxserver.com/GettingStarted/howtos#item2

but i'm getting

Code: Select all

 >> Zone: Heritage
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

11:34:02,453 ERROR [main] db.SFSDBManager     -
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Exception: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException
Message: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driv
er has not received any packets from the server.
Description: The DBManager Test SQL failed
Please double check your SQL code and make sure that Database server is running.


it would be greatly appreciated if some one can direct me to a step by step procedure on how to solve this. does my MySql database port need to be changed? if so how.

SFS 2x RC3 + MySQL version 5.5
appels
Posts: 464
Joined: 28 Jul 2010, 02:12
Contact:

Postby appels » 23 Sep 2011, 09:34

http://docs2x.smartfoxserver.com/DevelopmentBasics/database-recipes

Did you install the MySQL lib in the right place ?
xenomorphangel
Posts: 6
Joined: 17 Sep 2011, 04:45

Postby xenomorphangel » 23 Sep 2011, 09:56

if u mean this file: mysql-connector-java-5.1.17-bin.jar

it's in the G:\SFS2X-RC1a\SFS2X\lib
xenomorphangel
Posts: 6
Joined: 17 Sep 2011, 04:45

Postby xenomorphangel » 25 Sep 2011, 00:14

i realized that the connection string for my setup is jdbc:mysql://localhost:3306/game. now it connects but i’m still getting another error:

Code: Select all

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
>> Zone: test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
09:15:07,172 INFO [main] Extensions – {LoginExtension}: Login extension sta
rting.
09:15:07,176 INFO [main] api.SFSApi – Room created: [ Room: AdminRoom, Id:
2, Group: default, isGame: false ]
09:15:07,181 INFO [main] core.AdminToolService – AdminTool Service started
09:15:08,139 INFO [main] http.SFSHttpServer – Http Server started.
09:15:08,177 WARN [main] bootLogger – Was not able to bind socket: { 127.0.
0.1:9933, (Tcp) }
09:15:08,180 ERROR [main] bootLogger – No bound sockets! Check the boot logs
for possible problems!
09:15:08,184 INFO [main] v2.SmartFoxServer – Listening Sockets:
09:15:08,185 INFO [main] v2.SmartFoxServer -


and the boot logs shows:


Code: Select all

24 Sep 2011 09:15:08,153 INFO [main] bootLogger – Session manager ready: com.smartfoxserver.bitswarm.sessions.DefaultSessionManager@1db88745
24 Sep 2011 09:15:08,163 INFO [main] bootLogger – ReaderSelector opened
24 Sep 2011 09:15:08,175 INFO [main] bootLogger – AcceptSelector opened
24 Sep 2011 09:15:08,177 WARN [main] bootLogger – Was not able to bind socket: { 127.0.0.1:9933, (Tcp) }
24 Sep 2011 09:15:08,178 INFO [main] bootLogger – Controller started: com.smartfoxserver.v2.controllers.SystemController — Queue: 0/20000
24 Sep 2011 09:15:08,179 INFO [main] bootLogger – Controller started: com.smartfoxserver.v2.controllers.ExtensionController — Queue: 0/20000
24 Sep 2011 09:15:08,180 INFO [main] bootLogger – IOHandler: com.smartfoxserver.v2.protocol.SFSIoHandler@61ed627d
24 Sep 2011 09:15:08,180 INFO [main] bootLogger – SocketReader started
24 Sep 2011 09:15:08,180 INFO [main] bootLogger – SocketAcceptor initialized
24 Sep 2011 09:15:08,180 ERROR [main] bootLogger – No bound sockets! Check the boot logs for possible problems!
24 Sep 2011 09:15:08,181 INFO [main] bootLogger – Socket Writer started (pool size:1)
24 Sep 2011 09:15:08,181 INFO [Scheduler1-thread-1] bootLogger – Scheduler started: scheduler
24 Sep 2011 09:15:08,182 INFO [main] bootLogger – Security Manager started
24 Sep 2011 09:15:08,183 INFO [main] bootLogger – [[[ ===--- Boot sequence complete ---=== ]]]
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 26 Sep 2011, 07:25

It seems you have some issues with your server configuration, as SFS is not able to bind 127.0.0.1
Paolo Bax
The SmartFoxServer Team
xenomorphangel
Posts: 6
Joined: 17 Sep 2011, 04:45

Postby xenomorphangel » 27 Sep 2011, 11:01

i solved it. it seems because i did not create exceptions on my windows firewall for SFS default port

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 106 guests