PDA

View Full Version : Stuck on Debian Install Guide ./start


thepoetwarrior
07-26-2008, 02:31 PM
I've spent a few hours today slowly going thru the Debian Install Guide with no problem, but I got stuck after making the start, stop, and persist_world on

http://www.eqemulator.net/wiki/wikka.php?wakka=DebianLinuxServer

Do I need eqemu_config.xml like on Windows server?

In the start file, does P=`pwd` need to change or anything else need change? Like database names or passwords?

I didn't see a place for local IP, not that I'd know how to obtain my local IP on debian, which Im sure I can google that one.

Some help would be appreciated. Thanks

thepoetwarrior
07-26-2008, 02:44 PM
Oh, added note, the problem when I type ./start from the appropiate path results in the error:

-su: ./start: Permission denied

Derision
07-26-2008, 02:48 PM
Oh, added note, the problem when I type ./start from the appropiate path results in the error:

-su: ./start: Permission denied

You probably just need to flag it as executable:


chmod +x start

thepoetwarrior
07-26-2008, 03:00 PM
Yup, didn't know about that, so now Im moving forward again.

I only got about 10 lines of startup spam, then back to a command prompt. Is the server running? I know how an active server looks like on the Windows version, with text constantly spamming.

Also, I dont see the server in the Login Server list. Is the eqemu_config.xml used or is that file just for windows? Trying to get my first attempt of Linux server to show up on The login server.

Oh, and I found out how to obtain my local IP by going to root and doing ifconfig -a.

Thanks again.

thepoetwarrior
07-26-2008, 03:11 PM
Oh crap, I guess it does use the config.xml file... got a double server name up, one for Windows, and the closed one obviously my Linux one.

one error I had was sourcing in my custom database, maybe it need repair, will try again.

No questions for now. Thanks for the friendly help :)

thepoetwarrior
07-26-2008, 05:34 PM
Well, for a while I was able to log in but nobody else could. I guess that means its a router/local ip issue? So I forward the same ports to new local IP for linux, but no good. Tried to reset the router, still no good. So I set the DMZ, which reset the router again, and now a few people can log in. The database is correct for the server version, cause I ported over from windows using same server version number. I dont see the usual text spam in a window when the server is up like Windows Server has, bit unusual for me.

thepoetwarrior
07-26-2008, 05:59 PM
Ok, people are in my server now, but they cant cast spells. I have the correct spell files in the correct area, dunno whats wrong.

thepoetwarrior
07-26-2008, 06:15 PM
Does the spells_us.txt and spells_en.txt need to be a certain file format for Linux? Spells not loading, and I have them in the correct directory.

thepoetwarrior
07-26-2008, 07:01 PM
was max number of spells. Looks like windows server can handle over 10k spells, but Linux server under 10k spells... found out thru experimenting. Good to note differnces between windows/linux. Thanks for reading my self responding thread/topic :)

trevius
07-26-2008, 09:05 PM
Oh crap! You are doing it lol! You should have let me know!

Ok, here are a few tips:

Casting issue should be only for detrimental spells and that is because you didn't install the .map files in your home/eqemu/server/maps directory.

And, you won't see the spam in the window the same as you do in windows. Instead, everything gets logged into separate log files in your /home/eqemu/server/logs directory. So, if you want to watch the spam go by to see if there are any errors, you can do this:

cd /home/eqemu/server/logs
tail -f *.*

And, if you just want to look for errors, you could run this tail command instead:

tail -f *.* | grep ERR

When you start the server, you use the ./start command as you already know. And, when you do a reset, you can shut down the server in game using the #worldshutdown command and then go to your command prompt and run the ./stop command. And you will probably have to use the chmod on the stop command like you did for the start command. Basically, the stop command ends all of the processes and I think clears out RAM and stuff.

One thing to note is that once you have your server running smoothly, you will never need to do another actual reboot of the PC again lol. Only the server needs to be reset every now and then, not the PC itself.

Max number of spells on the server isn't an issue for Windows or Linux. Both server types can use unlimited numbers of spell IDs. It is the client that is limited to 9999 as the max spell ID number. And that doesn't change from a Linux to Windows server.

