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!

[HELP] Pre-Server--Wrong DB Password

Newbie Spellweaver
Joined
Jun 12, 2017
Messages
13
Reaction score
0
[SOLVED] Pre-Server--Wrong DB Password

Hello everyone,

I downloaded source from St34lth links, compiled with VS2013, created folders for everything, setted the config. files, deleted old atum user from db, created a new one, activadet TCP/IP, changed ports on TCP/IP on IP2/3 and also changed IP with my Local one.

I thought everything was done, but no. Still got this error.

Can someone help me please?

This is PRESERVER log:


Code:
08-28 15:54:03|[Notify] elapsed time after turn on !!  0Day  0h:24m:36s 

08-28 15:54:03|Pre Server Start

08-28 15:54:03|CVMem::AllocVMem VirtualAlloc() success, TypeSize[ 1508] PoolCnt[  100] CommitSize[  151552] vectorSize[1] Address Range(0x7EF50000 ~ 0x7EF75000)

08-28 15:54:03|CVMem::AllocVMem VirtualAlloc() success, TypeSize[ 1528] PoolCnt[  101] CommitSize[  155648] vectorSize[1] Address Range(0x7EF20000 ~ 0x7EF46000

08-28 15:54:03|CVMem::AllocVMem VirtualAlloc() success, TypeSize[ 1552] PoolCnt[15001] CommitSize[23281664] vectorSize[1] Address Range(0x7D8E0000 ~ 0x7EF14000)

08-28 15:54:03|    ServerGroup:                  Ace, Enable(1) MGameServerID(10061)

08-28 15:54:04|  [Notify] CPreGlobal::OnPacketNotifyOfSPToMPWinSoc# 10000 CWinSocket::WS_CONNECTED wParam(1) 

08-28 15:54:04|  [Notify] CPreGlobal::InitServerSocket# Starting... 

08-28 15:54:04|  [Notify] CPreIOCP::IOCPInit# 10000 

08-28 15:54:04|  [Notify] CPreIOCP::IOCPInit# 11000 updated version files !

08-28 15:54:04|  [Notify] CPreIOCP::IOCPInit# 12000 arranged version list !

08-28 15:54:20|[DB Error] fail to connect DBServer(CPreIOCP::IOCPInit_) !! 192.168.1.240,1433 atum2_db_account : Wrong DB Password 

08-28 15:54:22|[Error] PreServer IOCPInit Error08-28 15:54:23|[ERROR] CPreGlobal::OnPacketNotifyOfSPToMPWinSoc_ InitServerSocket_ error !!

08-28 15:54:24|  [Notify] CPreGlobal::EndServerSocket# 
08-28 15:54:24|CGlobalGameServer::EndServerSocket_1
08-28 15:54:24|########################    Server IOCPClean    ########################

08-28 15:54:24|[Notify] CVMem::FreeAllVMem_ TypeSize[ 1508] TotalCommitedObjCnts(   100) CurrentObjCnts(   100)

08-28 15:54:24|[Notify] CVMem::FreeAllVMem_ TypeSize[ 1528] TotalCommitedObjCnts(   101) CurrentObjCnts(   101)

08-28 15:54:24|[Notify] CVMem::FreeAllVMem_ TypeSize[ 1552] TotalCommitedObjCnts( 15001) CurrentObjCnts( 15001)

08-28 15:54:24|Pre Server End0
8-28 15:54:24|CGlobalGameServer::EndServerSocket_1
 
Last edited:
[emoji848]
Legend
Joined
Dec 3, 2011
Messages
2,232
Reaction score
1,518
It would've been an idea to tell what you tried so far and which results you got as you seem to have done a bit of research on the issue already. The latter makes me question if you really found no useful information for this issue as it's something half the forum has run into already.

I think I've summed everything to say about this error up pretty nicely in a post from 2017, I would highly suggest reading it, especially the bullet points at the end of it:

That error is actually logged each time the connection fails for whatever reason that is.

Related code in the Pre Server:

Code:
BOOL bRet = odbcStmt.Init(g_pGlobalGameServer->GetDBServerIP(), g_pGlobalGameServer->GetDBServerPort(), g_pGlobalGameServer->GetDBServerDatabaseName(), (char*)g_pGlobalGameServer->GetODBCUID(), (char*)g_pGlobalGameServer->GetODBCPASSWORD(), g_pGlobalGameServer->GetMainWndHandle());
if (!bRet)
{
	// 2008-09-05 by cmkwon, DBServer ¿¬°á ½ÇÆÐ ½Ã½ºÅÛ ·Î±× ³²±â±â - 
	g_pGlobal->WriteSystemLogEX(TRUE, "[DB Error] fail to connect DBServer(CPreIOCP::IOCPInit_) !! %s,%d %s : Wrong DB Password \r\n"		// 2012-09-24 by jhseol, ¼Ò½ºÁ¤¸® - ÁÖ¼® Á¤¸® ID / PW ¹ÌÃâ·Â
		, g_pGlobalGameServer->GetDBServerIP(), g_pGlobalGameServer->GetDBServerPort(), g_pGlobalGameServer->GetDBServerDatabaseName());	// 2012-09-24 by jhseol, ¼Ò½ºÁ¤¸® - ÁÖ¼® Á¤¸® ID / PW ¹ÌÃâ·Â

	MessageBox(NULL, "DB connect CPreIOCP::IOCPInit()", "ERROR - SpaceCowboy PreServer", NULL);
	return FALSE;
}

Their logging is as usual not of any help unless you really wrote a wrong password.

Try to connect to your SQL serv with the Management Studio using the credentials that you put in the global.cfg and see what error the Management Studio gives you.

Common reasons for this are:
  • TCP is not configured correctly for the SQL server (check in the Configuration Manager)
  • The server does not allow SQL authentication
  • The username is wrong
  • The password is wrong
  • You did or did not XOR the credentials in the global.cfg (depends on the bins)
 
Upvote 0
Newbie Spellweaver
Joined
Jun 12, 2017
Messages
13
Reaction score
0
Thank you for your answer.
I have already read this post Future. I tried your solutions:
- As i said, i checked my TCP/IP configs;
-SQL mixed is checked (as explained in St34lth guide);
-To start i used atum and callweb ID/PASS (already checked configs and src , they are ok);
-i tried configs with XORED and not XORED credentials.

i also checked Bins configs to make me sure there is nothing uncorrect, but everything seems to be Ok.

Maybe im doing something wrong with the encoding of credentials? Any suggestion to do this in the correct way?

Thank you for your help :D
 
Last edited:
Upvote 0
Newbie Spellweaver
Joined
Feb 2, 2015
Messages
77
Reaction score
53
Maybe id/pass not xored? If you have src then modify log to show currently used id/pass
i suggest you to follow inetpub word.

put this line for debug your db id and password first
(Address: gameserver/preserver/main/PreIOCP.cpp / find this this word "BOOL bRet = odbcStmt.Init" then add this below that line)
g_pGlobal->WriteSystemLogEX(TRUE, "[DB PreIOCP DEBUG] %s, %s \r\n", (char*)g_pGlobalGameServer->GetODBCUID(), (char*)g_pGlobalGameServer->GetODBCPASSWORD());
 
Upvote 0
[emoji848]
Legend
Joined
Dec 3, 2011
Messages
2,232
Reaction score
1,518
But have you actually tried connecting to the SQL Server via the SQL Server Management Studio using the IP, User ID and Password you've set in the configs? If that doesn't connect, there is no chance your game servers will. + SSMS' error reporting is a ton better than masang's. You might get some useful information out of that.
 
Upvote 0
Newbie Spellweaver
Joined
May 18, 2023
Messages
11
Reaction score
0
Just check your settings. SQL server and source code.
Already checked. I don't find the mistake. Attatched Logs + source/global.
Hopefully someone can point out where my mistake is. :)

