Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Linux Servers

Support::Linux Servers Support forum for Linux EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 07-01-2016, 08:43 PM
fzzzty
Fire Beetle
 
Join Date: Aug 2010
Posts: 23
Default Trouble getting a new server going [SOLVED-ish]

I've been working on a script to fire up an EQEMU server on FreeBSD (my preferred OS, God help me). I started from the tutorial on the main page, which apparently and surprisingly (being on the main page) is dramatically outdated, but thanks to the googlecode thread, I was able to get my server up and running...once. The secret sauce that I screwed up, it seems, which actually make it work, was using the old database mentioned in the tutorial. Thanks for that tutorial, it definitely helped, for all but maps. If I had privileges I would edit it or put up a new one with my work, but I digress...

After looking through the above mentioned thread, I ran "eqemu_update.pl installer" and that somewhat worked. I got my maps, which weren't available from the tutorial (I copied them from my EQ install, which just isn't correct). However, the database just won't work. I get tons of these (this is the first):

Quote:
ERROR 1146 (42S02) at line 1: Table 'eq.character_bind' doesn't exist
Missing DB Update 9096 '2016_03_05_secondary_recall.sql'
So it seems that the scripts maybe aren't getting applied in the right order or I missed some prerequisite. It looks like it's pulling from this repo, so for a new server should it just run those in chronological order? I guess I was expecting some sort of epoch script...

Oh okay upon further poking I discovered peq_db. And sure enough, character_bind is in there. Hmmm... Anyway I forked all the shenanigans and will do pull requests when I get it working. I already added getopt and a few Windows-only barrier checks to the update script.

My script is all just raw unadulterated sh, btw, not the Language That Shall Not Be Named. We'll see how it goes.
Reply With Quote
  #2  
Old 07-01-2016, 09:30 PM
Shin Noir's Avatar
Shin Noir
Legendary Member
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 502
Default

Quote:
Originally Posted by fzzzty View Post
II started from the tutorial on the main page, which apparently and surprisingly (being on the main page) is dramatically outdated

...
I got my maps, which weren't available from the tutorial (I copied them from my EQ install, which just isn't correct). However, the database just won't work. I get tons of these (this is the first):
.
Which parts of the tutorial didn't work? I haven't tested it from start/finish recently, but have been updating it with the changes of eqemu since it was originally written.

On that note,
did you miss this part of the tutorial? On step 8:
Code:
(NOTE: You'll get an option to download maps and quests when you first run world)
when you first run world on step 17, it will execute the perl script eqemu_update.pl.

Also the repo you noted is all the update changes. This is again managed by eqemu_update.pl, at least for more recent versioning patches.

The base peq_beta.sql file is noted on step 11 to download: http://peqtgc.com/releases and on step 15 injects said file to prepare your baseline SQL schema as well as populate it with PEQ stuff so eqemu_update.pl can patch it to latest when you first run world on step 17.

Reading through your list and process, I'm not sure where you stopped with the Wiki tutorial.
__________________

~Shin Noir
DungeonEQ.com
Reply With Quote
  #3  
Old 07-02-2016, 08:51 AM
fzzzty
Fire Beetle
 
Join Date: Aug 2010
Posts: 23
Default

Sorry, I was kind of just rambling.

I went through the whole tutorial. I don't remember exactly what I did that first time, through I suspect I did everything it said since I'm a noob, but it worked that time. The only updates I think are how to get maps and the newest DB (the one in there on Google Drive seemed like it was very old, but I don't recall really). Step 8 mentions that, but step 17/18 is where you run world, and I don't recall it prompting at any time. The first time through, the server came up and I could log in, but couldn't enter a zone (no maps). The trouble started after that when I started using just eqemu_update by itself ("eqemu_update.pl installer"). After I get my script working I can revert my VM and start over and see if I can repro what I did.

I found the DB problem, the script was using a \\ instead of / in a path (in lots of paths actually), so it wasn't finding the PEQ DB SQL files, so I threaded File::Spec->catfile through it to generate portable paths. I didn't touch the Windows specific stuff since I can't test on Windows.

P.S.: Your build idea is great.

Last edited by fzzzty; 07-02-2016 at 08:59 AM.. Reason: Clarity/PS
Reply With Quote
  #4  
Old 07-02-2016, 09:31 AM
fzzzty
Fire Beetle
 
Join Date: Aug 2010
Posts: 23
Default

Huh, it goes through the SQL updates chronologically backwards for some reason.
Reply With Quote
  #5  
Old 07-02-2016, 05:38 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

You are selecting option '3' twice, right?

The first time to search for/queue needed updates, then the second to apply them (it should report 'n' updates pending when they need to be applied.)
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #6  
Old 07-03-2016, 03:53 PM
fzzzty
Fire Beetle
 
Join Date: Aug 2010
Posts: 23
Default

Okay, I reverted my VM and started over with the tutorial. Here are my notes as I went through the steps (the numbers are the steps):

11) The tutorial uses "peqeditor" when I think it should be "phpeditor".

14) I don't have a quests folder in my peq folder so I can't "mv quests/ ../". Neither peqbeta or phpeditor has a quests folder in it. As a result, the subsequently-created symlinks don't point anywhere legitimate.

