Author Topic: [not a bug] r3625: Headless server sends users to admins' FTPServerPort  (Read 1137 times)

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Yesterday when testing with Titi, we had the following setup:

* Headless server (hosted by Titi on one computer behind his NAT), FTPServerPort set to 61358
* Admin client (run by Titi on another computer behind his NAT, connected to the headless server which is supposedly situated in the same LAN), FTPServerPort set to 61398
* Standard game client (run by me on another computer on another network behind NAT, connected to Titi's headless server by means of his symmetric port forwarding), FTPServerPort set to 61358

When we were both connected to the server and Titi was controlling, he switches to a map I did not have, so that I got a download prompt. I tried to download but the download failed. In the temrinal window I started MegaGlest in, I could see that the game was printing that it was trying to access
Code: [Select]
ftp://TITIS_SERVER_IP:61398/PATH/TO/FILEto download the map. This could hardly work, since (as I verified by netcat) the FTP server was listening on port 61358 on this IP address, not 61398. Apparently this port number was propagated from the controlling client (Titi) to the headless server, causing it to send out an incorrect FTP port for me to download from.
« Last Edit: 6 October 2012, 20:42:39 by tomreyn »
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: r3625: Headless server sends users to admins' FTPServerPort
« Reply #1 on: 2 October 2012, 05:32:34 »
The only way a host (headless or regular) will give a different port # from default is either the ini has the:

FTPServerPort=61398

or they passed it on commandline, the admin has nothing to do with the hosts port #.

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: r3625: Headless server sends users to admins' FTPServerPort
« Reply #2 on: 2 October 2012, 11:48:09 »
Okay, I'd like Titi to comment on this one then.
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: r3625: Headless server sends users to admins' FTPServerPort
« Reply #3 on: 3 October 2012, 20:18:54 »
We had set FTPServerPort=61398, but the provided ftp download port was the one of the controlling client, NOT the one which was set on the headless server . Thats the bug.
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: r3625: Headless server sends users to admins' FTPServerPort
« Reply #4 on: 3 October 2012, 20:31:07 »
Please provide detailed steps to reproduce as i could not reproduce this with the info given above

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: r3625: Headless server sends users to admins' FTPServerPort
« Reply #5 on: 3 October 2012, 21:44:53 »
steps to do:
- Open a headless server with a non standard FTPServerPort.
- put a new map on this server
- connect with a client who has the map too
- connect with another client who does not have the map
- try to download the map from the headless server
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: r3625: Headless server sends users to admins' FTPServerPort
« Reply #6 on: 4 October 2012, 04:30:30 »
I cannot reproduce this. The steps i took were:

1. Open headless server with entry in glestuser.ini:
FTPServerPort=61308
2. Open admin client with entry  in glestuser.ini:
FTPServerPort=61358
3. Open secondary client which does not have the map selected with entry  in glestuser.ini:
FTPServerPort=61358
4. Secondary client is prompted to download missing map, and when i click yes it downloads the map successfully.

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
ok this is no bug!

My problem is/was my server used the ports 61397-61406. This means in fact he still uses 61357 for the MG connection, but 61398-61406 for the ftp. So I need to configure port forwarding for the 31257 port, but no port forwarding for the ftp ( port 61398-61406 )
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
31257?
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·