I don't think the problem would be caused by this, right?
#else #define CHOICE_PRE_SERVER_IP_OR_DOMAIN_IN_XOR "5F4815153D16145E3B147E0940455F0A1D4C0A4950335E085B5C054A0F1612" #endif
It's the previous domain, but provided IP is current/right one.

Here are the login properties for 'atum':
-Securables: everything granted (by sa)

Tried it with and without 'Map to Credential'
 

Attachments

You must be registered for see attachments list
Last edited:
Upvote 0
Newbie Spellweaver
Joined
Aug 6, 2022
Messages
14
Reaction score
2
Already checked. I don't find the mistake. Attatched Logs + source/global.
Hopefully someone can point out where my mistake is. :)

I don't think the problem would be caused by this, right?
#else #define CHOICE_PRE_SERVER_IP_OR_DOMAIN_IN_XOR "5F4815153D16145E3B147E0940455F0A1D4C0A4950335E085B5C054A0F1612" #endif
It's the previous domain, but provided IP is current/right one.

Here are the login properties for 'atum':
-Securables: everything granted (by sa)

Tried it with and without 'Map to Credential'
Hello, The tutorial about setting the database is not correct. In the new SQLServer version, when we restore database and add a account atum/callweb. The SQLServer will show an error that this account is already existed and "THE SQL SERVER DONT OVERWRITE THE NEW ACCOUNT WHICH WERE ADDED BY OUR COMPUTER".
So, We should add an account atum/callweb first and then restore the database. This will solve the problem. !!
 