17) I don't use tmux, so I'll pretend the last two commands are part of step 18.

18) Running the update script from world didn't work. The script fails because it doesn't recognize FreeBSD, which was an easy fix. A second time through, it runs, and I get the menu. However, step 18 doesn't say what to do here (ditto for step 17). Note that, at this point, I have no maps, quests or plugins. Maps downloaded fine.

Attempting to apply the latest DB updates didn't work, there were various problems. Again, this could be because it's applying the updates backwards, from newest to oldest... Choosing option 3 two more times resulted in no errors, though I don't really know if it's set up properly or not.

I don't really know what to do to get the latest quests. I assume option 8 (once), but do I also need options 7 and 9? I tried all three and they all seemed to work (no errors).

I also chose option 10 to update AA tables since it sounded like a good idea at the time.

The shared_memory application doesn't seem to do anything. It produces no output and no processes and it just exits.

19) I don't have a spells_en.txt file, only a spells_us.txt file.

21) Upon starting world after updating stuff, I got:

Quote:
[World Server] Loading items..
[Error] Error Loading Items: EQEmu Exception (Shared Memory) in /root/attempt-2/eqemu/common/memory_mapped_file.cpp at line (112): Could not open the file to find the existing file size.
[World Server] Error: Could not load item data. But ignoring
[World Server] Loading skill caps..
[Error] Error loading skill caps: EQEmu Exception (Shared Memory) in /root/attempt-2/eqemu/common/memory_mapped_file.cpp at line (112): Could not open the file to find the existing file size.
[World Server] Error: Could not load skill cap data. But ignoring
I ran shared_memory again, and it actually produced output this time, but then exited. However, after that, world seemed to work. Weird.

Apparently, this step is where the update script prompt should first be encountered, but I saw it on step 18 (or 17 if I used tmux). I guess this nullifies some of my previous comments. The bullet item explaining what to do should move to step 18, IMHO.

Running "./eqlaunch zone" sits there, world sees new TCP connections periodically, but nothing happens. I'm not sure what this is supposed to do or if it's necessary. After some testing, this seems to indicate to the login server that my server is up and running; my server entry in the server list changed from Locked to 0 when I ran it, I think.

At this point, I fire up EQ on my Windows computer and authenticate with the login server, find my server in the list, and connect. I created a HFL ROG, un-checked Tutorial, and attempted to log in to Rivervale. In the server log I got this:

Quote:
[MySQL Error] 1064: 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 '' at line 1
REPLACE INTO `character_bind` (id, zone_id, instance_id, x, y, z, heading, slot) VALUES (6058151, 6058151, 6047240, -181.000000, -58.000000, 40.189999, 224.000000, 659774), (19, 0, 0, -181.000000, -58.000000, 40.189999, 224.000000, 659774),
That is disconcerting, but it let me log in...quest text worked and attacking a guard resulted in the expected outcome.

24) I'm not getting any spam regarding the chat service. Maybe this step is obsolete.

-------------------------------------------------------------------------------

Notes:

Using database name "eq", or anything other than "peq", means the eqemu_update.pl script breaks in a lot of places. The database name "peq" is hard-coded in a bunch of places, unfortunately.

Step 17 should really end and switch to step 18 before you call shared_memory. I don't use tmux so I would normally skip that step, but then I wouldn't make the initial ./world call. However, it seems like this shouldn't happen anyway, given that the prompt isn't expected at that point.

Trying to send a tell resulted in "You do not have permission to send tells at this time." Is the UCS required for tells?

-------------------------------------------------------------------------------

This almost follows what I did the first time, and it seems to work. I then started writing a shell script to automate this stuff and, when I got to the point of automating the eqemu_update.pl parts, it fell down because that script has somef issues. I'm working through those now.
Reply With Quote
  #7  
Old 07-03-2016, 05:59 PM
Shin Noir's Avatar
Shin Noir
Legendary Member
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 502
Default

Yeah, I'm doing some edits but I may need to sit down and re-write the tutorial.

For the time being, your shared_memory issue is resolved by going into your eqemu dir and typing "mkdir shared", then run "./shared_memory". it should show "Loading SPells, Loading Items, etc" and once that's done, it'll fix your "[Error] Error Loading Items: EQEmu Exception (Shared Memory) " issue.

The bind one i'm not so sure about. uleat may chime in?

Looks like it's hitting the point I will have to sit down and walk through the whole process again. I've been thinking about making this, though: https://github.com/Xackery/peqrepack