Lemme know if you have any other issues. Following the wiki isn't too bad really. The only complex part IMO is getting your tools working from another Windows PC on your LAN. But, once you get mysql setup correctly and make an account for the windows PC on your LAN, it isn't bad. I think the worst part for me is always getting Windows and Linux to share files so I can map to the quests directory.

thepoetwarrior
07-26-2008, 10:10 PM
Bear with me, Im awake maybe 30+ hours now pulling my hair out. Making some progress.

Actually, I had map files in the correct place.

I didnt know about tail, but good to know!

I used chmod on start, persit_world, and stop. That fixed it.

I use ./start, then while logged in EQ Client as admin I do #worldshutdown, then after it shut down I do ./stop. So that part is working.

Now for the problems driving me crazy:

With EQServer working on Debian Linux, and imported the entire windows db from a sql file thru mysql, seems most of the db gets loaded when I do ./start such as peoples chars and inventory, except its not reading the rule_values table! Regen caps are not correct, corpses are poofing, and people can scribe spells up to 70 but lose their 66-70 spells when zoning which might be because of the default level 65 cap.

I went into mysql on LinuxPC and created an account for my windows pc, using the windows local ip 192.x.x.x, with made up user/pw. I've done this before between 2 window PC's so I know how to do that, to use editors like Georges tools or Navicat from a differnt PC. So I go on the WinPC to use GUI Editors to log into the LinuxPC, but connection failed! Weird.

So I do reverse. I make ip-user-pw account in mysql on window machine for the linux machine to use. I then edit the eqemu_config.xml on LinuxPC to reflect the database info (ip, user, pw, db name) for mysql to connect to the db on WindowsPC. Hope makes sense,

So what I get is EQ Server running on Debian Linux, and using the database from the WindowsPC, not from its own LinuxPC! At least i can now edit the database on windows with localhost for ip thru Navicat or Georges tools, etc.

So I double check database on LinuxPC to see that rule_values imported, and they did. So why is Linux not using the rule_values from the database off its own machine?

Also, why can LinuxPC log into the Windows DB but the WindowsPC cannot log into the LInuxPC DB? Seems like a 1-way street there almost. When in mysql Im creating accounts with the correct IP's (192.168.1.x) etc so I know how to do that, but seems to work in only 1 direction, Linux->Win.

1) My WinPC cant remote into LinuxPC but the Linux can remote into the WinPC.

2) rule_values I verified to be on LinuxPC by using mysqldump then viewing, but the Server is not reading those values. Its like Linux can only access most of its own database, just not rule_values.

Any ideas?

Did a lot for one day here.

trevius
07-27-2008, 07:21 AM
Well, from the wiki that AndMetal made and that I added some steps to, you can find how to set mysql on linux to allow remote connections from your windows PC in this section:

http://www.eqemulator.net/wiki/wikka.php?wakka=DebianLinuxServer#MySQLRemote

Make sure you follow the section directly below that as well:

http://www.eqemulator.net/wiki/wikka.php?wakka=DebianLinuxServer#MySQLRemoteAccou nt

You have to configure access to the mysql database running on the linux PC by adding an account for the windows PC:

GRANT ALL PRIVILEGES ON *.* TO 'eqemu'@'192.168.1.%' IDENTIFIED BY 'my-new-password';

And then the windows PC will have to have Navicat or whatever you use set to use that account that you just created. It should be set to eqemu and whatever password you set. If your LAN uses different IPs than the 192.168.1 network, then you will need to adjust that. You can leave it with the % sign in there and that will just allow all PCs on your LAN to access your database, but still block anything from outside.

You also have to change the text file I mention in the first line (my.cnf) otherwise, Linux won't allow any access at all from outside sources. And, make sure you set the Bind Address to the IP of your Linux PC.

That should get you access to your database on the Linux PC from your Windows PC like you will need.

As for your rules, I am not exactly sure why they wouldn't load, because they should all carry over when you did the database move and it sounds like they did. The only thing I can think of off-hand is that you might want to check your Rule_Sets table and make sure that the number of your default rule set (or whichever set you normally use if you made a custom one) is the same as what is being set in your Rules_Values table to enable the rules.

In my case, my default rule set is 1, and so to enable rules, I have to set them to 1, as by default they are set to 0, which basically means the rule is ignored. Really, this should carry over and work just like it does on your windows database, but that is the only reason I can think of that would cause that. Otherwise, I think there is a command to set your rules in game, which I don't know the command name offhand, but maybe it is worth a shot if you want to try that.

Sounds like overall, your install didn't go too bad =) It took me about a week of tweaking to get my linux server working perfectly before I moved my database over and started running the server from it. But, now I have rebuilt Linux 3 or so times, so I got the hang of it hehe. And, I didn't rebuild because there were issues, I rebuilt because I was moving it back and forth between PCs. Since I went to Linux, there have been very few issues. Though, you might want to consider getting a UPS power backup at some point to protect your OS install. If your power hits and brings your Linux PC down, it can sometimes be nasty to get Mysql running properly again, but normally there aren't many issues with that even.

thepoetwarrior
07-27-2008, 11:25 AM
I'll try to get a battery backup for the PC's incase power hits.

I already did the edit before on my.cnf and added the sql line to add a user with all privilelges, double and triple checked the ip's etc, but still not working. Maybe Im not getting the correct ip? Its on 192.168.1.x

EQ Server is on Linux PC but the DB is being pulled from the windows PC.

Oh, when I started up EQ Server yesterday, it was using around 400 meg ram, but now its almost 600 meg ram used. Does this continue to go up forever eventually requiring to restart the server, just like the Windows Pagefile problem?

Well, going to sleep, back to work tonight. Will have to try again next Saturday.

Thanks for the reply Trevius.

Jack Daniel
07-27-2008, 02:57 PM
on this step what directory do you put the unzipped and extracted files


Map Files

Download Map Files
Map files∞

Maps.tar.gz∞
new_maps.zip∞

Install Map Files
tar xzf Maps.tar.gz
unzip new_maps.zip

do they go in sourse or server

trevius
07-27-2008, 06:06 PM
They go in the server/maps directory. You want to keep /maps and /quests in your server directory, so that they don't get changed when you do upgrades to the emu code.

You can run the ifconfig command from your linux terminal window and it will tell you the IP of your server. That is the IP you will need to set the Bind Address to in your my.cnf file.

Make sure that the changed you made to the file actually saved. That file is set to only be editable by root, and the only way I know of to do that from the Linux PC is either VI, or to use chmod to change the file access properties so that your normal Linux login can save the file and then you have to set the properties back again for mysql to use it. It requires a restart of mysql for these changes to happen, but you can just restart the whole PC to make it simple.

The way I normally edit that file is using the webmin tool. If you haven't set that up yet and checked it out, I highly recommend doing so :) You can log into that tool as root and then you can edit the text file and save it directly without having to use VI or having to change file access properties.

As for the RAM, yes it will go up as you get more players on, but normally it will go back down again when there are less players. If you have more than 1GB of RAM, you probably won't ever have any page filing, as it will all stay in RAM, which is better anyway. Occasionally something happens that starts using up my RAM and I have to restart the server to restore it to normal, but normally it can run for quite a while before there are RAM issues. RAM usage will go up the more players you have on, but even with 120ish on my server, I have never seen it go over 1.5GB of RAM usage.

I think that you should be able to work on getting your Windows to Linux Mysql connection working without effecting your players at all. You can just keep the server running the way you have it now until you can get that connection working. Once you do, then a simple database dump and move then source it and change your settings back to your Linux database and you should be good to go :D

thepoetwarrior
07-27-2008, 06:25 PM
Yeah, I put maps into server/maps/ and the quest into server/quest/

I put the ifconfig local ip 192.x.x.x into the my.cnf. Also I've learned a bit how to use VI so I did that from root to edit the my.cnf. I dont know how to use chmod on it, what attributes to give it for editing, or what to change it back too.

Thats stuff I've already done, and having problems already. Also one step in the install of Linux OS was some kernal for more ram, so I used the AMD one and it locked up my PC at the login screen, so I had to boot up with the orig kernal, which probably recoginizes 1 gig ram, but 1 gig ram is all that my test machine has anyways.

Speaking of ram, server booted up with 400 ram used, but after 21 hours up, we're at 673 ram used, and there are 51 users online. Another gig of ram I should be good then.

You know what, I never rebooted the PC after changing the my.cnf file. Maybe thats the problem? Figured I didn't have to reboot anymore.

On my next day off, I'll try to reboot the LinuxPC and see if Navicat or Georges tools work from Windows. If that works, then next step is to try and dump the db onto the linux server again.

Thanks for the help. Im trying to not get discouraged here. At least its half working, Server on Linux, DB on Windows. Its a start.

trevius
07-28-2008, 05:05 PM
Don't get discouraged! You are very close to having it setup perfectly. A reboot should solve your mysql connection issue from Windows. You don't really *have* to reboot to resolve it, but it is the easiest way IMO. You could always just restart mysql. If you are running the webmin tool, you can go to Servers and then select Mysql and it gives you the option to stop and start mysql. So, you could do it that way if you wanted.

Once you are fully setup, the server will run much smoother and better than it ever did on Windows. And, you won't have to worry about anymore of these setup issues.

If your server only has 1GB of RAM in it, then there is no reason to upgrade your Kernel just yet. Though, you will need to upgrade it when you get more RAM otherwise it won't recognize the extra RAM. You can view your system stats easily from the main screen of Webmin ( have I mentioned how useful this tool is yet? :P ) and it will show you how much RAM your system recognizes and is using. And, yes, 2GBs should be a very good amount of RAM. I barely ever break 1GB of usage even with 100+ on, but I have seen it as high as 1.5GB before, which was probably do to some issue, but a server restart fixed it.

Since I installed Linux, I haven't rebooted the PC a single time myself. It has gone down a few times due to power hits at my house though.

Hopefully the next sql dump you do fixes your issue with the rules. You can always run that tail command and see if it is giving any errors while trying to load the rules or if it just skips the rules completely. Just make sure to open a separate terminal window for the tail and start the tail before you start the server so you can watch the whole process. Also, when I am not using the tail, I always turn it off using CTRL+C to exit it, just to reduce server load if it adds some. If it is just skipping your rules section completely when the server boots up, then maybe you should double check those rules tables and make sure they look ok. I will see if I can find the command to change rule sets in game. I know there is one that is supposed to allow you to set which rule sets are used by the server, it has just been a while since I have seen it.

thepoetwarrior
07-29-2008, 05:31 AM
I copied the DB from Windows to Linux PC and the rule_sets changed to 3 in Linux, so I looked at windows and its rule_sets set to 0... which all my rules are... so some reason the export/import is changing that ruleset from 0 to 3, dunno why but quick edit fixed that, and now Linux runs with no problem.

Reboot fixed the my.cnf problem not working. Now I can use Navicat and Georges tools on Windows to edit the DB on Linux PC.

The kernel upgrade didnt work, cause just freezes up at the login screen before desktop part. The PC only has 1 gig ram right now so I'll figure that out when I add more ram. I might use a differnt PC anyways, this was just to test that I can get a Linux Server up and running, and it looks like I can, 100% successful within only 1 1/2 days. Just gotta do same, this time quicker, on a differnt PC.

Two quick questions:

The dynamic zone memory leak, was that only windows version, or also on Linux? If on Linux, then is recommended to make a lot of static zones?

Also, I see errors about the peq db not having a name_filter table, is that required? Well probably not required since the server runs, but just curious if its suggested?

Thanks for help Trevius.

trevius
07-29-2008, 06:05 AM
Awesome! I figured the rules tables were doing something weird. Glad you got that straightened out. And, maybe I need to add something about restating the PC or restarting mysql at least after editing the my.cnf file in the wiki. Glad the reboot worked for you as well.

