Open markrennie71 opened 4 years ago
I have no idea why that is. But if you find something I will gladly add this. I now added an option to advertise the server on the official server list but I need to verify that it works.
Looks like it is a port. If you add 8777:8777/udp to the list of ports in your docker run command, it should show up on the LAN.
It looks like the UT client sends a broadcast packets out to each UDP port within this range 8777-8786 and it just scans through them constantly. I noticed that you can run (on windows) multiple UT servers at the same time and when you do, the server automatically assigns the next port in the range to the server.
so, when you open one instance of the UT server the following ports start listening: 7777 7778 8777
when you open a second instance of the server at the same time, the following ports are listening: 7777 7777 7778 7779 8777 8778
I think this is fixed now with the port 8777?
Did anyone ever get LAN advertising to work?
Yes, mapping Port 8777 fixes it.
Strange, it does not work for me, at least with the GOTY Edition from Steam.
Hmm when I check the Log (Tools->Show Log) in UT Client it shows: Init: WinSock: I am <pc> (172.31.128.1)
which is the IPv4 of one of my vEthernet Adapters and not my real LAN ip. Maybe that is the cause? anybody knows if/how this could be fixed?
This is my docker-compose file and it is definitely working for me.
version: "3.2"
services:
ut99:
image: roemer/ut99-server:latest
container_name: ut99
volumes:
- ut99-data:/ut-data
environment:
- UT_SERVERNAME=Testing UT Server In Docker
- UT_WEBADMINUSER=redacted
- UT_WEBADMINPWD=redacted
- UT_DOUPLINK=True
- UT_SERVERURL=CTF-Face?game=BotPack.CTFGame?mutator=BotPack.InstaGibDM,MapVoteLAv2.BDBMapVote,FlagAnnouncementsV2.FlagAnnouncements
ports:
#Webadmin
- 5580:5580
#Game Play
- 7777:7777/udp
#Game Query
- 7778:7778/udp
#beacon port
- 7779:7779/udp
#LAN Discovery
- 8777:8777/udp
restart: always
volumes:
ut99-data:
My client version is: 469.
I can see it advertise on the LAN and I can connect and play on that server.
Here's the ini file for that server, I can't remember if I modified it by hand to get it working. I think I did as there was something going wrong when it tried to advertise to the Internet servers. https://gist.github.com/RIKIKU/564e69ca9bd83c6737834787d9957889
@Roemer are you using a bridge network? (docker network ls
) The container will get an internal IP address in that range usually. mine is running on
Sockets: I am 2412bec61523 (172.26.0.2)
But that doesn't matter because I'm using a bridge network and mapping all the required ports.
If you run docker inspect <containerId>
it should show you a list of all of the ports (among other things) that are listening on the container. Mine looks like this:
"Ports": {
"27900/tcp": null,
"27900/udp": null,
"5580/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "5580"
}
],
"7777/udp": [
{
"HostIp": "0.0.0.0",
"HostPort": "7777"
}
],
"7778/udp": [
{
"HostIp": "0.0.0.0",
"HostPort": "7778"
}
],
"7779/udp": [
{
"HostIp": "0.0.0.0",
"HostPort": "7779"
}
],
"7780/udp": null,
"7781/udp": null,
"8777/udp": [
{
"HostIp": "0.0.0.0",
"HostPort": "8777"
}
]
},
as you can see 8777 is mapped, but as I mentioned previously, if the UT server is unable to bind 8777 then it will simply go to the next available port between 8777-8786. so you may have mapped 8777 but if it was unable to bind, it might be running on 8778 in stead.
@Roemer another question I have for you is: is your game client on the same network segment as your docker server? the client discovers lan servers by sending broadcast packets, so if you're in a different network to the host, then you won't see the server as broadcast packets are not routed to other networks.
@Roemer I think I have some more info regarding this problem. I have never had an issue finding my LAN servers until the last few days. It happens on one of my windows 10 laptops. A reboot of that machine seems to fix it, however if I leave the machine alone for a day or so, it will stop being able to see the UT server.
I have tested the docker-compose that I posted here on a completely fresh install of Ubuntu 20.4 LTS and it works with no issue. So it has to be something on the client side. When my laptop is working I can see both servers on my network.
I have found that I can reliably check that the servers are advertising from the docker hosts. If you have PowerShell installed on your docker host you can run the Find-UtLanServers cmdlet and it should see the server advertise.
In other words, I still think this is a client side issue and not a server side issue.
Hello, i see this used a bridged network not host. I can connect to the server via ip address but not see it in the LAN server lists. I have checked advertise server, restart etc but still no joy. Any idea please? is it s port?
Cheers Mark