Has a lot of ways to go and i'm running my server now, so a bit tougher to keep up to date.

Regardless, I tried to update my tutorial with your notes, since they all seemed legitimate.
__________________

~Shin Noir
DungeonEQ.com
Reply With Quote
  #8  
Old 07-03-2016, 06:26 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

Not sure on the bind one..though, I do know it has come up a few times in recent memory - don't think it's limited to linux.
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #9  
Old 07-03-2016, 07:34 PM
fzzzty
Fire Beetle
 
Join Date: Aug 2010
Posts: 23
Default

The tutorial is super useful, I'd be a lot farther behind without it, so thanks again for making it. I'm glad to see it get a couple tweaks and not get forgotten about as many things like that do. If you rewrite it, I would separate out the system stuff from the EQEmu stuff, maybe into separate tutorials. I skipped like half the steps because they didn't pertain to me (hyper-v, freebsd, no web editing--yet, mysql CLI, ...).

Sorry it wasn't clear, I didn't need to rebuild shared_memory (or, maybe I do need to, but I didn't), I just had to run it again. IIRC, the first time I ran it (step 17) was before the updates/maps/etc. step was done. After everything was set, I ran it again and it generated output (without rebuilding). It still exited without appearing to do anything, though. It doesn't seem like a daemon, does it generate a cache file or something? Still seems weird.

The shell script I'm working on is intended to do everything after the OS install. I plan to host it online so you can just wget-and-forget. One would probably only need to tweak one line to change it from pkg to yum/apt for dependencies, and add a getopts flag, otherwise it's already pretty hands-off. I figure I'll be doing that a lot as I learn/break stuff so I wanted an easy way to start over. I'll get it into Git soon, it's hobbled by eqemu_update issues right now.

Speaking of which, I also wrote a new update script to try and test some stuff eqemu_update wasn't doing right (as far as I could tell). I haven't touched Perl (on purpose) for 10+ years so it was a learning experience. The script does most of its stuff asynchronously--fetching, cloning, building, etc., and buttons it all up at the end. But it isn't as smart as eqemu_update currently, with db_version and whatnot, so I probably won't go forward with it. The "threading" was interesting to write, basically background system() calls with semaphores, but it's pretty fragile.

The character_bind issue seems like it's maybe just a bad join call or something, with a null array member or something like that, generating an extra "," at the end instead of closing/finishing the query. Just a guess.
Reply With Quote
  #10  
Old 07-04-2016, 03:42 AM
DanCanDo's Avatar
DanCanDo
Discordant
 
Join Date: May 2016
Location: Above Hell
Posts: 400
Default

Quote:
Originally Posted by Uleat View Post
Not sure on the bind one..though, I do know it has come up a few times in recent memory - don't think it's limited to linux.
I get that same error on my win 7 server, only when creating a new character.
Nothing seems to be disrupted, just that error spits out. After character is
created, I never see it again until a new character is created. I got a lot of
0's with my error (chuckle)

Code:
[07-04-2016 :: 01:35:04] [Status] Found starting location in start_zones
[07-04-2016 :: 01:35:04] [MySQL Error] 1064: 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 '' at line 1 
 REPLACE INTO `character_bind` (id, zone_id, instance_id, x, y, z, heading, slot) VALUES (23529472, 23529436, 23528012, 0.000000, 0.000000, 0.000000, -26815622287955678000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000, 1078400122), (0, 1080164352, 0, 0.000000, 0.000000, 0.000000, -26815622287955678000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000, 1078400122),
Reply With Quote
  #11  
Old 07-04-2016, 06:54 AM
fzzzty
Fire Beetle
 
Join Date: Aug 2010
Posts: 23
Default

In theory, if that query is setting a new toon's bind point(s), and it breaks, then the toon won't have those bind points. I'm guessing that new toons either don't have any, or have a default bind point which is probably different from what was intended.
Reply With Quote
  #12  
Old 07-04-2016, 07:34 AM
DanCanDo's Avatar
DanCanDo
Discordant
 
Join Date: May 2016
Location: Above Hell
Posts: 400
Default

Even with that error that I get, new toons that I create do indeed get bound.
(If a halfling dies, it goes to Rivervale) I've had that error all along, but it's
never caused an issue, so I just don't bother persuing it.
Reply With Quote
  #13  
Old 07-05-2016, 11:57 AM
fzzzty
Fire Beetle
 
Join Date: Aug 2010
Posts: 23
Default

Yay, the script works. I can go from zero to a running server with just ./eqemu-init and a few minutes of waiting (and CLI switches, if I don't want defaults).
Reply With Quote
  #14  
Old 07-05-2016, 04:06 PM
Shin Noir's Avatar
Shin Noir
Legendary Member
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 502
Default

Cool. Share the script!
__________________

~Shin Noir
DungeonEQ.com
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 01:26 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3