Author Topic: Error running psserver  (Read 4291 times)

Godfrey

  • Hydlaa Resident
  • *
  • Posts: 69
    • View Profile
Error running psserver
« on: October 30, 2005, 11:27:38 pm »
Just out of curiosity, I decided to try running psserver.  Got it compiled, got the MySQL databases installed, made a symlink for /var/run/mysqld/mysqld.socket, since it seems to now live in /var/lib/mysql/mysql.socket for some reason.  It looks like it\'s starting to load, and then I get the error message:

Code: [Select]

Cannot load triggers into dictionary from database.
You have an error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near \'trigger,       prior_resp
onse_required,       min_attitude_required,       max_a\' at line 1
Initialize
:
  ****************************
Failed to load
  Triggers
****************************

./psrun: line 28:  3967 Segmentation fault      LD_LIBRARY_PATH=\"${BinDir}/cal3d
/lib/:$LD_LIBRARY_PATH\" CRYSTAL=\"${BinDir}/crystalspace/lib/crystalspace\" CEL=\"$
{BinDir}/cel/lib/cel\" $Command


I\'m running MySQL 5.0, which I suspect might be the reason.  If it is, what version should I be running, and how do I clean out the existing version?
« Last Edit: October 30, 2005, 11:43:58 pm by Godfrey »

josephoenix

  • IRC Op
  • Hydlaa Notable
  • **
  • Posts: 706
    • View Profile
(No subject)
« Reply #1 on: October 30, 2005, 11:37:55 pm »
I had the same problem but nobody really could help... The npc trigger code is really complex, I hear...

josePhoenix
Sir John Falstaff: "Let the skie raine Potatoes: let it thunder, to the tune of Greenesleeues"

Godfrey

  • Hydlaa Resident
  • *
  • Posts: 69
    • View Profile
(No subject)
« Reply #2 on: October 30, 2005, 11:42:28 pm »
Well... rats.

Of course it raises the question of how they got the official server running...    ;)

Edit: Upon further inspection, when I take a look at dictionary.cpp, it\'s trying to select columns from a table named npc_triggers, which doesn\'t exist in my copy of the database.  I executed drop.sql, and it indicated that the following tables had also not been created:

  • character_glyphs
  • player_quests
  • npc_triggers
  • traits
  • loot_categories
It looks like character_glyphs, player_quests and loot_categories aren\'t used anymore; the only place they\'re referenced is in drop.sql.

When I reran create_all.sql, it complained:

Code: [Select]

ERROR 1064 (42000) at line 10 in file: \'npc_triggers.sql\': You have an error in
your SQL syntax; check the manual that corresponds to your MySQL server version
for the right syntax to use near \'trigger varchar(255) ,
  response_id int(10) unsigned DEFAULT \'0\' ,
  prior_resp\' at line 3


When I look at npc_triggers.sql in KWrite, the word \'trigger\' is in boldface, indicating that it\'s a reserved word.  If I rename that to \'_trigger\', it accepts the script and creates the table.

The traits table also isn\'t created, because it specifies an invalid default value for \'next_trait\' (it\'s specified as an unsigned integer, but given the value of -1).

When I ran create_all.sql, I saw a few more error messages, but nothing specific.  I tried running mysql verbose, piping stdout and stderr to their own files, but got nothing.