Upvote 0
Newbie Spellweaver
Joined
May 18, 2023
Messages
11
Reaction score
0
Hello, The tutorial about setting the database is not correct. In the new SQLServer version, when we restore database and add a account atum/callweb. The SQLServer will show an error that this account is already existed and "THE SQL SERVER DONT OVERWRITE THE NEW ACCOUNT WHICH WERE ADDED BY OUR COMPUTER".
So, We should add an account atum/callweb first and then restore the database. This will solve the problem. !!
Thanks but didn't help. I re-downloaded Angry Catster v1.2 release, changed IP on global.cfg (others are preconfigured to 127.0.0.1 and atum/callweb). Deleted DB, User and tried any combination of which one first.
Still the same password error.

PreServer log v1.2:
05-21 08:41:33.864|[Notify] elapsed time after turn on !! 1Day 14h: 3m:23s LogFileCreateCount( 1) ServerCreateTime[[ERROR] fopen( szServerName, rb )] 05-21 08:41:33.864|Pre Server Start 05-21 08:41:33.864| ServerGroup: ACE46, Enable(1) MGameServerID(10061) 05-21 08:41:33.864| [Notify] [S_ALLOWED_IP_RELOAD_JHSEOL] AllowedToolIP Add (127.0.0.1) 05-21 08:41:33.864| [Notify] [S_ALLOWED_IP_RELOAD_JHSEOL] AllowedToolIP Add (13.137.042.069) 05-21 08:41:33.864| [Notify] [S_ALLOWED_IP_RELOAD_JHSEOL] Reload AllowedToolIP Count ( 2) AllowedToolIPList Version 05-21 08:41:34.896| [Notify] CPreGlobal::OnPacketNotifyOfSPToMPWinSoc# 10000 CWinSocket::WS_CONNECTED wParam(0) 05-21 08:41:34.896| [Notify] CPreGlobal::InitServerSocket# Starting... 05-21 08:41:34.896| [Notify] CPreIOCP::IOCPInit# 10000 05-21 08:41:34.896| [Notify] CPreIOCP::IOCPInit# 11000 updated version files ! 05-21 08:41:34.896| [Notify] CPreIOCP::IOCPInit# 12000 arranged version list ! 05-21 08:41:51.755|[DB Error] fail to connect DBServer(CPreIOCP::IOCPInit_) !! 13.137.042.069,1433 atum2_db_account : Wrong DB Password 05-21 08:42:38.817|[Error] PreServer IOCPInit Error 05-21 08:42:39.286|[ERROR] CPreGlobal::OnPacketNotifyOfSPToMPWinSoc_ InitServerSocket_ error !!

