PlaneShift

Development => Development Deliberation => Topic started by: theruneking on January 25, 2008, 07:43:22 pm

Title: starting a server
Post by: theruneking on January 25, 2008, 07:43:22 pm
what does it take to run a server for planeshift and how much work does it take to set one up.
Title: Re: starting a server
Post by: Caarrie on January 25, 2008, 07:47:51 pm
 you tell me (http://planeshift.svn.sourceforge.net/viewvc/*checkout*/planeshift/trunk/docs/compiling.html)
Title: Re: starting a server
Post by: theruneking on January 25, 2008, 08:20:43 pm
im talking about like one of the main servers. how much storage do they need and connection speeds kinda things
Title: Re: starting a server
Post by: steuben on January 25, 2008, 08:44:24 pm
Server Specs:

Intel Pentium 4 2.66GHz
Intel S845WD1-E Motherboard
1GB ECC Kingston PC2100 DDR-SDRAM
2x 80GB 7200rpm IDE Harddisks
Running on Redhat Linux 8.0

from laanx.fragnetics.com
Title: Re: starting a server
Post by: Xordan on January 25, 2008, 09:27:16 pm
(It uses fedora or ubuntu now btw)
Title: Re: starting a server
Post by: theruneking on January 25, 2008, 09:34:22 pm
ok thx
 i was just wonderin wut it takes to run them
Title: Re: starting a server
Post by: Velh Krome on April 09, 2008, 08:46:51 pm
Greetings, since the topic roughly fits my questions to come, and I didnt want to start a new one..

Compiling and starting the server worked so far, mostly I proceeded according to Induanes Instructions (http://vaalnor.mine.nu/psdoc/?q=node/51) (nice work, Induane, thanks). Exception was the libcal3d package I installed via dpkg instead of compiling it.

Two points though I am not sure if it is ought to be like that:
1. Characterpositions wont be stored. After logging off a client, server console shows following:
Code: [Select]
  201022) <src/server/bulkobjects/pscharacterloader.cpp:811 SaveCharacterData>
  201022) ERROR: Sector ojaroad1 could not be found in the database! Character Velh could not be saved!