It sounds like you have everything running perfectly now other than the kernel upgrade. The kernels I suggested on there probably don't work for all PCs. I just put the most common 2 for Intel or AMD CPUs. You can always experiment with others to see if they work or not. I don't think it will hurt anything. You just use the "apt-cache search kernel | grep AMD" command if you are looking for AMD kernels. There are quite a few different ones, but I suggest you can try using the one that is the closest match to your CPU, as long as you don't use a 64bit one. The only reason I say not to use the 64 bit one is because some programs don't work on it. The server would still work fine, but for example, the "Shell in a Box" add-on tool for Webmin doesn't work on 64 bit and that is one of my favorite Webmin tools.

Once you are able to get your PC running on the kernel you want, you can always re-arrange your boot order by going to the Webmin tool and going to Hardware then to Grub Boot Loader and removing ones that don't work or change the order of what boots first and stuff. You don't have to boot it very often, so it isn't a big deal really, but I just like my PC to be as perfect as possible lol. Just make sure you don't remove the ones with "Debian GNU/Linux, kernel 2.6.18-6-486" in them, as those are the default ones and you might need them if something else goes wrong. The kernel that I currently use is Debian GNU/Linux, kernel 2.6.18-6-k7 and it works great. I thought the one I put in the wiki (should be the same one I am using) should work for most AMDs. I know this is probably a stupid question, but are you sure you don't have an Intel CPU in that PC? I build so many PCs that it is hard to keep track of the parts in all of them, and while most are AMD, I do have an Intel in there somewhere lol.

I run all of my zones dynamically and have no issues with it. Though I have considered adding a few statics just to keep a couple of zones from resetting when they are empty (mainly if a raid wipes).

And ya, I get those name filter errors as well when new characters are created. I don't know why that is the only thing that actually does scroll after the server is started lol. I am sure it isn't an issue at all and not much need for it unless you want to set a filter for names, which might not be bad if you have a strict naming policy or just don't want certain words in names. I had to delete a character tonight cause his name was so bad, and a name filter would definitely have stopped it. I wouldn't mind having another table for it, but I don't know what the table would be setup like. I have just been ignoring those errors.

Now that you have all of that stuff setup, there is only 1 more thing to setup, but it isn't exactly critical. The last thing you would want to get setup is file sharing between windows and Linux. I vaguely described how to do it in the wiki, but it can sometimes be a little rough to get setup. But, once it is setup, you will have 100% control over your server from your Windows PC. The quest editor won't work without the file sharing. If you have issues getting it working, just let me know and I will help if I can.

Oh, and Welcome to Linux! I think you find that it was well worth the work. And, if you ever do another install, the second time around is considerably easier lol.

thepoetwarrior
07-29-2008, 07:38 AM
Thanks for the help Trevius. I should have done this a long time ago.

This weekend I'll be working on making things more perfect, such as file sharing, and more ram. I'll experiment to see which kernel works on my machine to get more than 1 gig.

Yeah, adding note about rebooting after editing my.cnf might help, since I was going by the statement of never needing another reboot.

Maylar
08-01-2008, 12:43 AM
well, you really dont have to reboot.

from the CLI as root ( or sudo ) /etc/init.d/mysqld restart

and thats it.

However, I DO have a problem. been working on this for a few hours. I have also migrated my EQEmu to my linux server. (moved my db from my windows box to my linux box). However, when I go to log into my account ( Through MiniLogin ), I get a

"15315 [09.01 - 00:33:28] [WORLD_CLIENT] Connection from 192.168.1.101 FAILED banned IPs check. Closing connection."

Now, from the other terminal, I get

"Error in CheckBannedIPs query 'SELECT ip_address FROM Banned_IPs WHERE ip_address='192.168.1.101' ' #1146: Table 'peq.Banned_IPs' dosen't exist"

That is true, looking through the db. that table is not there. However, banned_ips is there. So, my question is thus. How do I tell it to look into the table that does exist instead of a table that does not?

Maylar
08-01-2008, 12:51 AM
Solved. Renamed that table to Banned_IPs. That fixed the problem ;)