PreServer log linked in the zip above:
05-20 19:55:01.842|[Notify] elapsed time after turn on !! 1Day 1h:16m:51s LogFileCreateCount( 1) ServerCreateTime[[ERROR] fopen( szServerName, rb )] 05-20 19:55:01.842|Pre Server Start 05-20 19:55:01.857| ServerGroup: F4FUN, Enable(1) MGameServerID(10061) 05-20 19:55:01.857| [Notify] [S_ALLOWED_IP_RELOAD_JHSEOL] AllowedToolIP Add (127.0.0.1) 05-20 19:55:01.857| [Notify] [S_ALLOWED_IP_RELOAD_JHSEOL] AllowedToolIP Add (13.137.042.069) 05-20 19:55:01.857| [Notify] [S_ALLOWED_IP_RELOAD_JHSEOL] AllowedToolIP Add (0.0.0.0) 05-20 19:55:01.857| [Notify] [S_ALLOWED_IP_RELOAD_JHSEOL] Reload AllowedToolIP Count ( 3) AllowedToolIPList Version 05-20 19:55:02.888| [Notify] CPreGlobal::OnPacketNotifyOfSPToMPWinSoc# 10000 CWinSocket::WS_CONNECTED wParam(0) 05-20 19:55:02.888| [Notify] CPreGlobal::InitServerSocket# Starting... 05-20 19:55:02.888| [Notify] CPreIOCP::IOCPInit# 10000 05-20 19:55:02.888| [Notify] CPreIOCP::IOCPInit# 11000 updated version files ! 05-20 19:55:02.888| [Notify] CPreIOCP::IOCPInit# 12000 arranged version list ! 05-20 19:55:19.779|[DB Error] fail to connect DBServer(CPreIOCP::IOCPInit_) !! 13.137.042.069,1433 atum2_db_account : Wrong DB Password 05-20 19:55:19.779|[DB PreIOCP DEBUG] atum, callweb 05-20 19:55:45.513|[Error] PreServer IOCPInit Error 05-20 19:55:46.092|[ERROR] CPreGlobal::OnPacketNotifyOfSPToMPWinSoc_ InitServerSocket_ error !!
 
Last edited:
Upvote 0
Newbie Spellweaver
Joined
Aug 11, 2022
Messages
57
Reaction score
177
Thanks but didn't help. I re-downloaded Angry Catster v1.2 release, changed IP on global.cfg (others are preconfigured to 127.0.0.1 and atum/callweb). Deleted DB, User and tried any combination of which one first.
Still the same password error.

PreServer log v1.2:
05-21 08:41:33.864|[Notify] elapsed time after turn on !! 1Day 14h: 3m:23s LogFileCreateCount( 1) ServerCreateTime[[ERROR] fopen( szServerName, rb )] 05-21 08:41:33.864|Pre Server Start 05-21 08:41:33.864| ServerGroup: ACE46, Enable(1) MGameServerID(10061) 05-21 08:41:33.864| [Notify] [S_ALLOWED_IP_RELOAD_JHSEOL] AllowedToolIP Add (127.0.0.1) 05-21 08:41:33.864| [Notify] [S_ALLOWED_IP_RELOAD_JHSEOL] AllowedToolIP Add (13.137.042.069) 05-21 08:41:33.864| [Notify] [S_ALLOWED_IP_RELOAD_JHSEOL] Reload AllowedToolIP Count ( 2) AllowedToolIPList Version 05-21 08:41:34.896| [Notify] CPreGlobal::OnPacketNotifyOfSPToMPWinSoc# 10000 CWinSocket::WS_CONNECTED wParam(0) 05-21 08:41:34.896| [Notify] CPreGlobal::InitServerSocket# Starting... 05-21 08:41:34.896| [Notify] CPreIOCP::IOCPInit# 10000 05-21 08:41:34.896| [Notify] CPreIOCP::IOCPInit# 11000 updated version files ! 05-21 08:41:34.896| [Notify] CPreIOCP::IOCPInit# 12000 arranged version list ! 05-21 08:41:51.755|[DB Error] fail to connect DBServer(CPreIOCP::IOCPInit_) !! 13.137.042.069,1433 atum2_db_account : Wrong DB Password 05-21 08:42:38.817|[Error] PreServer IOCPInit Error 05-21 08:42:39.286|[ERROR] CPreGlobal::OnPacketNotifyOfSPToMPWinSoc_ InitServerSocket_ error !!