2. This howto (http://planeshift.svn.sourceforge.net/viewvc/*checkout*/planeshift/trunk/docs/compiling.html#compile) suggests to use the art and data folders from an already installed client. However, at the moment there is hardly available , like only torso armor for example.


Both points are normal? Or perhaps I committed some mistake setting up mysql?
Title: Re: starting a server
Post by: Caarrie on April 09, 2008, 09:22:31 pm
most art is not in the svn server that includes that the items you see on laanx, also you dont have all maps loaded in the database as it is not in svn either.
Title: Re: starting a server
Post by: Velh Krome on April 09, 2008, 09:38:41 pm
Yes Caarrie, that was stated in the howto as well, and it was said to either download, or to save bandwith and use them from an installed client - this question mainly points at me wondering why using hundreds of megabytes of artwork, if the server only will need about few dozens?
Just curious if all went well actually.

More important is to me the question about storing chars locations.
Title: Re: starting a server
Post by: Caarrie on April 09, 2008, 09:51:24 pm
you have to add the maps and sectors to the sectors.sql also you are downloading the art for the CLIENT not the server. the info for the server is not public.
Title: Re: starting a server
Post by: Velh Krome on April 09, 2008, 10:51:06 pm
Whats confusing then is the following:
Quote
Use the Mounts

Open the cfg file of the PS application you want to use a mount. To continue the above example, I can set the SVN build client to use the installed package's maps by editing the PlaneShift.Mount.zipmapdir line in psclient.cfg:

PlaneShift.Mount.zipmapdir = /bins/art/world/

If you wish the server and NPC client to use these as well
, modify/add that line to their cfg files too.
(link (http://planeshift.svn.sourceforge.net/viewvc/*checkout*/planeshift/trunk/docs/compiling.html#mounts))
I would wonder why I would wish to "use the zips for the server as well", if they wouldnt work anyway (or had no use).

Quote
add the maps and sectors to the sectors.sql
So I did:
Code: [Select]
(..)
 (19,'hydlaa_plaza','N',15000,15000,10000,10000,8000,8000,5000,5000,5000,5000,4000,4000,0,'Laanx');
(..)
Code: [Select]
   63780) <src/server/bulkobjects/pscharacterloader.cpp:811 SaveCharacterData>
   63780) ERROR: Sector hydlaa_plaza could not be found in the database! Character Velh could not be saved!
I had mysql restarted after adding adding to the database. Result still the same.
Title: Re: starting a server
Post by: Caarrie on April 09, 2008, 10:56:21 pm
did you source sectors.sql; first? it looks right to me.
Title: Re: starting a server
Post by: Velh Krome on April 09, 2008, 11:15:08 pm
argh.. I forgot that one, but.. gosh, no, it doesnt help=/ Same error message.
Title: Re: starting a server
Post by: Caarrie on April 09, 2008, 11:48:02 pm
try
Code: [Select]
DROP TABLE sectors;
source sectors.sql;

if that does not help after restarting psserver then i am out of ideas
Title: Re: starting a server
Post by: Velh Krome on April 10, 2008, 01:23:07 am
I think I was too quick before.
Code: [Select]
source sectors.sql;returns error code (pastebin 1 (http://pastebin.com/m2b4781b2))
Since it seems to be some syntax error I am staring at the screen but  just cant see it - perhaps I am just blind?  ???
Here is my entire sectors.sql (pastebin 2) (http://pastebin.com/m1786c6d1)
Title: Re: starting a server
Post by: Caarrie on April 10, 2008, 01:32:20 am
Code: [Select]
(3,'NPCroom','N',15000,15000,10000,10000,8000,8000,5000,5000,5000,5000,4000,4000,0,'Laanx'),
 (4,'NPCroom1','N',15000,15000,10000,10000,8000,8000,5000,5000,5000,5000,4000,4000,0,'Kemedes'),
 (5,'NPCroom2','N',15000,15000,10000,10000,8000,8000,5000,5000,5000,5000,4000,4000,0,'Laanx'),
 (6,'NPCroom3','N',15000,15000,10000,10000,8000,8000,5000,5000,5000,5000,4000,4000,1,'Laanx'),
 (7,'NPCroomwarp','N',15000,15000,10000,10000,8000,8000,5000,5000,5000,5000,4000,4000,0,'Laanx');
 (8,'akkroad','N',15000,15000,10000,10000,8000,8000,5000,5000,5000,5000,4000,4000,0,'Laanx');
 (9,'arena','N',15000,15000,10000,10000,8000,8000,5000,5000,5000,5000,4000,4000,0,'Laanx');
 (10,'bdr2bdoors','N',15000,15000,10000,10000,8000,8000,5000,5000,5000,5000,4000,4000,0,'Laanx');

you started to use ; instead of , only the last line should end with ;
Title: Re: starting a server
Post by: Velh Krome on April 10, 2008, 03:11:02 am
Yay! \\o//
That was the one - thanks for your help and patience, Caarrie!
Title: Re: starting a server
Post by: Velh Krome on June 10, 2008, 08:19:48 pm
Hope you dont mind me digging this old thread, but since I already posted in here..

I just have compiled the trunk sources once more, according to the same documentation mentioned above.
But this time it fails finding libcrystalspace-1.3.so:
Code: [Select]
# ./serverstart
./psserver: error while loading shared libraries: libcrystalspace-1.3.so: cannot open shared object file: No such file or directory

Code: [Select]
# cat serverstart
#!/bin/bash
source profile
./psserver --run=/this/autorun

And profile containing exports of both env variables, autorun all needed loadmaps.

Code: [Select]
# mlocate libcrystalspace-1.3.so
PS_compile/cs/libcrystalspace-1.3.so
PS_compile/cs/out/linuxx86/optimize/libs/libcrystalspace-1.3.so
PS_compile/cs/out/linuxx86/optimize/libs/libcrystalspace-1.3.so.resp

For any idea on where's the bug I would be grateful.
Title: Re: starting a server
Post by: Caarrie on June 10, 2008, 08:23:02 pm
update your LD_LIBRARY path to include cs and cel
Title: Re: starting a server
Post by: Velh Krome on June 10, 2008, 08:53:25 pm
Hey Caarrie, you replied much quicker than I would have guessed!  \\o//

Hm okay.. didnt do so before, and I sort of replaced old cs with the new one, hence I thought no new definitions were needed.
My modified profile:
Code: [Select]
#export LD_LIBRARY_PATH=/opt/planeshift_svn/planeshift/cal3d/cal3d/src/cal3d/.libs/:$LD_LIBRARY_PATH
export CRYSTAL=.../PS_compile/cs
export CEL=.../PS_compile/cel
export CSCONFPATH=.../PS_compile/cel
export LD_LIBRARY_PATH=.../PS_compile/cs:$LD_LIBRARY_PATH

I am not even sure if this is all correct, but it works to a certain degree:
Code: [Select]
# ./serverstart
WARNING: could not load plugin 'planeshift.database.mysql'

[many lines about "flag deactivated with no filter."

Tue Jun 10 20:40:22 2008, Database Host: 'localhost' User: 'planeshift' Databasename: 'planeshift' Port: 0
Tue Jun 10 20:40:22 2008,
planeshift.application.server:
  No iDataConnection plugin!
Tue Jun 10 20:40:22 2008, <src/server/psserver.cpp:286 Initialize SEVERE>
Tue Jun 10 20:40:22 2008, Could not create database or connect to it:
Tue Jun 10 20:40:22 2008, error while initializing server!

For some reason I have a feeling this must be some embarrassing little thing I will have forgotten lol..
Mysql is up and running, as well I did that "mysql: use planeshift;", and even recreating it all new with "source create_all;" I gave a shot..

Thanks a lot for your great support Caarrie, perhaps you once more do have an idea?=P

EDIT:
I just found (http://www.koders.com/noncode/fidB1111679C795FABB8E2C73B4D01B2D8DCD30BBC0.aspx) the only (?) reference to "planeshift.database.mysql" is in a file in the mysql-folder - I mindlessly copied my all my.. backed up.. sql.. files into the new one.. does that mean I need to recompile at least PS again? Would the latest dbmysql.csplugin be any different (the linked one is like my current one)?
Title: Re: starting a server
Post by: Caarrie on June 10, 2008, 09:29:18 pm
make sure the mysql dev package is installed. then reconfigure ps and make sure it finds mysql and rebuild.
Title: Re: starting a server
Post by: Velh Krome on June 10, 2008, 10:43:42 pm
Alright, I rebuilt PS and now it says
Code: [Select]
Tue Jun 10 22:32:42 2008, Database version mismatch: we have '1182' while we are looking for '1188'. Recreate your database using create_all.sql
Tue Jun 10 22:32:42 2008, error while initializing server!

Is there a way I still can use my old database that of course contains custom data?
Title: Re: starting a server
Post by: Ralleyon on June 10, 2008, 10:57:21 pm
Yes, you can. Take a looksie here for the mysql data. http://planeshift.svn.sourceforge.net/viewvc/planeshift/trunk/src/server/database/

What you're interested in following is upgrade_schema.sql (http://planeshift.svn.sourceforge.net/viewvc/planeshift/trunk/src/server/database/mysql/upgrade_schema.sql?view=log)
Title: Re: starting a server
Post by: kidara on January 27, 2009, 10:49:36 am
Hey I just finished with building....one problem...no two.

1) I have no psserver.exe
2) My psclient says I'm missing crystalspace-1.4-vc9.dll

and my mysql is probably ready - the ps folder is in the data folder of C:/mysql
 :oops: please help

Thanks,
Ms.Kida

Any help is great cause I can't find the answer in the guide.
Title: Re: starting a server
Post by: weltall on January 27, 2009, 10:57:57 am
Hey I just finished with building....one problem...no two.

1) I have no psserver.exe
2) My psclient says I'm missing crystalspace-1.4-vc9.dll

and my mysql is probably ready - the ps folder is in the data folder of C:/mysql
 :oops: please help

Thanks,
Ms.Kida

Any help is great cause I can't find the answer in the guide.


the server is a different target in the build project you should build also that. I think it was appspsserver or something like that
as for the dll not found are you sure you did build either cs and ps with the same build type? (debug dynamic with debug dynamic, release static with release static etc)
Title: Re: starting a server
Post by: Lanarel on January 27, 2009, 09:24:07 pm
You have to add the CS directory to the path environment variable for psclient to find the CS dlls.
Title: Re: starting a server
Post by: kidara on January 27, 2009, 10:36:23 pm
Ok got it....now next....the client says "failed to load effects" also I have psclient.exe and not psserver.exe - what do I do to get psserver.exe because it doesn't exist.

thanks for the quick response guys.  \\o//
Title: Re: starting a server
Post by: Raekh on January 27, 2009, 10:47:17 pm
Failed to load effects - did you copy the art and the data foldera into your compilation? Easiest way to do so might be to use the one being shipped with standard installation.

Since I never compiled on Windows I am not sure about the process there. On linux however, "jam -a" during the process of compiling does provide all necessary files.
Title: Re: starting a server
Post by: kidara on January 27, 2009, 10:56:29 pm
hmmm, I definitely have the art and data in the planeshift folder. I probably have to figure out the psserver.exe fow windows  ??? I'm patient so no worries.
Title: Re: starting a server
Post by: kidara on January 28, 2009, 07:32:37 am
Ok I created my Client and server thanks for all the help. I'll be doing character editing in the morning. Please, how do I create characters? I believe it's with Cal3d so I went here http://svn.gna.org/svn/cal3d/trunk/   So how do I start? I'll also get Blender for map creation.  :) Thanks guys

-Kidara
Title: Re: starting a server
Post by: Pizik on January 31, 2009, 05:41:39 am
Blender for character creation also, then export them from Blender in the Cal3D format, Blender2Crystal exporter should do the trick, and you would need it for maps anyway.

Wish you the best of luck  ;)
Title: Re: starting a server
Post by: kidara on February 02, 2009, 02:51:04 am
I can also use my program 3D Max right? For characters and maps
Title: Re: starting a server
Post by: Caarrie on February 02, 2009, 03:06:38 am
I can also use my program 3D Max right? For characters and maps
yes but you need to find an exporter to cal3d for whatever program you use.
Title: Re: starting a server
Post by: kidara on February 02, 2009, 03:14:24 am
Ok thanks I will start searching