Problem with building eAthena server (Windows)

Content and general development discussion, including maps, quests, and server code from the development team.
Post Reply
User avatar
Jackie
Peon
Peon
Posts: 6
Joined: Wed Feb 25, 2009 8:15 pm
Location: Canada

Problem with building eAthena server (Windows)

Post by Jackie » Fri Mar 06, 2009 1:52 am

First of all, I'm sorry to have to post this here, but I'm at my wits end with this stuff. 8|

I need to build an eAthena server on my computer for testing purposes (refer to Introduction / "quest manager" post I made about a week ago).

I'm on a 32-bit Windows system, and followed the instructions left by Quiche_on_a_leash in this post:
http://forums.themanaworld.org/viewtopi ... 49&p=46983

Everything built fine, and as far as I know I have configured the server settings correctly. However, I'm having trouble with getting the map-server to work. When trying to access my server from the client, it lets me get as far as selecting a character. But when it starts to load the maps, it never completes and just stays stuck at the loading screen.

Strangely enough, the map-server is also not creating a log file (the login and char-servers are). I had to copy and paste the following manually from the command prompt.

This is the log generated by the map-server:

Code: Select all

          (=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)
          (        (c)2004 eAthena Development Team presents        )
          (       ______  __    __                                  )
          (      /\  _  \/\ \__/\ \                     v 1.00.00   )
          (    __\ \ \_\ \ \ ,_\ \ \___      __    ___      __      )
          (  /'__`\ \  __ \ \ \/\ \  _ `\  /'__`\/' _ `\  /'__`\    )
          ( /\  __/\ \ \/\ \ \ \_\ \ \ \ \/\  __//\ \/\ \/\ \_\.\_  )
          ( \ \____\\ \_\ \_\ \__\\ \_\ \_\ \____\ \_\ \_\ \__/.\_\ )
          (  \/____/ \/_/\/_/\/__/ \/_/\/_/\/____/\/_/\/_/\/__/\/_/ )
          (   _   _   _   _   _   _   _     _   _   _   _   _   _   )
          (  / \ / \ / \ / \ / \ / \ / \   / \ / \ / \ / \ / \ / \  )
          ( ( e | n | g | l | i | s | h ) ( A | t | h | e | n | a ) )
          (  \_/ \_/ \_/ \_/ \_/ \_/ \_/   \_/ \_/ \_/ \_/ \_/ \_/  )
          (=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=)

Character server IP address : localhost -> 127.0.0.1
Map server IP address : localhost -> 127.0.0.1
read conf/grf-files.txt done
data\botcheck.gat not found
Removing map [ botcheck.gat ] from maplist
Loading Maps [0/43]: data\001-1.gat
167 114
Loading Maps [1/43]: data\001-2.gat
160 100
Loading Maps [2/43]: data\001-3.gat
150 150
Loading Maps [3/43]: data\002-1.gat
136 128
Loading Maps [4/43]: data\002-3.gat
128 128
Loading Maps [5/43]: data\002-4.gat
128 128
Loading Maps [6/43]: data\003-1.gat
190 138
Loading Maps [7/43]: data\004-1.gat
117 133
Loading Maps [8/43]: data\004-2.gat
98 87
Loading Maps [9/43]: data\005-1.gat
200 130
Loading Maps [10/43]: data\005-3.gat
120 116
Loading Maps [11/43]: data\006-1.gat
150 150
Loading Maps [12/43]: data\006-3.gat
150 150
Loading Maps [13/43]: data\007-1.gat
144 124
Loading Maps [14/43]: data\008-1.gat
154 120
Loading Maps [15/43]: data\009-1.gat
117 75
Loading Maps [16/43]: data\009-2.gat
200 120
Loading Maps [17/43]: data\009-3.gat
200 151
Loading Maps [18/43]: data\010-1.gat
150 120
Loading Maps [19/43]: data\010-2.gat
107 110
Loading Maps [20/43]: data\011-1.gat
154 124
Loading Maps [21/43]: data\011-3.gat
60 60
Loading Maps [22/43]: data\011-4.gat
150 150
Loading Maps [23/43]: data\012-1.gat
168 168
Loading Maps [24/43]: data\012-3.gat
520 210
Loading Maps [25/43]: data\013-1.gat
154 124
Loading Maps [26/43]: data\013-2.gat
88 63
Loading Maps [27/43]: data\013-3.gat
200 200
Loading Maps [28/43]: data\014-1.gat
140 120
Loading Maps [29/43]: data\014-3.gat
140 200
Loading Maps [30/43]: data\015-1.gat
140 120
Loading Maps [31/43]: data\015-3.gat
64 64
Loading Maps [32/43]: data\016-1.gat
140 120
Loading Maps [33/43]: data\017-1.gat
154 124
Loading Maps [34/43]: data\018-1.gat
200 120
Loading Maps [35/43]: data\018-2.gat
146 70
Loading Maps [36/43]: data\018-3.gat
200 200
Loading Maps [37/43]: data\019-1.gat
138 128
Loading Maps [38/43]: data\020-1.gat
128 148
Loading Maps [39/43]: data\020-2.gat
160 100
Loading Maps [40/43]: data\020-3.gat
80 80
Loading Maps [41/43]: data\020-4.gat
100 100
Loading Maps [42/43]: data\021-1.gat
178 168
Maps Loaded: 43
Maps Removed: 1
data\itemslottable.txt not found
read db/item_db.txt done (count=348)
read db/item_bluebox.txt done (count=0)
read db/item_violetbox.txt done (count=0)
read db/item_cardalbum.txt done (count=0)
read db/item_giftbox.txt done (count=0)
read db/item_scroll.txt done (count=0)
can't read db/item_avail.txt
read db/item_noequip.txt done (count=0)
data\num2cardillustnametable.txt not found
Exp for mob 'Maggot' generated: 6
Exp for mob 'Scorpion' generated: 13
Exp for mob 'RedScorpion' generated: 168
Exp for mob 'GreenSlime' generated: 75
Exp for mob 'GiantMaggot' generated: 136
Exp for mob 'YellowSlime' generated: 93
Exp for mob 'RedSlime' generated: 128
Exp for mob 'BlackScorpion' generated: 247
Exp for mob 'Snake' generated: 345
Exp for mob 'FireGoblin' generated: 41
Exp for mob 'Spider' generated: 339
Exp for mob 'EvilMushroom' generated: 232
Exp for mob 'Flower' generated: 288
Exp for mob 'SantaSlime' generated: 298
Exp for mob 'RudolphSlime' generated: 101
Exp for mob 'Bat' generated: 27
Exp for mob 'Pinkie' generated: 99
Exp for mob 'SpikyMushroom' generated: 54
Exp for mob 'Fluffy' generated: 99
Exp for mob 'CaveSnake' generated: 195
Exp for mob 'JackO' generated: 15524
Exp for mob 'FireSkull' generated: 5379
Exp for mob 'PoisonSkull' generated: 5379
Exp for mob 'LogHead' generated: 149
Exp for mob 'MountainSnake' generated: 497
Exp for mob 'EasterFluffy' generated: 98
Exp for mob 'Mouboo' generated: 497
Exp for mob 'SeaSlime' generated: 187
Exp for mob 'GrassSnake' generated: 582
read db/mob_db.txt done
can't read db/mob_avail.txt
read db/mob_branch.txt done
can't read db/mob_poring.txt
read db/mob_skill_db.txt done
NPCs Loaded: 3133 [Warps:303 Shops:22 Scripts:209 Mobs:2599]
read db/exp.txt done
read db/job_db1.txt done
read db/job_db2.txt done
read db/job_db2-2.txt done
read db/skill_tree.txt done
read db/attr_fix.txt done
can't read db/size_fix.txt
read db/statpoint.txt done (size=1189)
can't read db/castle_db.txt
read db/skill_db.txt done
read db/skill_require_db.txt done
can't read db/skill_cast_db.txt
can't read db/pet_db.txt
[magic-init]  L98:0: Incorrect number of arguments to operation `override_attack
': Expected 7, found 6
[magic-init]  L102:0: Unknown procedure `install_attack_spell'
[magic-init]  L153:0: Unknown procedure `install_attack_spell'
[magic-init]  L168:0: Unknown procedure `install_melee_spell'
[magic-init]  L173:0: Unknown procedure `install_melee_spell'
[magic-init]  L258:0: Unknown procedure `install_attack_spell'
[magic-init]  L299:0: Unknown procedure `install_attack_spell'
[magic-init]  L322:0: Unknown procedure `install_melee_spell'
[magic-conf] Magic initialised; obscure at 95%.  21 spells, 0 teleport anchors.
npc: OnInit Event done. (0 npc)
The map-server is ready (Server is listening on the port 5122).

Attempt to connect to char-server...
Connected to char-server (connection #5).
chrif: OnCharIfInit event done. (0 events)
chrif: OnInterIfInit event done. (0 events)
From login-server: receiving of 1 GM accounts information.
clif_parse: session #6, packet 0x72 (19 bytes received) -> disconnected.
The last line is generated again every time the client tries to load the maps after selecting a character.

Again, I'm sorry to have to post this here, but googling the problem has basically turned up nothing and I don't have a whole lot of experience in this area.

I would sincerely appreciate any advice! Thanks in advance. :)
User avatar
Jaxad0127
TMW Adviser
TMW Adviser
Posts: 4209
Joined: Thu Nov 01, 2007 6:35 pm
Location: Internet

Re: Problem with building eAthena server (Windows)

Post by Jaxad0127 » Fri Mar 06, 2009 2:02 am

Please attach the log file from your client (after attempting to connect to your server).
Image
User avatar
Jackie
Peon
Peon
Posts: 6
Joined: Wed Feb 25, 2009 8:15 pm
Location: Canada

Re: Problem with building eAthena server (Windows)

Post by Jackie » Fri Mar 06, 2009 2:22 am

Thanks for the fast reply, jaxad. :)

Ugh, for some reason I didn't even think about checking the client log. Seems like there are quite a few issues.

The client log is pretty big, so I'm posting a link:
http://www.sfu.ca/~jxh/tmw.log

Is this a problem related to the configuration settings? :/
User avatar
Jaxad0127
TMW Adviser
TMW Adviser
Posts: 4209
Joined: Thu Nov 01, 2007 6:35 pm
Location: Internet

Re: Problem with building eAthena server (Windows)

Post by Jaxad0127 » Fri Mar 06, 2009 3:12 am

Those errors from the item db can be ignored. I'm not seeing anything wrong anywhere.
Image
User avatar
Jackie
Peon
Peon
Posts: 6
Joined: Wed Feb 25, 2009 8:15 pm
Location: Canada

Re: Problem with building eAthena server (Windows)

Post by Jackie » Fri Mar 06, 2009 5:39 am

Thanks for your help jaxad.

I just can't figure out what's wrong, so I'm trying a different approach.

I brought up this issue to my professor and TA on Wednesday, and they suggested that using VMware might be a viable option if I continued to have problems with building the eAthena server on Windows.

I'm going to try installing Linux (latest version of Ubuntu) on a virtual machine on my computer and see if I can get the server running from there. I don't know if it'll work, but I'm going to try. :/
User avatar
Jaxad0127
TMW Adviser
TMW Adviser
Posts: 4209
Joined: Thu Nov 01, 2007 6:35 pm
Location: Internet

Re: Problem with building eAthena server (Windows)

Post by Jaxad0127 » Fri Mar 06, 2009 5:58 am

Jackie wrote:Thanks for your help jaxad.

I just can't figure out what's wrong, so I'm trying a different approach.

I brought up this issue to my professor and TA on Wednesday, and they suggested that using VMware might be a viable option if I continued to have problems with building the eAthena server on Windows.

I'm going to try installing Linux (latest version of Ubuntu) on a virtual machine on my computer and see if I can get the server running from there. I don't know if it'll work, but I'm going to try. :/
Someone else has tried that, and had network problems. You may have better luck.
Image
User avatar
Jackie
Peon
Peon
Posts: 6
Joined: Wed Feb 25, 2009 8:15 pm
Location: Canada

Re: Problem with building eAthena server (Windows)

Post by Jackie » Sat Mar 07, 2009 11:37 am

I'm back again. :|

So here's what's going on: I managed to successfully compile the eAthena server on an Ubuntu virtual machine (made using VMware Server). But when I tried to connect to my server from the client, I ran into the EXACT same error as before: I can get as far as selecting a server and character, but the client gets stuck/disconnects when it attempts to load the maps. This error occurred when I executed both the client and server from the virtual machine, and also when I connected to the server on the virtual machine from the client on my actual OS (32-bit Windows XP).

This is the problematic line generated by the map server that keeps appearing, no matter what I do:

Code: Select all

clif_parse: session #6, packet 0x72 (19 bytes received) -> disconnected
My teammate (gcarson on Mantis, or gabitron on IRC) also tried to build the server today from her computer, and is experiencing the same problems as me.

I'm trying to pinpoint the cause, but haven't had much luck so far. :( I've been going through src/map/clif.c (where the clif_parse function is located) to see what I can find.

So far I've gathered that the map-server is disconnecting because it "thinks" that the version of the received packet is not within the range of 5 to 10, which are the only packet versions currently being accepted by this version of the eAthena server. This is strange, because based on the length of the packet (19 bytes), the packet version should be 5, but it is currently being set as version 0.

This is the snippet of clif.c that I've been looking at:

Code: Select all

// get packet version before to parse
packet_ver = 0;
if (sd) {
	printf("1. packet_ver: %d\n", packet_ver);
	packet_ver = sd->packet_ver;
// check authentification packet to know packet version
} else {
	// 0x72
	printf("2. packet_ver: %d\n", packet_ver);
	printf("cmd: %x\n", cmd);
	if (cmd == 0x72) {
		printf("2.5. packet_ver: %d\n", packet_ver);
		if (RFIFOREST(fd) >= 39 && (RFIFOB(fd,38) == 0 || RFIFOB(fd,38) == 1)) { // 00 = Female, 01 = Male
			packet_ver = 7; // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04 (by [Yor])
			printf("3. packet_ver: %d\n", packet_ver); }
		else if (RFIFOREST(fd) >= 22 && (RFIFOB(fd,21) == 0 || RFIFOB(fd,21) == 1)) { // 00 = Female, 01 = Male
			packet_ver = 6; // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04 (by [Yor])
			printf("4. packet_ver: %d\n", packet_ver); }
		else if (RFIFOREST(fd) >= 19 && (RFIFOB(fd,18) == 0 || RFIFOB(fd,18) == 1)) {  // 00 = Female, 01 = Male
			packet_ver = 5; // 5: old, 6: 7july04, 7: 13july04, 8: 26july04, 9: 9aug04/16aug04/17aug04, 10: 6sept04 (by [Yor])
			printf("5. packet_ver: %d\n", packet_ver); }
		// else probably incomplete packet
		else if (RFIFOREST(fd) < 19) {
			printf("6. packet_ver: %d\n", packet_ver);
			return 0;
	}
(Sorry, all the printf functions in there are me trying to trace the route of the program.) Anyway, I managed to figure out that while the variable "cmd" satisfies the if-condition (this is about 11 lines down, in the snippet posted), none of the if-else-conditions inside the corresponding block are being satisfied, therefore the value of "packet_ver" remains at 0 which is the value it was initialized at.

And yeah. That's all I know so far. I'm sorry if that was really convoluted and/or confusing. D:

I don't really know where to go from here, and it's a bit of an odd problem so I'm not sure if anyone can help, but I figured I may as well follow-up... for the sake of keeping a record of the problem? :/

Also, I'd like to thank jaxad again for helping out Gabby (on IRC) and the rest of us. :)
User avatar
Rotonen
TMW Adviser
TMW Adviser
Posts: 3154
Joined: Wed Sep 08, 2004 8:48 pm
Location: Espoo, Finland

Re: Problem with building eAthena server (Windows)

Post by Rotonen » Sat Mar 07, 2009 3:12 pm

Are you using an up-to-date eAthena instead of our provided eAthena? I don't recall RO protocol versions exceeding 8, but I haven't paid attention to RO development in a while. Also, to the best of my recollection, our eAthena handles RO protocols only up to version 6 or 7.

In the case of it being our provided eAthena, you should be able to just ugly-hack the protocol version detection not to fail and see what else fails. In the case of it being an up-to-date eAthena, it would most likely mess up how the server understands the packets our client is sending to it. In any case it would make sense to take a critical look at the code which is responsible on the client side for sending the packet to verify whether the packet is valid or not.
This message used to be meaningful.
User avatar
Jackie
Peon
Peon
Posts: 6
Joined: Wed Feb 25, 2009 8:15 pm
Location: Canada

Re: Problem with building eAthena server (Windows)

Post by Jackie » Tue Mar 10, 2009 7:11 am

Just an update on the situation.

Our third group member bishop was able to build the server and get it running on his Linux machine, so we'll all be connecting to his server. Still have no clue where me and gabitron went wrong, but more than happy to leave the server stuff behind and get started on the actual client. :p

Thanks to everyone who gave us advice!
Post Reply