Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UDP ports are not exposed correcty #7

Open
SebPikPik opened this issue Mar 20, 2019 · 4 comments
Open

UDP ports are not exposed correcty #7

SebPikPik opened this issue Mar 20, 2019 · 4 comments
Assignees

Comments

@SebPikPik
Copy link

Hi,

I cloned this repo, modified the server infos (like users, passwords, server title) and tried to boot it up (which it does) but it seems that some ports are not exposed correctly using the docker compose file provided

f0beb9122b27 dedicated "./start.sh" 15 minutes ago Up 4 seconds 0.0.0.0:2350->2350/tcp, 0.0.0.0:5000->5000/tcp, 0.0.0.0:32807->2350/udp, 0.0.0.0:32789->3450/tcp, 0.0.0.0:32806->3450/udp maniaplanet-docker_dedicated_1

The ports 2350/udp, 3450/tcp and 3450/udp are randomly opened on my host (running docker 18.03)

A quick netstat from my docker host shows this :

tcp        0      0 :::2375                 :::*                    LISTEN      8934/dockerd
tcp        0      0 :::5000                 :::*                    LISTEN      21449/docker-proxy
tcp        0      0 :::2350                 :::*                    LISTEN      21484/docker-proxy
tcp        0      0 :::32789                :::*                    LISTEN      21460/docker-proxy
udp        0      0 :::32806                :::*                                21473/docker-proxy
udp        0      0 :::32807                :::*                                21495/docker-proxy

A netstat inside the container gives me this :

/dedicated # netstat -tunap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.11:38935        0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:5000            0.0.0.0:*               LISTEN      13/ManiaPlanetServe
tcp        0      0 0.0.0.0:2350            0.0.0.0:*               LISTEN      13/ManiaPlanetServe
udp        0      0 0.0.0.0:2350            0.0.0.0:*                           13/ManiaPlanetServe
udp        0      0 127.0.0.11:36794        0.0.0.0:*    

Ports in config files are the default ones

grep -Ri port *
Logs/ConsoleLog.13.txt:[2019/03/20 14:49:04] Listening for xml-rpc commands on port 5000.
README.md:    ports:
Binary file UserData/Maps/stadium_map.Map.gbx matches
UserData/Config/config.txt:        <server_port>2350</server_port>
UserData/Config/config.txt:        <server_p2p_port>3450</server_p2p_port>
UserData/Config/config.txt:        <client_port>0</client_port>
UserData/Config/config.txt:        <xmlrpc_port>5000</xmlrpc_port>
Binary file UserData/Packs/[email protected] matches
config.default.xml:        <server_port>2350</server_port>
config.default.xml:        <server_p2p_port>3450</server_p2p_port>
config.default.xml:        <client_port>0</client_port>
config.default.xml:        <xmlrpc_port>5000</xmlrpc_port>
docker-compose.yml:    ports:
entrypoint.sh:if [ "$FORCE_IP_PORT" = "" ]
entrypoint.sh:   FORCE_IP_PORT=${PORT-2350}
entrypoint.sh:echo "=> Going to run on forced IP: ${FORCE_IP_ADDRESS} and port: ${FORCE_IP_PORT}"
entrypoint.sh:    /forceip=${FORCE_IP_ADDRESS}:${FORCE_IP_PORT} \
Binary file stadium_map.Map.gbx matches

I took the compose file used on the repo project. Any idea ?

@SebPikPik
Copy link
Author

Found the issue

"expose" and "ports" were conflicting. Only using "ports" solved it

@Zeldri
Copy link

Zeldri commented Jun 18, 2019

Found the issue

"expose" and "ports" were conflicting. Only using "ports" solved it

I'm having the same issue, When I want to connect to the server, I got an UDP initialization failed
the expose that you are talking about is the one in docker-compose ????

@tomvlk
Copy link
Member

tomvlk commented Jun 21, 2019

@Evilcious The expose and ports, is it only on your local docker-compose or in the repo? If in the repo, please tell me asap so we can fix it.

@Zeldri
Copy link

Zeldri commented Jun 21, 2019

I resolved this issue btw, I just edit the docker-compose from that :

 dedicated:\
    image: pyplanet/maniaplanet-dedicated
    restart: always
    env_file: ./dedicated_vars.env
    volumes:
      - ./UserData:/dedicated/UserData
      - ./Logs:/dedicated/Logs
    expose:
      - "2350"
      - "2350/udp"
      - "3450"
      - "3450/udp"
      - "5000"
    ports:
      - 5000:5000
      - 2350:2350
      - "2350/udp"
      - "3450"
      - "3450/udp"

to that :

dedicated:
    image: pyplanet/maniaplanet-dedicated
    restart: always
    env_file: ./dedicated_vars.env
    volumes:
      - ./UserData:/dedicated/UserData
      - ./Logs:/dedicated/Logs
    ports:
      - 5000:5000
      - 2350:2350
      - "2350:2350/udp"
      - "3450:3450"
      - "3450:3450/udp"

without the :XXXX ,docker assigned a random port to 2350 and 3450 like you can see in @Evilcious 's screenshot

tcp        0      0 :::32789                :::*                    LISTEN      21460/docker-proxy
udp        0      0 :::32806                :::*                                21473/docker-proxy
udp        0      0 :::32807                :::*                                21495/docker-proxy

@tomvlk tomvlk reopened this Jun 21, 2019
@tomvlk tomvlk self-assigned this Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants