Skip to forum content

You are not logged in. Please login or register.


forums.pvpgn.pro → [EN] Tech Support → [SOLVED] New win server having issue between d2cs and bnetd

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 12

1 (edited by justaplaneguy 17.02.2022 21:23)

Topic: [SOLVED] New win server having issue between d2cs and bnetd

Hi everyone -

I'm trying to standup a new server for my kids to bat around in, and seem to be having a looping or connection issue between bnetd and d2cs, not what the issue is but I'm sure it's something silly that someone here probably can spot right away.

Please note everything is running off the same physical machine (A win Server 2019 box). Just keep filling off the logs with these never ending errors.

d2cs.log

Feb 14 13:54:06 [info ] pvpgn::d2cs::s2s_create: try make s2s connection to 192.168.3.110:6112
Feb 14 13:54:06 [info ] pvpgn::d2cs::s2s_create: connection to s2s server 192.168.3.110:6112 is in progress
Feb 14 13:54:06 [info ] pvpgn::d2cs::d2cs_conn_create: created session=5298 socket=692 (2 current connections)
Feb 14 13:54:06 [info ] pvpgn::d2cs::conn_handle_connecting: connected to 192.168.3.110:6112
Feb 14 13:54:06 [info ] pvpgn::d2cs::handle_bnetd_init: sent init class packet to bnetd
Feb 14 13:54:06 [info ] pvpgn::d2cs::on_bnetd_authreq: received bnetd sessionnum 557
Feb 14 13:54:06 [info ] pvpgn::d2cs::on_bnetd_authreply: authed by bnetd
Feb 14 13:54:06 [info ] pvpgn::d2cs::d2cs_conn_destroy: [692] closed connection 5298 (1 left)
Feb 14 13:54:06 [info ] pvpgn::d2cs::d2cs_conn_destroy: [1664] closed connection 5279 (0 left)

bnetd.log

Feb 14 13:54:06 [info ] pvpgn::bnetd::sd_accept: [1008] accepted connection from 192.168.3.110:60531 on 0.0.0.0:6112
Feb 14 13:54:06 [info ] pvpgn::bnetd::handle_init_packet: [1008] client initiated d2cs_bnetd connection
Feb 14 13:54:06 [info ] pvpgn::bnetd::handle_d2cs_init: sent init packet to d2cs (sessionnum=557)
Feb 14 13:54:06 [info ] pvpgn::bnetd::on_d2cs_authreply: d2cs 192.168.3.110 authed
Feb 14 13:54:06 [info ] pvpgn::bnetd::realm_deactive: realm CrazyEights deactivated
Feb 14 13:54:06 [info ] pvpgn::bnetd::realm_active: realm CrazyEights active
Feb 14 13:54:06 [info ] pvpgn::bnetd::realm_deactive: realm CrazyEights deactivated
Feb 14 13:54:06 [info ] pvpgn::bnetd::conn_destroy: [1004] closed d2cs_bnetd connection
Feb 14 13:54:06 [error] pvpgn::bnetd::realm_deactive: realm CrazyEights is not active
Feb 14 13:54:06 [info ] pvpgn::bnetd::conn_destroy: [1008] closed d2cs_bnetd connection

Any help would be much appreciated. Thanks!

2

Re: [SOLVED] New win server having issue between d2cs and bnetd

Submit the configuration files to validate that everything is ok...

Files:

address_translation.conf
d2cs.conf
d2dbs.conf
realm.conf
Diablo 2 Online

ItemWizard - Rank - Armory - Market - Clans - Builds

3

Re: [SOLVED] New win server having issue between d2cs and bnetd

Feofilaktt wrote:

Submit the configuration files to validate that everything is ok...

Files:

address_translation.conf
d2cs.conf
d2dbs.conf
realm.conf

address_translation.conf - is completely untouched for right now as I'm only testing internally on my network for the time being, and will open up to external connections later. Maybe this is the problem? I thought it only needed to be configured if testing with external IP networks?

d2cs.conf - has the following configured. Relevant settings copied below:

realmname        =    CrazyEights
servaddrs        =    0.0.0.0:6113
gameservlist        =    192.168.3.110
bnetdaddr        =    192.168.3.110:6112
max_connections = 1000
lod_realm = 2
allow_convert = 0
account_allowed_symbols = "-_[]"
loglevels = fatal,error,warn,info,debug,trace
logfile            =    var\d2cs.log
charsavedir        =    var\charsave
charinfodir        =    var\charinfo
bak_charsavedir        =    var\bak\charsave
bak_charinfodir        =    var\bak\charinfo
ladderdir        =    var\ladders
transfile        =    conf\address_translation.conf
d2gsconffile        =    conf\d2server.ini
newbiefile_amazon        =    files\newbie.save
newbiefile_sorceress        =    files\newbie.save
newbiefile_necromancer        =    files\newbie.save
newbiefile_paladin        =    files\newbie.save
newbiefile_barbarian        =    files\newbie.save
newbiefile_druid        =    files\newbie.save
newbiefile_assasin        =    files\newbie.save
d2gs_password = "<Customized....>"  - matches everything else

d2dbs.conf - has the following configured (relevant settings only)

servaddrs    = 0.0.0.0:6114
gameservlist            =       192.168.3.110

realm.conf - has the following configured (relevant settings only)

"CrazyEights"            "Welcome to My Server"        192.168.3.110:6113

4

Re: [SOLVED] New win server having issue between d2cs and bnetd

Just in case... fill the address_tranlation.conf with the IP and also fill the servaddrs in d2cs.conf and d2dbs.conf.

The application should run fine.

Diablo 2 Online

ItemWizard - Rank - Armory - Market - Clans - Builds

5 (edited by justaplaneguy 16.02.2022 09:25)

Re: [SOLVED] New win server having issue between d2cs and bnetd

Feofilaktt wrote:

Just in case... fill the address_tranlation.conf with the IP and also fill the servaddrs in d2cs.conf and d2dbs.conf.

The application should run fine.

That worked but I have a new issue.

So I was able to login client side, create a new account successfully, create an in game character, go into a game, but when I come back out and quit to the screen where you would normally see your list of created characters..... it's blank, like it never saved it.
I've tried creating multiple characters, and it's the same result every time.

The D2CS log is the only log that indicates anything.... and it says "it  failed to create charinfo directory...."

Feb 15 22:24:23 [info ] pvpgn::d2cs::on_d2cs_initconn: [124] client initiated d2cs connection
Feb 15 22:24:23 [info ] pvpgn::d2cs::on_client_loginreq: got client (*TheBigBadDad) login request sessionnum=0x1
Feb 15 22:24:23 [info ] pvpgn::d2cs::on_bnetd_accountloginreply: account TheBigBadDad authed
Feb 15 22:24:23 [error] pvpgn::d2cs::on_client_charlistreq_110: (*TheBigBadDad) charinfo directory do not exist, building it
Feb 15 22:24:23 [error] pvpgn::d2cs::on_client_charlistreq_110: Failed to create charinfo directory (C:\pvpgnmagic\release\var\charinfo/thebigbaddad), errno = 17
Feb 15 22:24:35 [info ] pvpgn::d2cs::on_client_createcharreq: (*TheBigBadDad) charinfo directory do not exist, building it
Feb 15 22:24:35 [info ] pvpgn::d2cs::d2char_create: character test(*TheBigBadDad) class 4 status 0x65 created
Feb 15 22:24:35 [info ] pvpgn::d2cs::on_client_createcharreq: character test(*TheBigBadDad) created
Feb 15 22:24:35 [info ] pvpgn::d2cs::on_bnetd_charloginreply: character test authed
Feb 15 22:24:43 [info ] pvpgn::d2cs::d2cs_game_create: game Test pass= desc=gameflag=0x00300804 created (1 total)
Feb 15 22:24:43 [info ] pvpgn::d2cs::on_client_creategamereq: request create game Test on gs 1
Feb 15 22:24:43 [info ] pvpgn::d2cs::on_d2gs_creategamereply: game Test created on gs 1
Feb 15 22:24:43 [info ] pvpgn::d2cs::on_client_joingamereq: request join game Test for character test on gs 1
Feb 15 22:24:43 [info ] pvpgn::d2cs::on_d2gs_joingamereply: added test to game Test on gs 1
Feb 15 22:24:43 [debug] pvpgn::trans_net: checking 192.168.3.110:4000 for client 192.168.3.143 ...
Feb 15 22:24:43 [debug] pvpgn::trans_net: against entry -> 192.168.3.110:4000 output XX.XXX.XXX.XXX:4000 network 0.0.0.0/0x00000000
Feb 15 22:24:43 [debug] pvpgn::trans_net: 192.168.3.110:4000 translated to XX.XXX.XXX.XXX:4000
Feb 15 22:24:43 [info ] pvpgn::d2cs::on_d2gs_joingamereply: translated gameserver 192.168.3.110 -> XX.XXX.XXX.XXX
Feb 15 22:24:43 [info ] pvpgn::d2cs::d2cs_conn_destroy: [124] closed connection 3 (2 left)
Feb 15 22:24:44 [info ] pvpgn::d2cs::game_add_character: added character test to game Test (1 total)
Feb 15 22:24:56 [info ] pvpgn::d2cs::game_del_character: removed character test from game Test (0 left)
Feb 15 22:24:57 [info ] pvpgn::d2cs::server_accept: accept connection from 192.168.3.143
Feb 15 22:24:57 [info ] pvpgn::d2cs::d2cs_conn_create: created session=4 socket=696 (3 current connections)
Feb 15 22:24:57 [info ] pvpgn::d2cs::on_d2cs_initconn: [696] client initiated d2cs connection
Feb 15 22:24:57 [info ] pvpgn::d2cs::on_client_loginreq: got client (*TheBigBadDad) login request sessionnum=0x1
Feb 15 22:24:57 [info ] pvpgn::d2cs::on_bnetd_accountloginreply: account TheBigBadDad authed
Feb 15 22:24:57 [info ] pvpgn::d2cs::on_client_charloginreq: got character test(*TheBigBadDad) login request
Feb 15 22:24:57 [info ] pvpgn::d2cs::on_bnetd_charloginreply: character test authed
Feb 15 22:25:00 [error] pvpgn::d2cs::on_client_charlistreq_110: (*TheBigBadDad) charinfo directory do not exist, building it
Feb 15 22:25:00 [error] pvpgn::d2cs::on_client_charlistreq_110: Failed to create charinfo directory (C:\pvpgnmagic\release\var\charinfo/thebigbaddad), errno = 17
Feb 15 22:25:05 [info ] pvpgn::d2cs::d2cs_conn_destroy: [696] closed connection 4 (2 left)
Feb 15 22:25:43 [info ] pvpgn::d2cs::game_destroy: game Test removed from game list (0 left)

I can confirm directories do in fact exist at C:\pvpgnmagic\release\var\charinfo

Directory name is "thebigbaddad"

and contained within are three 1kb files named  after the test characters I created. Yet, I still get the error above. And the Client acts as if no characters have been created.

6

Re: [SOLVED] New win server having issue between d2cs and bnetd

I've never really seen anything like it, I went to the code to see where exactly the error occurs and it seems that it can't find the folder for that account, and if it doesn't find it, it tries to create it, but it already exists, so nothing happens.

Could it be related to some read and write permissions on the folders?

Error location: https://github.com/pvpgn/pvpgn-server/b … .cpp#L1040

catch (const Directory::OpenError&) {
    ERROR1("(*{}) charinfo directory do not exist, building it", account);
    if (p_mkdir(path, S_IRWXU) == 0)
    {
        INFO1("Successfully created charinfo directory ({})", path);
    }
    else
    {
        ERROR2("Failed to create charinfo directory ({}), errno = {}", path, errno);
        retry = false;
    }
}
Diablo 2 Online

ItemWizard - Rank - Armory - Market - Clans - Builds

7

Re: [SOLVED] New win server having issue between d2cs and bnetd

Feofilaktt wrote:

I've never really seen anything like it, I went to the code to see where exactly the error occurs and it seems that it can't find the folder for that account, and if it doesn't find it, it tries to create it, but it already exists, so nothing happens.

Could it be related to some read and write permissions on the folders?

Error location: https://github.com/pvpgn/pvpgn-server/b … .cpp#L1040

catch (const Directory::OpenError&) {
    ERROR1("(*{}) charinfo directory do not exist, building it", account);
    if (p_mkdir(path, S_IRWXU) == 0)
    {
        INFO1("Successfully created charinfo directory ({})", path);
    }
    else
    {
        ERROR2("Failed to create charinfo directory ({}), errno = {}", path, errno);
        retry = false;
    }
}

I have double and tripple checked that all files and folders have full access. And the services are all logging in and starting up as an Administrator account which should have full access to the directories as well.

To me it looks like it literally can't "see" or "find" the directory, even though it's right there. I noticed that it's putting the "incorrect" / in front of the accountname directory according to the error code Maybe that's just a nuance, but is it possible it's looking for C:\pvpgnserver\release\var\charinfo/thebigbaddad..... when it should be looking for c:\pvpgnserver\release\var\charinfo\thebigbaddad. ???

