Where is the server config file located at?

Discussion in 'Help' started by Hall of Famer, Aug 16, 2011.

Moderators: E.T., Zoroark
  1. Hall of Famer

    Hall of Famer New Member

    Joined:
    Nov 15, 2010
    Messages:
    29
    Likes Received:
    0
    Well I was wondering which script file stores server info such as server name, server description, maximum players allowed and port. I talked to someone called Lutra and he said this file could be found within the server folder, and even showed me the contents in it. However, I couldnt even find that file at all, and it seems to be nonexistent after I searched through the pogeymon-online folder. Is the file automatically generated after starting a server? Just wondering.

    Edit: I found the config file already, looks like it was generated after I run the ./start-server -H command for the first time. Still, this config file looks a little bit weird since there is no such option for me to specify a server name and description. Can anyone of you please tell me how to set server name/description manually? Thanks.
     
    Last edited: Aug 16, 2011
  2. Im_The_Devil

    Im_The_Devil I liek cookiez x3

    Joined:
    Jul 27, 2011
    Messages:
    93
    Likes Received:
    0
    I don't fully understand your problem.
    First you need to download 32/64 bits winRAR depending on your computer.
    Download the server file to winRAR > Highlight server file > Hit Extract (preferably your folder)
    Go to Start > The admin's name (Should be located in the top right) > and it should be in the place you extract it to.

    Once you open up the server files, go to the Server.exe (it should be a application)
    Once you open that up. Go to Options and Config (There you can manually type in your server name and description.)
     
    Last edited: Aug 16, 2011
  3. Crystal Moogle

    Crystal Moogle Ayaya~ Administrator Administrator

    Joined:
    Jul 19, 2010
    Messages:
    3,205
    Likes Received:
    531
    PO Trainer Name:
    Hanako
    Here's what the config file should look like... at least it does for me anyways.

    [General]
    server_port=5080
    sql_driver=0
    sql_db_name=pokemon
    sql_db_port=5432
    sql_db_user=postgres
    sql_db_pass=admin
    sql_db_host=localhost
    show_log_messages=true
    safe_scripts=false
    trusted_ips=127.0.0.1
    max_people_per_ip=2
    max_commands_per_user=50
    max_kbyte_per_user=25
    max_login_per_ip=6
    ban_after_X_kicks=10
    antidos_off=false
    battles_with_same_ip_unrated=true
    rated_battles_memory_number=5
    logs_channel_files=false
    logs_battle_files=false
    server_private=0
    server_name=
    server_description=
    server_maxplayers=unlimited
    server_announcement=
    mainchanname=
    low_TCP_delay=false
    proxyservers=

    Try putting all this in manually?
     
  4. Hall of Famer

    Hall of Famer New Member

    Joined:
    Nov 15, 2010
    Messages:
    29
    Likes Received:
    0
    @Im_the_Devil:
    Sorry to confuse you. I am trying to set up a server hosted on a VPS webhost whose operating system is linux CentOS. Because of this, the guidance you gave me were not really applicable since they are apparently for users running servers on their own computer.

    @Crystal Moogle:
    Thank you so much for your kind reply. Well it appears to be somewhat different inside my config file, as you can see below:
    Yes, this config file appeared after I tried to run the server for the first time(it got stuck while sending info to registry). It seems to lack the lines starting from "server_private=0", and I dont even understand why. I added the missing lines as provided by you, and it works. Thank you so much.
     
  5. Hall of Famer

    Hall of Famer New Member

    Joined:
    Nov 15, 2010
    Messages:
    29
    Likes Received:
    0
    Well my server keeps getting "Segmentation fault (core dumped)", what is this supposed to mean? Can anyone please help.
     
  6. Lamperi

    Lamperi I see what you did there

    Joined:
    Apr 25, 2010
    Messages:
    2,647
    Likes Received:
    11
    It crashes. Compile it on debug mode and run under gdb to see why it crashes.
     
  7. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    if this is compiled in debug mode, you could provide the core dump so we could examine it. (the file named 'core')

    Also for the configuration file of your server, just configure it the way you would want on your regular machine, and copy the config file over to the linux machine.
     
  8. Hall of Famer

    Hall of Famer New Member

    Joined:
    Nov 15, 2010
    Messages:
    29
    Likes Received:
    0
    Well I run this server on a linux webhost, and I only access SSH through a program called Putty. I have no idea how to run debug mode on linux CentOS, do you know what I should do?
     
  9. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    Well, in order to compile the program, you typed make, i think.

    now you need to do make clean, then make CONFIG=debug, and it should compile in debug mode.
     
  10. Hall of Famer

    Hall of Famer New Member

    Joined:
    Nov 15, 2010
    Messages:
    29
    Likes Received:
    0
    Alright I will give a try, its rather complicated and confusing with Linux SSH commands... My assumption at this moment is that a certain pokemon move causes the server to crash, it just happened a few mins ago. The server can crash in a few mins or it may still normal for days and weeks. I cannot track what happened exactly while the server crashed atm. I did search a bit on this forum and found users with similar issues, but these threads were all made in 2010 so I wonder it happens to my server running PO v1.023.
     
  11. Hall of Famer

    Hall of Famer New Member

    Joined:
    Nov 15, 2010
    Messages:
    29
    Likes Received:
    0
    Well did you say that I should enter 'make CONFIG=Debug' at the directory Pogeymon-online? I did it that way, and the messages were a bit weird. I dont even think thats what I am supposed to get:

     
  12. Lamperi

    Lamperi I see what you did there

    Joined:
    Apr 25, 2010
    Messages:
    2,647
    Likes Received:
    11
    You don't have to compile Teambuilder if you are only going to have a server running
     
  13. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    ok, make server CONFIG=debug
     
  14. Hall of Famer

    Hall of Famer New Member

    Joined:
    Nov 15, 2010
    Messages:
    29
    Likes Received:
    0
    Well this is what I got by entering 'make server CONFIG=debug', dont see if it helps?

     
  15. Lamperi

    Lamperi I see what you did there

    Joined:
    Apr 25, 2010
    Messages:
    2,647
    Likes Received:
    11
    Type
    ulimit -c unlimited

    to enable core dumps.

    Now run it.
    LD_LIBRARY_PATH=. ./Server --headless

    Once it crashes you may upload the "core" file for us to examine it.

    If you want, you can learn some gdb and run the server under it
    LD_LIBRARY_PATH=. gdb Server
    then type to the gdb prompt:
    run --headless

    If it crashes under gdb you may see the traceback by typing "bt" to gdb. It's text so you can easily send it to us.
     
  16. Hall of Famer

    Hall of Famer New Member

    Joined:
    Nov 15, 2010
    Messages:
    29
    Likes Received:
    0
    Well actually I do have two core files inside the folder Pogeymon-online/bin, which were generated right after the server crashed. The problem is that they are more than 150MB in size, not sure if its appropriate for me to upload such big files for you guys to examine. Is there a way to cut its size a bit and make it only record what happens just a few mins/secs before server crashes?
     
  17. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    no, this is the correct size. Also just to be sure, you should do 'make clean' first, and recompile it with "make server CONFIG=debug", because maybe it didn't recompile some stuff.
     
  18. Hall of Famer

    Hall of Famer New Member

    Joined:
    Nov 15, 2010
    Messages:
    29
    Likes Received:
    0
    I see, thanks for clearing up my doubts, Coyotte. And here is the file if you want to take a look at:
    http://www.megaupload.com/?d=W02294EG

    And btw, what happens if I run make clean? Will it delete members, tiers and reset ladder points? o_o
     
  19. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    no, it just removes precompiled files, so that you're sure you compile everything again in debug mode without having anything compiled in release mode.

    I'll look at the file later (no linux atm) or someone else will ^^
     
  20. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    Terribly sorry - I got file format not recognized on my ubuntu.

    You could try to get someone with CentOS to download the core, or I could try to debug it on the VPS itself, with temporary VPS access ... Sorry for not being able to solve your problem another way.
     
  21. Hall of Famer

    Hall of Famer New Member

    Joined:
    Nov 15, 2010
    Messages:
    29
    Likes Received:
    0
    Umm VPS access? Do you mean SSH? I can send you the login info to access SSH on my server if this is what you mean. Sorry for being a pain.
     
  22. Lamperi

    Lamperi I see what you did there

    Joined:
    Apr 25, 2010
    Messages:
    2,647
    Likes Received:
    11
    That's exactly what he means ^
     
  23. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    Ok.

    I installed git and gdb on your server =x

    From what I saw the problem was with an ability, i.e. one of the ability files didn't contain info about an ability. Don't have very specific info because the core didn't let me examine much more. (maybe with the packages I installed it will in the future)

    This could have been caused by custom pokemon with abilities out of range, or custom abilities, w/e. Or just by a corrupt database (like if you uploaded the git folder directly from windows which you could have downloaded with a bad option, with CRLF all over the place).

    Anyway, I restored the git state to the one on the online repository, but before going further and compiling the new thing, I'd like to know if you made any changes to the PO database, and if you did, do you have any backup of them? If not, I'll just go ahead.
     
  24. Hall of Famer

    Hall of Famer New Member

    Joined:
    Nov 15, 2010
    Messages:
    29
    Likes Received:
    0
    Well the script.js is updated with Lutra's script file, and I do not think I've done any more changes than this. The VPS host actually compiled the server for me at first, so perhaps this might explain why it is missing something? Anyway thanks a lot Coyotte, you may make changes to the server at any time you want, preferably Friday since Mysidia is usually inactive on Friday anyway.
     
  25. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    Alright. It's being compiled (not in debug mode, I'll compile it in debug mode only if another problem arises), tell me if everything's alright.

    Since it's from the latest source it has a lot of bugfixes, but maybe some other differences we didn't catch on, so if you find something suspicious don't hesitate to post a bug report.

    Edit: Apparently the VPS didn't have enough memory to compile moves.cpp >_<

    I'll break it into files when I can, to make it easier. In the mean time, maybe it won't crash anymore even if not recompiled, as the database was corrected.
     
    Last edited: Aug 25, 2011
  26. Lamperi

    Lamperi I see what you did there

    Joined:
    Apr 25, 2010
    Messages:
    2,647
    Likes Received:
    11
    Just saying, memory problems going to arise when running if moves.cpp cannot be compiled :/
     
  27. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    Server only takes 3% of RAM, so it's fine.
     
  28. Lamperi

    Lamperi I see what you did there

    Joined:
    Apr 25, 2010
    Messages:
    2,647
    Likes Received:
    11
    With 0 players ;P
     
  29. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    I compiled it again (with 2000 lines moved out of moves.cpp it helps) so tell me if you have any problems.
     
  30. Hall of Famer

    Hall of Famer New Member

    Joined:
    Nov 15, 2010
    Messages:
    29
    Likes Received:
    0
    umm it does not have enough memory to compile moves.cpp? Thats weird, how much memory is required? It has guaranteed RAM 1.5GB and burstable RAM 4GB, I dont think this should be a problem. I will contact the host to see if theres a way to fix it. Thanks a lot, Coyotte.
     
  31. Hall of Famer

    Hall of Famer New Member

    Joined:
    Nov 15, 2010
    Messages:
    29
    Likes Received:
    0
    Well server just crashed again right before I posted this message, no idea why.
     
  32. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    I only compiled it 10 hours ago, so i think it was running the old version. If it still crashes though, tell me.
     
  33. Hall of Famer

    Hall of Famer New Member

    Joined:
    Nov 15, 2010
    Messages:
    29
    Likes Received:
    0
    Alright Coyotte, also would you mind providing me with the exact error message you received while compiling moves.cpp? The vps company wants more details so that they can have a look on what this memory issue is.
     
  34. Hall of Famer

    Hall of Famer New Member

    Joined:
    Nov 15, 2010
    Messages:
    29
    Likes Received:
    0
    Well it crashed again...

    Edit: Second time...
     
    Last edited: Aug 27, 2011
  35. Hall of Famer

    Hall of Famer New Member

    Joined:
    Nov 15, 2010
    Messages:
    29
    Likes Received:
    0
    I just contacted the host again, and they said verbose logging may be helpful determining what actually is wrong with the server. You have any ideas how to enable it on PO?

     
  36. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    oops sorry.

    Stop troubling the VPS %)

    I'll run it in debug mode this time, and we'll have all the info we need.

    Edit: compiled again.

    Next time you run the debug server , and the debug server crashes, PM me on the forums and i'll look into it.
     
    Last edited: Aug 29, 2011
  37. Hall of Famer

    Hall of Famer New Member

    Joined:
    Nov 15, 2010
    Messages:
    29
    Likes Received:
    0
    umm the server crashed again, I did not know if it ran in debug mode though since I just restarted the server with /start-server -H. Am I supposed to use 'make server CONFIG=debug' each time it crashes? This will recompile the server I guess.

    Also the server version 1.030 has come out already, should I just replace all script files inside folder pogeymon-online with the new version? Or is the source code of PO v1.030 available?
     
  38. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    no, don't recompile the server everytime.

    So, it didn't have debug, now it does, so next time it crashes I'll have a core file to examine. I updated the source files, so if you want to recompile it with 1.0.30 you can, just know that if you do that maybe i'll need one more crash (in addition to the one to come) to have all the infos about it.

    Just PM me at next crash, and I'll try to debug, and once i've debugged, you would recompile.

    Or you can recompile it now, wait next crash, restart it, wait a crash, and PM.

    Also, if you want to make the debugging easier, you can have a script print all the pokemon and their ability number and the clauses before every battle, so it can be stored in logs. It shouldn't be needed, but we could find the reason right away with that.
     
  39. Hall of Famer

    Hall of Famer New Member

    Joined:
    Nov 15, 2010
    Messages:
    29
    Likes Received:
    0
    oh btw how can I upgrade the server from v1.0.23 to 1.0.30 if I had installed it from source? Is the procedure gonna be somewhat different from those who do not install server from source? Do I have to get source file using GIT from the following link below, upload everything and recompile?

    git://pogeymon-online.git.sourceforge.net/gitroot/pogeymon-online/pogeymon-online
     
  40. Lamperi

    Lamperi I see what you did there

    Joined:
    Apr 25, 2010
    Messages:
    2,647
    Likes Received:
    11
    the new git address is https://github.com/coyotte508/pokemon-online.git

    but yeah. just get the latest source and compile. We are also beginning to use tags to get exact same versions, but you can also use latest master branch, it should be wokring.
     
Moderators: E.T., Zoroark