PreServer log linked in the zip above:
05-20 19:55:01.842|[Notify] elapsed time after turn on !! 1Day 1h:16m:51s LogFileCreateCount( 1) ServerCreateTime[[ERROR] fopen( szServerName, rb )] 05-20 19:55:01.842|Pre Server Start 05-20 19:55:01.857| ServerGroup: F4FUN, Enable(1) MGameServerID(10061) 05-20 19:55:01.857| [Notify] [S_ALLOWED_IP_RELOAD_JHSEOL] AllowedToolIP Add (127.0.0.1) 05-20 19:55:01.857| [Notify] [S_ALLOWED_IP_RELOAD_JHSEOL] AllowedToolIP Add (13.137.042.069) 05-20 19:55:01.857| [Notify] [S_ALLOWED_IP_RELOAD_JHSEOL] AllowedToolIP Add (0.0.0.0) 05-20 19:55:01.857| [Notify] [S_ALLOWED_IP_RELOAD_JHSEOL] Reload AllowedToolIP Count ( 3) AllowedToolIPList Version 05-20 19:55:02.888| [Notify] CPreGlobal::OnPacketNotifyOfSPToMPWinSoc# 10000 CWinSocket::WS_CONNECTED wParam(0) 05-20 19:55:02.888| [Notify] CPreGlobal::InitServerSocket# Starting... 05-20 19:55:02.888| [Notify] CPreIOCP::IOCPInit# 10000 05-20 19:55:02.888| [Notify] CPreIOCP::IOCPInit# 11000 updated version files ! 05-20 19:55:02.888| [Notify] CPreIOCP::IOCPInit# 12000 arranged version list ! 05-20 19:55:19.779|[DB Error] fail to connect DBServer(CPreIOCP::IOCPInit_) !! 13.137.042.069,1433 atum2_db_account : Wrong DB Password 05-20 19:55:19.779|[DB PreIOCP DEBUG] atum, callweb 05-20 19:55:45.513|[Error] PreServer IOCPInit Error 05-20 19:55:46.092|[ERROR] CPreGlobal::OnPacketNotifyOfSPToMPWinSoc_ InitServerSocket_ error !!
Damn I hate DB connection problems.
Try starting servers once, then open mssql management studio, go to management - > SQL Server Logs -> Current
Firstly, it should have at least one line saying “Server is listening on [‘any’ <ipv4> 1433]”
Secondly, if db refuses the connection, there should be some Source: Logon errors. Something like “Login failed for user…”. If there are none of these, then server probably doesn’t see the db at all.
Also see if you can connect to mssql management studio with atum callweb credentials.
Btw I didn’t use SQLexpress, so it might me a problem as well.
 
Upvote 0
Newbie Spellweaver
Joined
May 18, 2023
Messages
11
Reaction score
0
Damn I hate DB connection problems.
Try starting servers once, then open mssql management studio, go to management - > SQL Server Logs -> Current
Firstly, it should have at least one line saying “Server is listening on [‘any’ <ipv4> 1433]”
Secondly, if db refuses the connection, there should be some Source: Logon errors. Something like “Login failed for user…”. If there are none of these, then server probably doesn’t see the db at all.
Also see if you can connect to mssql management studio with atum callweb credentials.
Btw I didn’t use SQLexpress, so it might me a problem as well.
Downgraded SQL2019 -> SQL2017 but it didn't fix the issue. After checking SQL Logs and changing 'IPAll' to 1433 in config manager I have no more errors. Appears that either one of them works (Dynamic/Port).
Thank you!

Maybe someone has a better solution or an explanation but that's what worked for me.
 
Upvote 0
Junior Spellweaver
Joined
Sep 12, 2014
Messages
119
Reaction score
34
Why don't you use a local IP?
127.0.0.1
try to connect it locally.
and if it doesn't work contact me
Soviet#6964
 
Upvote 0
Back
Top