8

Re: [SOLVED] New win server having issue between d2cs and bnetd

Really... the error [Errno 17] means "File exists".

A description I found on the internet:

Description: Just checking if the directory already exist throws this error message [Errno 17] File exists because we are just checking if the directory name exist or not.

Added: 16.02.2022 14:56

justaplaneguy wrote:

Maybe that's just a nuance, but is it possible it's looking for C:\pvpgnserver\release\var\charinfo/thebigbaddad..... when it should be looking for c:\pvpgnserver\release\var\charinfo\thebigbaddad. ???

I don't know if this would be a problem, since whoever generates this path is the application's own core, there would hardly be an error only on your computer. Everyone would be in trouble.

What version of PvPGN are you using?

Diablo 2 Online

ItemWizard - Rank - Armory - Market - Clans - Builds

9

Re: [SOLVED] New win server having issue between d2cs and bnetd

Feofilaktt wrote:

Really... the error [Errno 17] means "File exists".

A description I found on the internet:

Description: Just checking if the directory already exist throws this error message [Errno 17] File exists because we are just checking if the directory name exist or not.

Added: 16.02.2022 14:56

justaplaneguy wrote:

Maybe that's just a nuance, but is it possible it's looking for C:\pvpgnserver\release\var\charinfo/thebigbaddad..... when it should be looking for c:\pvpgnserver\release\var\charinfo\thebigbaddad. ???

I don't know if this would be a problem, since whoever generates this path is the application's own core, there would hardly be an error only on your computer. Everyone would be in trouble.

What version of PvPGN are you using?

I'm currently build on the pre-release - PvPGN-PRO 1.99.8.0.0 RC1.
D2 Version is 1.14b

The Client sees only this:


https://forums.pvpgn.pro/uploads/images/2022/02/16/d2_issue.jpg
Even though the files clearly exist on the server.

Added: 16.02.2022 16:38

Files showing the account name was created, and the multiple test characters, none of which show up in the client.


https://forums.pvpgn.pro/uploads/images/2022/02/17/files.jpg

Post's attachments

Files.jpg 284.69 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

10

Re: [SOLVED] New win server having issue between d2cs and bnetd

Ok... Try resetting the settings and running PvPGN from a published version on github [link below]

https://github.com/pvpgn/pvpgn-server/r … _plain.zip

If you haven't accidentally bumped into any config in the files, it should work normally based on this release.

Diablo 2 Online

ItemWizard - Rank - Armory - Market - Clans - Builds

11

Re: [SOLVED] New win server having issue between d2cs and bnetd

Feofilaktt wrote:

Ok... Try resetting the settings and running PvPGN from a published version on github [link below]

https://github.com/pvpgn/pvpgn-server/r … _plain.zip

If you haven't accidentally bumped into any config in the files, it should work normally based on this release.

After backing up my previously setup config files, I installed the latest stable release 1.99.7.2.1 with MySQL support. Unfortunately, this did not work at first, as it is not compatible with MySQL 8.0. The Pre-release version is. I downgraded MySQL to Version 5, and finally I have it all working as expected.

I suspect there is something fishy going on in the pre-release code which is causing the error I previously had.

Thank you for the help!

12

Re: [SOLVED] New win server having issue between d2cs and bnetd

justaplaneguy wrote:

After backing up my previously setup config files, I installed the latest stable release 1.99.7.2.1 with MySQL support. Unfortunately, this did not work at first, as it is not compatible with MySQL 8.0. The Pre-release version is. I downgraded MySQL to Version 5, and finally I have it all working as expected.

I suspect there is something fishy going on in the pre-release code which is causing the error I previously had.

Thank you for the help!

Yeap, pre-versions are not advisable as they are always with recent updates not fully tested.

Glad it's all working!

Added: 17.02.2022 11:07

PS: Don't forget to mark a tag at the beginning of the topic as solved.

Example: [Solved] New win server having issue between d2cs and bnetd

Diablo 2 Online

ItemWizard - Rank - Armory - Market - Clans - Builds

Posts: 12

Pages 1

You must login or register to post a reply

Who now at forum

Currently view post: 0 guests, 0 registered users

forums.pvpgn.pro → [EN] Tech Support → [SOLVED] New win server having issue between d2cs and bnetd