Author Topic: multiple headless servers on one mashine  (Read 1031 times)

treba

  • Guest
multiple headless servers on one mashine
« on: 14 January 2012, 20:09:36 »
hey

i just wanded to try out to run two headless servers on the same mashine, using different users, different installations and different ports. but when i try to start the second server, i get this error message:
Code: [Select]
Error binding socket sock = 3, err = -1, error = (Error: 98 - [Address already in use])i already guessed it would not be possible, yet, to run multiple servers. but now i want to ask what the problem is and if it's gonna be fixed in the next release?

thank you in advance :)

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: multiple headless servers on one mashine
« Reply #1 on: 14 January 2012, 20:14:02 »
It IS possible, run from console megalglest --help:

Code: [Select]
--headless-server-mode=x,x Run as a headless server.
                      Where x is an optional comma delimited command
                              list of one or more of the following:
                      exit - which quits the application after a game
                                     has no more connected players.
                      vps  - which does NOT read commands from the
                                     local console (for some vps's).

--use-ports=x,y Force hosted games to listen internally on port
x, externally on port y.
                      Where x is the internal port # on the local
                              machine to listen for connects
                            y is the external port # on the
                              router/proxy to forward connection
                              from to the internal port #
                      *NOTE: If enabled the FTP Server port #'s will
                             be set to x+1 to x+9

example:

Code: [Select]
megaglest --headless-server-mode --use-ports=61457,61457
megaglest --headless-server-mode --use-ports=61557,61557

treba

  • Guest
Re: multiple headless servers on one mashine
« Reply #2 on: 14 January 2012, 21:43:58 »
alright, thx a lot :)

now everything is ready to run a megaglest and a annex server on the same mashine

Ishmaru

  • Behemoth
  • *******
  • Posts: 1,071
  • um wat??
    • View Profile
    • DelphaDesign
Re: multiple headless servers on one mashine
« Reply #3 on: 14 January 2012, 21:57:02 »
Thank you treba!
Annex: Conquer the World Release 4 For Pc Mac + Linux
https://forum.megaglest.org/index.php?topic=9570.0
Annex is now on Facebook!
https://www.facebook.com/AnnexConquer

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: multiple headless servers on one mashine
« Reply #4 on: 14 January 2012, 22:01:03 »
FYI if you 7z compress the techtree and the archive name is the same name as the techtree folder and exists in the techs folder, then users can download the techtree into normal MG when they join the server (same goes for tilesets). MAps are downloaded individually.

For example in the techs folder we have megapack. If i compress megapack into megapack.7z and place that archive into the techs folder, clients can download it and it will uncompress and install after download.