(Also, just as an aside, drop.sql doesn\'t get rid of everything when it\'s run.  Perhaps that\'s intentional?)
« Last Edit: October 31, 2005, 12:34:38 am by Godfrey »

DaveG

  • Forum Addict
  • *
  • Posts: 2058
    • View Profile
(No subject)
« Reply #3 on: October 31, 2005, 01:17:10 am »
5.0 is new; we\'re still using 4.1.  I don\'t even know if it can run on the new version.  Additionally, are you using the REL_3_012 branch tag, or the current version?

::  PlaneShift Team Programmer  ::

Godfrey

  • Hydlaa Resident
  • *
  • Posts: 69
    • View Profile
(No subject)
« Reply #4 on: October 31, 2005, 03:01:48 am »
I\'m not sure; I downloaded the files from CVS using the info in this post.  After a bit of grepping, I\'m not sure where the version number is stored; where can I find it?

Bereror

  • Hydlaa Notable
  • *
  • Posts: 773
    • View Profile
    • Planeshift API
(No subject)
« Reply #5 on: October 31, 2005, 07:14:27 am »
Version number is 0.3.012, but this is not relevant. You need to check out the version that is tagged with REL_3_012.
Code: [Select]

cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/planeshift co [B]-r REL_3_012[/B] planeshift


MySQL has to be 4.1. I\'m running Planeshift server on 4.0.25 and it works as well.

Before you create databases, edit src/server/database/mysql/server_options.sql and change \"db_version\" to \"1092\". Or if you have already created the database, modify the value in the server_options table. There are probably more changes to the database (why would somebody change the version number only :) ), but at least it started up.
PlaneShift Sources
PlaneShift API
"Words never spoken
Are the strongest resounding"

Godfrey

  • Hydlaa Resident
  • *
  • Posts: 69
    • View Profile
(No subject)
« Reply #6 on: October 31, 2005, 12:55:21 pm »
Thanks, I\'ll give it a try!

Any advice on how to uninstall MySQL?  (I\'m on Debian Sarge -- I\'m relatively new to Linux, so if there\'s an uninstallation facility, I\'m not sure where it is; MySQL isn\'t showing up in KPackage, and alien doesn\'t have an uninstall switch.)

DaveG

  • Forum Addict
  • *
  • Posts: 2058
    • View Profile
(No subject)
« Reply #7 on: October 31, 2005, 10:02:52 pm »
Quote
Originally posted by Bereror
Before you create databases, edit src/server/database/mysql/server_options.sql and change \"db_version\" to \"1092\". Or if you have already created the database, modify the value in the server_options table. There are probably more changes to the database (why would somebody change the version number only :) ), but at least it started up.

Someone bumped the version in two palces but not the third, by accident.  I fixed it soon after, but the fix is after the REL_3_012 tag.  So, for now, editing the number manually is the simplest solution.

::  PlaneShift Team Programmer  ::

Godfrey

  • Hydlaa Resident
  • *
  • Posts: 69
    • View Profile
(No subject)
« Reply #8 on: November 03, 2005, 03:59:18 pm »
Okay.

Thanks to everyone\'s help, I\'ve finally got psserver running.  I can bring it up, load the npcroom map, spawn and go to ready state with no problems. Now the trouble is in connecting to it with a client.

When I use the psclient created by Xordan\'s installer, I get the rotating \"Vengeance\" dwarf in the character selection screen, but when I try to join the game, the console indicates \"PSLoader: timeout!\" and the GUI displays the error \"This is a message coming back from the server. You should not normally be able to see this.\"  When I click OK, psclient exits.

When I use the psclient compiled from CVS, I can see nothing in the character selection screen (I presume that\'s related to the message \"Could not locate masking image charborder for widget PaperDollView\" on the console), but it lets me join -- except I get a screen which doesn\'t show anything, and doesn\'t repaint very well (screenshot).  Even though I can\'t see anything, I can move around (at least according to /pos).

So I copied the art directory from my regular client over the one built from CVS.  This time, it does connect me to the server (according to the server\'s console output), but segfaults before displaying the character selection screen.

Sorry to be such a pain, but could I beg a few more scraps of advice?

Bereror

  • Hydlaa Notable
  • *
  • Posts: 773
    • View Profile
    • Planeshift API
(No subject)
« Reply #9 on: November 03, 2005, 04:22:49 pm »
Quote
Originally posted by Godfrey
So I copied the art directory from my regular client over the one built from CVS.  This time, it does connect me to the server (according to the server\'s console output), but segfaults before displaying the character selection screen.


You may need to copy the data directory as well because some xml files for graphics in the art directory are in the data directory.
PlaneShift Sources
PlaneShift API
"Words never spoken
Are the strongest resounding"

Godfrey

  • Hydlaa Resident
  • *
  • Posts: 69
    • View Profile
(No subject)
« Reply #10 on: November 03, 2005, 04:32:19 pm »
That got me a little further, thanks! I was able to get through the character creation screen; however, when it started loading the world, I got the message \"Couldn\'t initialize the character controller!\"  The last few lines of the console output are:
Code: [Select]

After LoadMapFile: time=13558
After cur_region->Prepare: time=13609
WARNING! Object \'_s_blacksmith\' is not closed!
After Precache: time=13670
After SetupWorldColliders: time=13675
Region npcroom loaded successfully.

CheckSectorCrossing
:
  Sector crossed from (null) to NPCroom.


LoadKeyMap
:
  No tag in XML

Bereror

  • Hydlaa Notable
  • *
  • Posts: 773
    • View Profile
    • Planeshift API
(No subject)
« Reply #11 on: November 03, 2005, 05:03:00 pm »
Quote
Originally posted by Godfrey
Code: [Select]

LoadKeyMap
:
  No tag in XML



Your client is not REL_3_012, because there is no such error message in REL_3_012. It was added later after the REL_3_012 was released.
PlaneShift Sources
PlaneShift API
"Words never spoken
Are the strongest resounding"

Godfrey

  • Hydlaa Resident
  • *
  • Posts: 69
    • View Profile
(No subject)
« Reply #12 on: November 03, 2005, 05:06:23 pm »
Okay, that\'s weird... I checked out REL_3_012 from CVS.  I\'ll try again.


Edit:  I\'ve tried again.  I used the following command (which I got from this thread):
Code: [Select]

cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/planeshift co -r REL_3_012 planeshift


(That was also what I used the first time I checked out REL_3_012.)  It didn\'t actually download anything, so I\'ll try wiping out the whole directory and starting again from scratch.
« Last Edit: November 03, 2005, 05:40:16 pm by Godfrey »

Bereror

  • Hydlaa Notable
  • *
  • Posts: 773
    • View Profile
    • Planeshift API
(No subject)
« Reply #13 on: November 03, 2005, 05:55:33 pm »
Quote
Originally posted by Godfrey
(That was also what I used the first time I checked out REL_3_012.)  It didn\'t actually download anything, so I\'ll try wiping out the whole directory and starting again from scratch.


No, you do not have to wipe. Just change to the planeshift directory and the following command should do the job:
Code: [Select]

cvs -z3 up -dPC -r REL_3_012


EDIT: It will also change back some files in art and data directories, so you have to copy them again.
« Last Edit: November 03, 2005, 05:56:43 pm by Bereror »
PlaneShift Sources
PlaneShift API
"Words never spoken
Are the strongest resounding"

Godfrey

  • Hydlaa Resident
  • *
  • Posts: 69
    • View Profile
(No subject)
« Reply #14 on: November 03, 2005, 09:56:46 pm »
Quote
Originally posted by Bereror
No, you do not have to wipe. Just change to the planeshift directory and the following command should do the job:

Too late.  :)  But it works now, so thanks for all your help!

Now to see if I can write an Animation:Master -> CrystalSpace exporter...