PDA

View Full Version : Multi-machine server


sotonin
08-20-2004, 02:26 AM
Quick question. I know some people use multiple machines to do different aspects of their servers.

1 to host mysql and world. one to host the zones. etc.

I was wanting to tinker with this, i have an extra machine to toy with a bit. How would i go about setting up lets say 5 statics on this new machine, but interact with my main server and database?

I'd have to copy zone.exe to the new machine, obviously. But are there any other files i need to copy there and any config i need to do?

Thanks!

smogo
08-20-2004, 03:50 AM
you'l need db.ini, and the .cfg zone files, the spell file, the quest files and directories, ... basically anything but the LoginServer.ini file. You also need EMuShareMem, and a path to it.

You may also have to allow access to your DB from an other IP (the second machine), though i think this is enabled by default

If world and db server are on the same first machine, change the IPs in the script that launches the second machine's zones to point to the first machine.

Not sure if it works with windoze, but you might want to share your EQMu drive, so that updates are automatic

i hope this helps (can't remember if i got tit to work anyway :/)

sotonin
08-20-2004, 04:13 AM
You also need EMuShareMem, and a path to it.

ya but.. where do you input the "path" to this on the second machine? That's where i'm confused

smogo
08-20-2004, 04:29 AM
not sure of how Windoze looks for DLLs :( . You might want to copy EMuShareMem.dll to one of the system directories, to one of your directories listed in 'path' environnement variable, or just to the working directory of your launch script ...

You might find hints about this in some forum tutorial.

Cisyouc
08-20-2004, 04:48 AM
place it in %SystemRoot% and open a command prompt.
cmd
cd %systemroot%
regsvr32 EMuShareMem.dll
exit

Darkwaters
08-20-2004, 06:39 AM
You may also have to allow access to your DB from an other IP (the second machine), though i think this is enabled by default

If world and db server are on the same first machine, change the IPs in the script that launches the second machine's zones to point to the first machine.

Not sure if it works with windoze, but you might want to share your EQMu drive, so that updates are automatic


First you'll need to add user access like you did in mysql
grant all privileges on * to MySQLuser@localhost identified by 'MySQLpass' with grant option;
for example:
grant all privileges on * to MySQLuser@'NewMachineIP1' identified by 'MySQLpass' with grant option;
grant all privileges on * to MySQLuser@'NewMachineIP2' identified by 'MySQLpass' with grant option;
etc etc for each of the other machines.

Second, I verified you can just share your EQEmu directory in windows, because db.ini would not be overwritten it would contain the same data no matter what machine your on.

Good luck and let us know how using multiple machines work, I have 6 at home on the local network would be a blast to remove some of the CPU utilization to other non-load bearing systems.

Darkwaters

Darkwaters
08-20-2004, 06:49 AM
REM: ****Read this first!!!****

REM: This file requires your real IP in the place of "localhost" when you are connecting
REM: To the EQEmu Loginserver.

REM: When you are using minilogin, Replace all IP Addresses to say 127.0.0.1

REM: If you still get errors try using localhost instead of 127.0.0.1

REM:--------------Start-----------------------
@echo off

if NOT exist spells_en.txt goto NOSPELL

start zone . ExternalIP 7995 MachineInternalIP1
start zone . ExternalIP 7996 MachineInternalIP1
start zone . ExternalIP 7997 MachineInternalIP2
start zone . ExternalIP 7998 MachineInternalIP2
start zone . ExternalIP 7999 MachineInternalIP3
start zone . ExternalIP 8000 MachineInternalIP3

exit
cls

:NOSPELL
echo You did not copy the spells_en.txt from your everquest directory to this one. Please do so or zones will crash on startup.
PAUSE

REM:---------------END------------------------


This would allow 3 machines to have two zone servers each using their InternalIP as the MachineInternalIP1, MachineInternalIP2 ... for example.
Make certain that all machines used have the same Username/Password for Login to Windows otherwise you may run into security issues that were or were not expected.
This was a great idea sotonin.
Darkwaters
PS you could still share out the EQEmu directory because again this would not change from machine to machine.

sotonin
08-20-2004, 07:22 AM
I don't use windows. i use linux. so most of that is wasted on me. lol =)

so im back to the point of how to tell it to look for the dll's and such

also i don't think the above posted boot5 will work...

our linux run file is similar to a boot5 but it only tells which zones to boot up on THAT machine.... you can't boot a zone from one machine on another. You'd have to have a seperate zone bootup script on the second machine i beleive. I'm just not sure how they all know to interconnect (

our script to load zones is set up like this.

./zone.exe gukbottom IP PORT IP >> /dev/null &
./zone.exe oasis IP PORT IP >> /dev/null &
./zone.exe paw IP PORT IP >> /dev/null &


I'm guess i would need to copy zone binary to the second machine create a NEW linux run file and set up which statics i want.

I'll give this a shot. but i don't know still how they interconnect =p

smogo
08-20-2004, 07:30 AM
bash shell :
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/EmuSharemem.so_directory

Also, linking all your files to a single source, via NFS, works.

Darkwaters
08-20-2004, 10:53 AM
I don't use windows. i use linux. so most of that is wasted on me. lol =)

so im back to the point of how to tell it to look for the dll's and such

also i don't think the above posted boot5 will work...

our linux run file is similar to a boot5 but it only tells which zones to boot up on THAT machine.... you can't boot a zone from one machine on another. You'd have to have a seperate zone bootup script on the second machine i beleive. I'm just not sure how they all know to interconnect (

our script to load zones is set up like this.


./zone.exe gukbottom IP PORT IP >> /dev/null &
./zone.exe oasis IP PORT IP >> /dev/null &
./zone.exe paw IP PORT IP >> /dev/null &


I'm guess i would need to copy zone binary to the second machine create a NEW linux run file and set up which statics i want.

I'll give this a shot. but i don't know still how they interconnect =p

EDIT added snippet example:

./zone.exe gukbottom ExtIP PORT IntIPMach1 >> /dev/null &
./zone.exe oasis ExtIP PORT IntIPMach2 >> /dev/null &
./zone.exe paw ExtIP PORT IntIPMach3 >> /dev/null &

OR

./zone.exe gukbottom ExtIP PORT IntIPMach1 >> /dev/null &
./zone.exe oasis ExtIP PORT IntIPMach1 >> /dev/null &
./zone.exe paw ExtIP PORT IntIPMach2 >> /dev/null &
./zone.exe freportw ExtIP PORT IntIPMach2 >> /dev/null &


So far I have absolutely no problem using my posted bootzones.bat file with one exception, its only set to two machines for the test I ran and I don't static the zones which means it just hunts for the next World.exe registered zone server available on IP:PORT.

It's been awhile like back on slakware version 2 since I've really dev'd on a linux server. Yes I'm that old LMAO. I mostly admin 11 O/S's and program primarily in Windows and OS400 (IBM AS400).

You'll have to static a few zones per machine or all zones per one machine, ONLY IF your making all zones static or just a few zones static at which point you'd need to add something like the following code snippet.


./zone.exe gukbottom ExtIP PORT IntIPMach1 >> /dev/null &
./zone.exe oasis ExtIP PORT IntIPMach1 >> /dev/null &
./zone.exe paw ExtIP PORT IntIPMach2 >> /dev/null &
./zone.exe freportw ExtIP PORT IntIPMach2 >> /dev/null &
./zone.exe . ExtIP PORT IntIPMach1 >> /dev/null &
./zone.exe . ExtIP PORT IntIPMach1 >> /dev/null &
./zone.exe . ExtIP PORT IntIPMach1 >> /dev/null &
./zone.exe . ExtIP PORT IntIPMach1 >> /dev/null &
./zone.exe . ExtIP PORT IntIPMach1 >> /dev/null &
./zone.exe . ExtIP PORT IntIPMach1 >> /dev/null &

The 6 dynamic zone servers would just have increasing port numbers and should in theory not be an issue. If your not zoning to a static zone you'd be able to zone to an Available dynamic zone server and it automatically registers itself with the World.exe as long as its working properly.

bash shell :
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/EmuSharemem.so_directory

Also, linking all your files to a single source, via NFS, works.

Just for ease of configuration and upkeep pretend your building the server on this box. Path, build, and edit bootzone script all via NFS mount on this system. The only diff is you'll just be running the binary for zone, zone scripts, and accessing the db.

It doesn't take up that much room so it really shouldn't be a prob especially since the actual code is NFS mounted the minor pathing, scripts etc wouldn't run into a space consumption or network bottleneck issue. Just make certain you have permissions and follow the procedure you used to setup your initial server. I promise you'll be very happy you did in the end. Maintenance becomes one NFS mounted directory for updates and only your server for the db possibly change of IP addresses as needed (if needed).

You've got me interested enough to throw together a linux server on my local network. I'll hunt down the install sticky in the forum and test it out.

Let me know how things go, wish I was a part of this one LOL.

Darkwaters

sotonin
08-20-2004, 12:30 PM
the internal ip that you are trying to use wont work in my case. the two servers arent on the same network.

Darkwaters
08-20-2004, 01:00 PM
Wow bro your killing me LOL j/k. =)
So can you elaborate and just give me a general idea of your network config? I'm a systems, networking, programming, database guru/junkie, if I can make more suggestions I will, after seeing an example (no need for actual IP's just something relatively close to the real deal will do). If you just want to toss the networking topology in a network schematic I can deal with it too. =) Anyhoot just curious and love to help cuz you've got a great idea and would love to see it working for you.
Darkwaters

