Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Can't connect to DB!

Skilled Illusionist
Joined
Oct 20, 2006
Messages
396
Reaction score
48
Hi, my server can't connect to Database. I setted my CentOS IP in all files and my server still can't connect. I'm using router(ASUS RX3041), in router I forwarded 1433(SQL),38111(SERVER) ports and in ODBC.ini setted my external IP(don't work and with Windows IP). Please help me some1! Thx!
 
Skilled Illusionist
Joined
Oct 20, 2006
Messages
396
Reaction score
48
I have this error. That's bad? Thx!

Code:
[Sat Jul 19 2008 06:19:38.226079 3086461152]: open log file  '/var/log/cabal/DBAgent_24.log'
[Sat Jul 19 2008 06:19:38.251368 3086461152]: LOG LEVEL: 3
[Sat Jul 19 2008 06:19:38.251457 3086461152]: MemPoolUnitSizeClass(2): 24576Bytes
[Sat Jul 19 2008 06:19:38.252356 3086461152]: Start DBAgent_24 Server
[Sat Jul 19 2008 06:19:38.253023 3086461152]: UseEcryptText (Off)
[Sat Jul 19 2008 06:19:38.253634 3086457744]: CProcessLayer(0)::svc Start [3086457744]
[Sat Jul 19 2008 06:19:38.253829 3075967888]: CProcessLayer(0)::svc Start [3075967888]
[Sat Jul 19 2008 06:19:38.253944 3065478032]: CProcessLayer(0)::svc Start [3065478032]
[Sat Jul 19 2008 06:19:38.254219 3086461152]: try listening 38181 port
[Sat Jul 19 2008 06:19:38.254525 3054988176]: CProcessLayer(0)::svc Start [3054988176]
[Sat Jul 19 2008 06:19:38.254695 3044498320]: CProcessLayer(0)::svc Start [3044498320]
[Sat Jul 19 2008 06:19:38.896063 3086461152]: accept success 8(192.168.1.3:57571)
[Sat Jul 19 2008 06:19:38.896889 3086461152]: 1.open user 8 [88C7FE8] (192.168.1.3)
[Sat Jul 19 2008 06:19:39.519027 3086461152]: accept success 10(192.168.1.3:57575)
[Sat Jul 19 2008 06:19:39.519258 3086461152]: 2.open user 10 [88D6728] (192.168.1.3)
[Sat Jul 19 2008 06:26:18.955833 3065478032]: [##ERROR##] DB ERROR(MSG)      : [unixODBC][FreeTDS][SQL Server]Server is unavailable or does not exist.
[Sat Jul 19 2008 06:26:18.955934 3065478032]: [##ERROR##] DB ERROR(CODE)     : 20009
[Sat Jul 19 2008 06:26:18.955969 3065478032]: [##ERROR##] DB ERROR(VAR_INFO) : 
[Sat Jul 19 2008 06:26:18.955998 3065478032]: [##ERROR##] DB ERROR(SQLSTATE) : 08S01
[Sat Jul 19 2008 06:26:18.956026 3065478032]: [##ERROR##] DB ERROR(STM_TEXT) : 
[Sat Jul 19 2008 06:26:18.956052 3065478032]: [##ERROR##] Database Connect Fail (uid=sa;pwd=lamukas;dsn=CabalGame24;APP=DBAgent_24)
[Sat Jul 19 2008 06:26:18.956264 3065478032]: [##ERROR##] check 'pDB' fail
[Sat Jul 19 2008 06:26:18.956326 3065478032]: [##ERROR##] 'OnIPCIWarGetLastNationRewardWarResults' fail (Database/InstantWar.cpp:140)
[Sat Jul 19 2008 06:26:18.956359 3065478032]: [##ERROR##] UsrMap Fail : MainCmd(600) Ret(8C:0:140) Addr(192.168.1.3)
 
Upvote 0
The Dinosaur
Member
Joined
Jun 29, 2008
Messages
5,028
Reaction score
999
Check /etc/odbc.ini and make sure there is a [CabalGame24] section. Your DBAgent_24.ini has the user/pass and the other details it is using are in the odbc.ini. It won't be permissions as you are using the sa account so it's either got te wrong ip or a wrong dsn (the [CabalGame24] section).
 
Upvote 0
Skilled Illusionist
Joined
Oct 20, 2006
Messages
396
Reaction score
48
Here is my configs, I didn't see here anything bad.

CentOS IP: 192.168.1.3
Windows IP: 192.168.1.2

odbc.ini
Code:
[CabalGame24]
Driver      = FreeTDS
Address     = 192.168.1.2
Port        = 1433
Database    = GAMEDB
TDS_Version = 8.0

[CabalAccount]
Driver      = FreeTDS
Address     = 192.168.1.2
Port        = 1433
Database    = ACCOUNT
TDS_Version = 8.0

[CabalCash]
Driver      = FreeTDS
Address     = 192.168.1.2
Port        = 1433
Database    = CabalCash
TDS_Version = 8.0

DBAgent_24.ini
Code:
[NetLib]
Port=38181
SendMaxBufSize=65536
SendMaxBufSizeUserHandler=131072
SendMaxBufSizeLinkHandler=1048576
ProcessDataLimit=10000
MaxUserNum=2048
WatchsNoPackLimit=100000
SystemLogTTimeOut=100
ReactorTimeOut=-1
LogLevel=3
MemPoolUnitSizeClass=2

[DBAgent]
ServerIdx=24
DBProcessTNum=5
DSN=CabalGame24

[DSN]
DBId=sa
DBPwd=lamukas
DBAppName=DBAgent_24
 
Upvote 0
The Dinosaur
Member
Joined
Jun 29, 2008
Messages
5,028
Reaction score
999
In which case you are probably missing either the instantwar tables or the stored procedure it's calling. Try backing up your current db and replacing it with the one below as that works ok for me. It's in mssql 2000 format so it should restore on either version and it is a backup file that needs restoring, not attaching.

 
Upvote 0
The Dinosaur
Member
Joined
Jun 29, 2008
Messages
5,028
Reaction score
999
Are you using SQL2005 express? If so there are 2 things that might be the cause.

1. Open the "surface area" config tool from the start menu and make sure the server allows remote connections via TCP/IP as by default it doesn't.

2. Express installs as a "named instance" be default and this isn't what you want. Check the service name under services and if it mentions "SQLEXPRESS" then SQL was installed wrong. Uninstall it and reinstall, check for the panel that mentions named instances and set it to "default instance". You might be able to get around it by specifying "192.168.1.2\SQLEXPRESS" in place of the server name but i have not tried it so it might not work.
 
Upvote 0
Skilled Illusionist
Joined
Oct 20, 2006
Messages
396
Reaction score
48
I installed SQL 2000 SP4 and same problem :-( Someone know what's bad? Thx!
 
Upvote 0
Initiate Mage
Joined
Sep 15, 2005
Messages
32
Reaction score
0
did u exec the dll?
have you check the sql authentication (counterpart of local authentication)?
any firewalls (router and os)?
 
Upvote 0
Skilled Illusionist
Joined
Oct 20, 2006
Messages
396
Reaction score
48
I exec dll, authentication is SQL Server and Windows, I have Windows XP and router.

P.S. I'm using 2 PC's not VMWare!
 
Last edited:
Upvote 0
Initiate Mage
Joined
Sep 15, 2005
Messages
32
Reaction score
0
try loging in lan mode, if not restart d procedures (reinstall all) then follow snowman's or mahi's guide. to check for forward ports just do this example.

can be any ip add.


if you see no errors or it is just a blank page then it has forwarded it to the right ip.
if you really need to check it, use online network check tools, and firewall off.

that is all I can do to help you.

___________________________________________

[Sat Jul 19 2008 06:26:18.955833 3065478032]: [##ERROR##] DB ERROR(MSG) : [unixODBC][FreeTDS][SQL Server]Server is unavailable or does not exist.
means odbc.ini not in proper directory.
 
Upvote 0
Initiate Mage
Joined
Jul 20, 2008
Messages
84
Reaction score
0
Dbl post bump. Hope someone can solve this soon, because we're having the same problems, except that he's using 2000 and I'm using 2005.
 
Upvote 0
Skilled Illusionist
Joined
Oct 20, 2006
Messages
396
Reaction score
48
try loging in lan mode, if not restart d procedures (reinstall all) then follow snowman's or mahi's guide. to check for forward ports just do this example.

can be any ip add.


if you see no errors or it is just a blank page then it has forwarded it to the right ip.
if you really need to check it, use online network check tools, and firewall off.

that is all I can do to help you.

___________________________________________

[Sat Jul 19 2008 06:26:18.955833 3065478032]: [##ERROR##] DB ERROR(MSG) : [unixODBC][FreeTDS][SQL Server]Server is unavailable or does not exist.
means odbc.ini not in proper directory.

I try and were I see blank page when it's good. My odbc.ini is in etc folder and were is my windows ip's 192.168.1.2. so what's bad?
 
Upvote 0
Skilled Illusionist
Joined
Oct 20, 2006
Messages
396
Reaction score
48
:-( Same.

From linux I can open but can't, but from windows I can both. What's bad? Thx!
 
Upvote 0
Back
Top