[WIP] dedicated servers

Discussion in 'Work-In-Progress Mods' started by cola_colin, October 10, 2014.

  1. Quitch

    Quitch Post Master General

    Messages:
    5,856
    Likes Received:
    6,045
    Ohhhhhhhhhhhhh, I thought conf.json was telling it what port to run on. Ah well that's much easier then, thanks.

    EDIT: Yeah, I did a before and after netstat. D'oh.
  2. fuzzels

    fuzzels Member

    Messages:
    90
    Likes Received:
    34
    Yep, the port change bit me to after an upgrade, and of course one needs to re-apply the change to the lobby again.

    I put a small detail page about my server @ http://planet.unfix.org this also renders the JSON that is published http://pastats.com/servers as a bit more directly readable HTML under http://planet.unfix.org/paservers/.

    As can be seen there though there are two servers: Planet Unfix & "24 Core Opteron at 2.6Ghz 32GB 10Gbit Server". The latter is apparently somebody in the CS department at University of Utah. Port number on that one is 20454, while mine is at 20545 (and that is also what is reported in this thread).

    I guess fixing it at something else with the --port argument to the server is a better way to go for the long run though to keep it in sync with the json file. Or possibly better, amend the script to force the --port argument to what is in the conf.json.
    cola_colin likes this.
  3. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Yeah I thought of improving it to directly do --port with the port in the json by now as well.
    Someday soon... For now I am in the habit of always setting --port by hand
  4. Quitch

    Quitch Post Master General

    Messages:
    5,856
    Likes Received:
    6,045
    Just wanted to thank you for your superb work on this, Cola. I setup a server on Azure today with minimal hassle thanks to these instructions, would never have managed it without them.
  5. zihuatanejo

    zihuatanejo Well-Known Member

    Messages:
    798
    Likes Received:
    577
    Hear hear.
  6. FSN1977

    FSN1977 Active Member

    Messages:
    657
    Likes Received:
    232
    I want to make my computer available as a server on PA stats, but all that tech stuff , any shortcut to the server setup? :)
  7. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    wait for Uber to provide an easier way, I am sure the reason why it takes so long is because they are trying to make this stuff much easier than I do xD
    squishypon3 likes this.
  8. zihuatanejo

    zihuatanejo Well-Known Member

    Messages:
    798
    Likes Received:
    577
    So I'm trying to set up a VPS running Debian to host a PA server. Debian, unlike Ubuntu, does not come with the 'add-apt-repository' program.

    Apparently it is included in 'software-properties-common' (and/or 'python-software-properties'). However I have tried adding both of these, and when i run the second command @cola_colin lists, I still get

    bash: apt-get-repository: command not found

    Now, I am a bit of a Linux noob. I've used Ubuntu quite a b it on desktop machines, but not done a great deal of command line stuff. So still basically in noob territory. I know basic commands and whatnot.

    So yeah, I would appreciate some help! :D
  9. Quitch

    Quitch Post Master General

    Messages:
    5,856
    Likes Received:
    6,045
    I'm writing up a guide on it, but it will only cover Ubuntu.
  10. FSN1977

    FSN1977 Active Member

    Messages:
    657
    Likes Received:
    232
    Okay im on windows
  11. proeleert

    proeleert Post Master General

    Messages:
    1,681
    Likes Received:
    1,656
    That ppa is only for installing the go language on ubuntu.
    so replace following:
    sudo add-apt-repository ppa:duh/golang
    with :
    something that install's "go" on debian (google it)
  12. fuzzels

    fuzzels Member

    Messages:
    90
    Likes Received:
    34
    Does not matter as golang is included in Debian.

    See post #30: https://forums.uberent.com/threads/wip-dedicated-servers.65077/page-2#post-1019398

    You will have to use the 'unstable' branch though as some stuff needs golang 1.1 which is not in stable yet.
    (or mess around with apt-pinning, but why bother with that ;)
    zihuatanejo likes this.
  13. Quitch

    Quitch Post Master General

    Messages:
    5,856
    Likes Received:
    6,045
  14. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Awesome. That's not just slightly more user friendly.
    Though I don't think this is actually required:
    Then we update the permissions on the file and run it.
    • chmod +x papatcher.go
    I just wrote that somewhere because I wasn't sure at the time and executed it without ever testing without. In setting up more servers over the recent days I could test skipping that and it seems to work fine. Basically go is a program that is executed and reads in the script file. So the file itself isn't executed I think.

    EDIT:
    Also while it is possible to up the max number of planets above 16 that will crash the texturing system on the client. By default that means a dead pa.exe.
    In that file I'd more look for the maximum size of the planets, the maxium height range and the fact that there is an if that removes waters from moons. All those limits can be removed there.
    Last edited: October 20, 2014
    Quitch likes this.
  15. Quitch

    Quitch Post Master General

    Messages:
    5,856
    Likes Received:
    6,045
    Thanks, I'll check those points and update the guide and have already put a disclaimer in about the planet limit.
  16. fuzzels

    fuzzels Member

    Messages:
    90
    Likes Received:
    34
    When upgrading between versions, you might have to 'roll-back' the changes made manually, otherwise the checksums do not match and the patching fails. Hence, I just "rm -rf ~/.local" when upgrading.

    Note that post in my Post #30 there is also a init script for automatically starting the server at boot.

    (though, it might be that your version of Ubuntu already converted itself to non-init.d usage)

    You can skip it (setting executeable flag on the papatcher.go file).

    By calling "go run <filename>", you are asking 'go' to 'run' that file. Hence, the only bits that come into question is if 'go' can read the file (r bit) as the user you are running it at.

    The +x bit would have been useful if the first line of papatcher.go was
    Code:
    ///usr/bin/env go run $0 $@ ; exit
    
    then calling "./gopatcher.go" would translate to 'go run ./gopatcher.go' which gives the same effect.
    cola_colin likes this.
  17. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    I've seen such checksum errors before, but I don't think they are important. I though they just mean "the patcher detected this file is not what it should be (as a new version is available) and will now fix it"
  18. fuzzels

    fuzzels Member

    Messages:
    90
    Likes Received:
    34
    I also ignored them, but then PA really did not work either; which might have been a fluke corrected by a retry and something else actually borking the real thing though.

    Is there btw a RSS feed somewhere or a notification email for new versions of the code, aka "please upgrade your server"? Otherwise I'll have start polling the update server once a day or so and generate a RSS feed myself for that.
  19. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    There is some ubernet webservice that returns the current build version. I forgot the link, but it is very easy to reverse from PA or ask Pyrus in the pa irc. His bot's !patch asks the webservice.
  20. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,328
    Likes Received:
    2,125

Share This Page