wize_one
08-20-2004, 04:39 PM
soto it's ./zone.exe worldip port zonemachineip >> /dev/null &

Darkwaters
08-20-2004, 06:42 PM
Kewl deal ty for that post wize_one I'm about to try this out myself just for the chance to say I did it =)
Darkwaters

sotonin
08-21-2004, 06:38 AM
nice. its not gonna work anyways my second linux box doesnt have the right shit installed on it apparently craps out when trying to run zone =\

smogo
08-21-2004, 07:13 AM
it's best to compile code (for zone and EmuSharedMem) on each machine, unless both have exact same configuration (same distrib, same version, same packages and libraries installed).

Darkwaters
08-21-2004, 07:18 AM
thanks smogo,
Nice catch I was a bit tired last night when I made that post.
Darkwaters

sotonin
08-21-2004, 08:50 AM
they are very similar. but ya. i don't feel like trying to fucking get all the right shit installed on this machine, so oh well. heh

Darkwaters
08-21-2004, 09:10 AM
HEHE yeah I get about that frustrated at times myself Sotonin. =)
Take a break come back later or maybe I can help out by duping two systems here at home and trying it out.
Darkwaters

sotonin
08-21-2004, 11:06 AM
naw it doesn't matter. i'm sure if zone would run on the second machine it would work fine. but i don't wanna dick with installing all the needed stuff. not that important to me )

Darkwaters
08-21-2004, 11:09 AM
No problem just bored off my ass and trying to find somewhere to be of assistance.
Darkwaters