-
My noob questions ~ Part Deux
OK, so my first server was fun, and it is now unstable because of my constant tinkering. Currently no one can bid on TW, and attempting to create a new character disconnects you when you try to login with the new toon.
I don't know why these things happen, and I've been unable to fix them. SO, I've scrounged around, and I now have two more platforms to start servers on. (Unfortunately, all the systems are stuck at 2GB ram atm because I can't afford a real server.)
As such, I'd like to discover a few things before I venture out once again with my servers...
1. Is there any way to retain the account and character/faction information from my current server?
2. Is there a way to change the server to use a port other than 29000? (I may allow users to login to my test server to look at things, but I only have one IP address. Seems to me the easiest way would be to change the port for the client and then just use the router to send the packets in the right direction.)
3. Should I install the updates available for the OS and its packages?
4. Is it possible to link servers to share map loads? Or to have one server for the databases and one for the maps and such? (anything to help with my low memory availability. (I'm NOT going to do any stupid swap ideas, so don't bother mentioning them please.))
I think that's it. I'm learning a lot through reading the forums and trail and error. Thank you guys for all of your comments and support.
-
Re: My noob questions ~ Part Deux
Quick answer for all is YES.
1. You need 2 backups, 1 for the accounts (MYSQL) and 1 for the characters (look where your server saves the dbf's).
2. Change the port 29000 server-side and client-side (serverlist.txt).
3. Yes always update, especially since you are facing the Internet. Security is a must. I also recommend doing firewall (iptables).
4. Search around and you will find the original documentation for the leaked-files. Each services were loaded to a server.
-
Re: My noob questions ~ Part Deux
hehe ok, was hoping for more detail, but I'm good at Google.
I knew how to change the port in the clients, I just didn't find where to change it on the server-side and having incoming port 29500 forward to 29000 on the second server's internal IP didn't work.
I'll have to discover where the MYSQL account tables are. I'm hoping that just copying the dbf's will work. I'm half afraid that those files being corrupted or something is causing some of my problems. (that server had a tendency to overheat and crash so I'm moving it to a new system that doesn't have thermal issues.)
I was worried that the original documentation may not be in English. How much difference will it make splitting the accounts/databases from the game server? I mean, we're only talking about a max of 50-100 players here, probably closer to 30 in the near future. I'd just like to be able to load more than 5 or 6 maps, and memory is my only real limitation.
-
Re: My noob questions ~ Part Deux
You cannot load 5 or 6 maps + world map with ONLY 2gb ram.
BTW:
1. 2 backups. YourMachine/PWServer/gamedbd AND your PW Database (USE PHPMYADMIN FOR THIS!)
2. I personally don't know, but if someone says how to, make sure you tell me. I have wanted to do that before xD.
3. NEVER update. I personally NEVER ever ever update. Updates suck. Usually just graphical changes, imo. Nothing life threatening.
4. I have thought about this, and in theory it could work. I really don't know about that though... I think it IS possible to SOMEHOW move mysql db to a remote server, I considered that option when we kept getting database attacks.
-
Re: My noob questions ~ Part Deux
1. there is but if your server is buggy due to tampering with it there is a good chance you will carry those bug over. Especially if part of those bug originated from messing with backup/restore.
2. change port in glink's configuration (all first 4 glink) and in client of course as said before. Server components use ports in range 29000-30000 so you should pick 28000 or so.
3. you should definitely update, security fixes come out quite often for sometime critical issue (like malformed DNS packet crashing server, etc). Not updating is the best way to open your server for easy attack. Proper server distributions (*cough* debian *cough*) have a testing system in place to make sure updates will not break anything. If they do they are rolled as "dist-upgrade" which means it won't get automatically applied.
Note 1: by this I do not mean "get the latest version of everything" rather "make sure your system has all security fixes applied and is still supported by its team". For example if you have an up-to-date windows xp that works there is no reason to switch to windows 7 at least not until 2014 when windows xp's support ends.
Note 2: authd goes mental if mysql is updated while it's running, simply restarting it solves this.
4. you can split every single component of the game to its single server (my prod server runs over 14 small servers rather than a big one). It requires a lot of tampering with the config files though (and firewall depending on your setup).
It also have some drawback (harder to update mainly) but offer amazing resilience to any accident (hard drive failure, server crash, etc).
Edit: forgot to add for the last point: make sure all the servers are on the exact same time (use time server to sync).
-
Re: My noob questions ~ Part Deux
Yes, you can change different parts of the server to run on different machines, I am not entirely sure how to do this but you can probably figure it out.
I would start by looking through the .conf files, these have IP's for different services, change them to the IP's of the machines you want to use for xxx service...
I don't know anymore than that, you will probably have to do other stuff but I really don't know as I have never done this myself (although I may in future)
-
Re: My noob questions ~ Part Deux
Quote:
Originally Posted by
Ozuru
You cannot load 5 or 6 maps + world map with ONLY 2gb ram.
Actually, I don't have any problem loading 5, and sometimes 6 depending on the size of the maps. I am counting the world map as one of the maps loaded. I'm watching the free memory in pwAdmin. At my max number of maps I will typically have about 14MB of free ram. I guess that technically that would be 4-5 maps then if we don't count the world map.
Quote:
Originally Posted by
Ozuru
1. 2 backups. YourMachine/PWServer/gamedbd AND your PW Database (USE PHPMYADMIN FOR THIS!)
I am assuming this is the backup function in pwAdmin on the Server Control page that you are talking about for phpadmin. If not, I don't know what phpadmin is yet.
I know larger private servers use different machines for the databases ect. I was hoping to find someone that's done it before. I'll tinker with it a bit, and if it's successful, I'll post a guide. Also, yes, all my machines sync to a time server, and I plan to install security updates as soon as I figure out how. Shorewall is my current firewall, if there's something better, I'm open to recommendations.
My primary interest is figuring out what I need to copy over from my now mostly defunct server so that my users don't lose everything in the server reset. The backup just zips all the current files as near as I can tell, and I don't want to unload the whole backup because I already know it's screwed up. I just want the account and character/faction databases.
-
Re: My noob questions ~ Part Deux
Quote:
Originally Posted by
Allisandre
At my max number of maps I will typically have about 14MB of free ram. I guess that technically that would be 4-5 maps then if we don't count the world map.
Even with 1GB free ram it will happen from time to time that maps crash ;)
-
Re: My noob questions ~ Part Deux
Quote:
Originally Posted by
Allisandre
OK, so my first server was fun, and it is now unstable because of my constant tinkering. Currently no one can bid on TW, and attempting to create a new character disconnects you when you try to login with the new toon.
I don't know why these things happen, and I've been unable to fix them. SO, I've scrounged around, and I now have two more platforms to start servers on. (Unfortunately, all the systems are stuck at 2GB ram atm because I can't afford a real server.)
As such, I'd like to discover a few things before I venture out once again with my servers...
1. Is there any way to retain the account and character/faction information from my current server?
MySQL and /PWServer/gamedbd/dbhomewdb/dbdata/*
2. Is there a way to change the server to use a port other than 29000? (I may allow users to login to my test server to look at things, but I only have one IP address. Seems to me the easiest way would be to change the port for the client and then just use the router to send the packets in the right direction.)
This is in glinkd config.
3. Should I install the updates available for the OS and its packages?
No.
4. Is it possible to link servers to share map loads? Or to have one server for the databases and one for the maps and such? (anything to help with my low memory availability. (I'm NOT going to do any stupid swap ideas, so don't bother mentioning them please.))
Yes, just have to set it right in all the configs (so that all the 'daemons' can 'talk' to each other), just have patience when you go through them all, if at first it doesn't work right.
I think that's it. I'm learning a lot through reading the forums and trail and error. Thank you guys for all of your comments and support.
Answers in blue
-
Re: My noob questions ~ Part Deux
PHPMyAdmin - type
After that, go to yourserversip/phpmyadmin and login.
-
Re: My noob questions ~ Part Deux
This is the kind of reason you should always update a computer no matter what OS it runs: A simple HTML tag will crash 64-bit Windows 7 • The Register
Flaw like this are discovered on nearly daily basis, not updating is making attacker's work easy. A random server on the web get 20000+* port scan/ssh attempt/etc per day, successful attack could mean your server turning into a spam farm for example. Not to mention PW community is not always the nicest and attack amongst servers do exist.
*based on my own logs :p
-
Re: My noob questions ~ Part Deux
-
Re: My noob questions ~ Part Deux
Quote:
Originally Posted by
tbnanubis
Even with 1GB free ram it will happen from time to time that maps crash ;)
So far the only time I have had a map crash was when I tried to activate an invalid item in the cube. Learned my lesson there =P. No giving out die to ppl.
Quote:
Originally Posted by
Ozuru
PHPMyAdmin - type
After that, go to yourserversip/phpmyadmin and login.
:scared:
ok so I did that. I think I exported it, but I can't access pwAdmin anymore and now lampp won't start because another webapp is running. :*:
I also need to figure out how to import this .sql file I have from the export. All it looks like it is is a bunch of tables though.
-
Re: My noob questions ~ Part Deux
phpmyadmin is part of lampp so you do not need to or want to install phpmyadmin again. I would suggest that you remove the other phpmyadmin.
To import the *.sql file you need to create a new database in phpmyadmin and goto the import tab and import the *.sql. Make sure you the same database name as that is what will be in the config files.
-
Re: My noob questions ~ Part Deux
I personally suggest using Navicat (over phpmyadmin) :wink:
-
Re: My noob questions ~ Part Deux
+1 for Navi, it can do scheduled backups as well.
-
Re: My noob questions ~ Part Deux
remote sql is way safer than of phpmyadmin or any web base sql management.
-
Re: My noob questions ~ Part Deux
not sure if were speaking same language but all you gotta do is run backup that basicly backs up everything..
second point run external backup of you dbo thats ALL you need
done it a million times, never fails
dump that shit like a chick on roids. (this statement actually says everything)
-
Re: My noob questions ~ Part Deux
ok I discovered the phpmyadmin that was in the install, realized how much I screwed it up by installing phpmyadmin, and managed to back it out enough to get it working again. At least working well enough to get the mysql stuff exported.
I've got the databases imported, but still have all the same problems with the factions not displaying and with new characters crashing. (Can't make new toons and log into the server.) At least my people can play again though, so that's a minor plus. Going to have to figure out how to fix whatever is wrong with the databases.
-
Re: My noob questions ~ Part Deux
Check your permissions when you uploaded. What tool do you use? Winscp?
-
Re: My noob questions ~ Part Deux
You messed to much the dabatase, I suggest that you clean it and tell to your players to restart everything from the beginning... It will be better and easier than trying to recovery a realy messed database...
-
Re: My noob questions ~ Part Deux
Or, if I were you, just salvage all you can. Salvage some parts of the mysql database, and edit the .sql code a little so that you can just upload to your database.
-
Re: My noob questions ~ Part Deux
Quote:
Originally Posted by
Ozuru
Check your permissions when you uploaded. What tool do you use? Winscp?
To copy the original I used...
Code:
tar zcf gamedbd_bak.tar.gz /PWServer/gamedbd
tar zcf uniquenamed_bak.tar.gz /PWServer/uniquenamed
Then to put them back I copied them to / and used...
Code:
tar -xvzf gamedbd_bak.tar.gz
tar -xvzf uniquenamed_bak.tar.gz
and it exctracted them back into their respective folders.
I used phpmyadmin to export cpw.sql, dbo.sql, information_schema.sql, mysql.sql, performance_Schema.sql, phpmyadmin.sql, and support.sql from the old server, and then imported them appropriately into the new one.
As far as permissions go, I think that is most likely where I screwed up. I was messing around with things to set up a Samba share and one if the scripts I ran in the wrong spot and it set the permissions to everything to 755. I did try to go back and fix most of it, but I think I may still have something set wrong. (I'm still a Linux noob, I think 777 is like the equivalent of root, but I'm clueless about the rest.)
The permissions I see on everything when I use "ls -l" is "-r-xr-xr-x 1 nobody nogroup" I don't know if that's correct or not though.
And on top of all of that, now my server is freezing up for no reason. It was happening on the old machine so I thought it had to do with how screwed up I got Ubuntu and the other packages. Now it's happening on the new one and all I've done after following 343's install is to copy in the databases and import the stuff through phpmyadmin. I'm beginning to think maybe it's trying to read a database file, or write to one and can't because somewhere I've screwed up the permissions.:*:
-
Re: My noob questions ~ Part Deux
Quote:
Originally Posted by
Souris
This is the kind of reason you should always update a computer no matter what OS it runs:
A simple HTML tag will crash 64-bit Windows 7 • The Register
Flaw like this are discovered on nearly daily basis, not updating is making attacker's work easy. A random server on the web get 20000+* port scan/ssh attempt/etc per day, successful attack could mean your server turning into a spam farm for example. Not to mention PW community is not always the nicest and attack amongst servers do exist.
*based on my own logs :p
(Sorry to come back to this post everyone, but)
I just really noticed this post and read the link... The thing I find the FUNNIEST is this is in no how related to topic (Linux or PW)... In my opinion it is NOT even a decent example (let alone a good one)... They're talking about a vulnerability in Windows first off. Second off, this vulnerability ONLY exists while running a piece of APPLE software ON the WINDOWS machine... (So CERTAINLY not a LOT of people will be doing this, ie... makes it a more RARE possibility)!
On the other hand you could say "it's a good example" because it just proves that people/someone out there will find a flaw if there is one, no matter how rare it is... Well Ok, technically that is highly probable -- I can safely tell you, running anti virus and making sure to regularly 'update' is NOT going to help that... Because, you're right -- there will always be someone looking for some 'loophole' somewhere, and ya know what, someone WILL find it if it's there... So you can't be bothered with "anti virus" and "updates" they are not 100% necessary...
Like Das and I have both said before... If you TRULY want to be safe ~-~ NEVER remove it from the box :thumbup1: !!!!!
add:
I'll say it ONE more time:
If you TRULY want to be safe ~-~ NEVER remove it from the box !!!!!
Sorry, now let the topic return to where it was:
:thumbup1:
-
Re: My noob questions ~ Part Deux
Quote:
I can safely tell you, running anti virus and making sure to regularly 'update' is NOT going to help that... Because, you're right -- there will always be someone looking for some 'loophole' somewhere, and ya know what, someone WILL find it if it's there... So you can't be bothered with "anti virus" and "updates" they are not 100% necessary...
This is as stupid as saying "a condom can always break so there is no reason to use one when going around and sleeping with everyone". Security fixes will not be 100% reliable, but if it can prevent 99% of the problems why would you skip it?
Ubuntu Linux 10.04 - Secunia.com (about 3 click away from my link with some curiosity) check the amount of "vendor patched" issues? 175 out of 176 security issues were fixed this year on ubuntu 10.04 (what most recommend to use as server on this forum). You can look at the other stuff which are usually found on a server (apache, tomcat, ssh, mysql, etc) and you will find the situation is the same.
Again: I am not talking about updating to newer version of software/os. For example updating from php 5.2.x to 5.3.x might cause a lot of issues and scripts breakdown; there is no reason to do it if you don't need it. However there will be no change in compatibility between 5.2.1 and 5.2.3, only security and speed improvement and this what I am talking about.
Quote:
If you TRULY want to be safe ~-~ NEVER remove it from the box !!!!!
to be safe from STD, it would be better to be a nun in a monastery, that's a fact. Now this is not an option, so let's use a condom.
-
Re: My noob questions ~ Part Deux
Quote:
Originally Posted by
Souris
This is as stupid as saying "a condom can always break so there is no reason to use one when going around and sleeping with everyone". Security fixes will not be 100% reliable, but if it can prevent 99% of the problems why would you skip it?
Ubuntu Linux 10.04 - Secunia.com (about 3 click away from my link with some curiosity) check the amount of "vendor patched" issues? 175 out of 176 security issues were fixed this year on ubuntu 10.04 (what most recommend to use as server on this forum). You can look at the other stuff which are usually found on a server (apache, tomcat, ssh, mysql, etc) and you will find the situation is the same.
Again: I am not talking about updating to newer version of software/os. For example updating from php 5.2.x to 5.3.x might cause a lot of issues and scripts breakdown; there is no reason to do it if you don't need it. However there will be no change in compatibility between 5.2.1 and 5.2.3, only security and speed improvement and this what I am talking about.
to be safe from STD, it would be better to be a nun in a monastery, that's a fact. Now this is not an option, so let's use a condom.
Actually (as I stated in PM) this is not a personal attack, we are each entitled to our own opinions. Which we clearly DO have different opinions. Switching topics as you have, I never use a condom =X and yes; the only 100% way to be safe from an STD would be to not have sexual intercourse at all...
-
Re: My noob questions ~ Part Deux
Aaaannndd.. coming back on-topic...
It took some doing, but here's the permissions from a clean install....
And here's the permissions from my faulty database...
So now to compare and figure out how to fix it cause I'm sure I've screwed something up with permissions
So I think I need to change the nobody's to root.... and also change the permissions on some stuff. Google FTW, I'll figure out how
-
Re: My noob questions ~ Part Deux
I hope you could find a fix... But well I personnaly suggest to start a fresh and clean characters database to be sure that there will be nothing that may corrupt your server again...
-
Re: My noob questions ~ Part Deux
If you want to try and fix:
Code:
chown root:root -R uniquenamed
chown root:root -R gamedbd
chmod u+rwX,g-w+rX,o-rwx -R uniquenamed/
chmod u+rwX,g-w+rX,o-rwx -R gamedbd/
chmod u+x,g-x uniquenamed/uniquenamed
chmod u+x,g-x gamedbd/gamedbd
Should be pretty self explanatory. No guaranty on effectiveness blahblah
-
Re: My noob questions ~ Part Deux
chown should be enough, as the gamedb tends to set chmod flags itself