Open hpx7 opened 3 weeks ago
Hello! I forgot to death - the Dockerfile has not been updated in a good while! If you're interested, the real working build instructions that are always up to date are found in the .yml files, e.g. Linux_build.yml. I'll take a look at Dockerfile later
Hey @hpx7 , take a look at the new Dockerfile. Cheers!
Thanks, it builds now but fails to run with
fuse: device not found, try 'modprobe fuse' first
open dir error: No such file or directory
Is it possible to run without fuse?
Is it possible to run without fuse?
Unfortunately fuse
is required for mounting any AppImage
file.
Alternatively you can try passing --appimage-extract-and-run
which will prevent the mount process but will involve additional copy step into /tmp
.
fuse: device not found, try 'modprobe fuse' first
Does this happen with the new Dockerfile (so the line needs to be added there)? Or do you maybe have your own?
It happened with the new Dockerfile, but was able to get it to start with your suggestion:
CMD ["./Hypersomnia-Headless.AppImage", "--appimage-extract-and-run"]
Is WebRTC required to connect from the web portal, or are websockets supported as well? I'm running it an environment where port ranges (e.g. 9000-9100
) can't be exposed, only individual ports.
It happened with the new Dockerfile
I see, we might need to update it.
Is WebRTC required to connect from the web portal, or are websockets supported as well?
WebRTC is necessary from the Web to establish connection with any game server. WebSockets are still used to communicate with the signalling server that lets us initiate the WebRTC connection. If you only plan to support several web clients at most, consider setting:
webrtc_port_range_begin = 9000,
webrtc_port_range_end = 9004
And then only exposing ports 9000, 9001, 9002, 9003 and 9004.
I tried updating dockerfile_server_config.lua
to include the port range override:
server = {
server_name = "Server",
webrtc_port_range_begin = 9000,
webrtc_port_range_end = 9001
},
But I don't think the configuration was correctly applied:
[13:09:56] Starting yojimbo::Server.
[13:09:56] server listening on 127.0.0.1:8412
[13:09:56] server started with 20 client slots
[13:09:56] Server address is 127.0.0.1:8412
[13:09:56] Web port range: 9000-9100
Check if the new Dockerfile works any better. It's copying the config into config.force.lua
so it is certain to never be overwritten, as config.lua
is an input/output file.
The next server build will also allow muxing on a single UDP port. (i need to deploy it first tho)
I tried the latest but it still logs Web port range: 9000-9100
I tried the latest but it still logs
Web port range: 9000-9100
Thank you, I just found a bug that caused some settings to not be applied on startup. This will be fixed in the next update.
Awesome, let me know when the next release is cut and I'll test it out!
The new version is live.
Dockerfile
so you only need to expose a single port 9000.Dockerfile
to use the lowest supported Ubuntu version.Let me know if the config loads correctly as the Docker server had problems locating config.force.lua
- it should say something like:
Loading default_config.lua.
Applying config: user/config.force.lua
Loaded all user configs.
If it doesn't, try renaming config.force.lua
to config.lua
and go again.
Startup failed with
Applying config: /root/.config/Hypersomnia/user/config.force.lua
(completed_work_result=2)
[string "return {..."]:9: '}' expected (to close '{' at line 6) near 'webrtc_udp_mux'
Failed to obtain patch table from /root/.config/Hypersomnia/user/config.force.lua:
There was a problem reading /root/.config/Hypersomnia/user/config.force.lua.
Failed to read the initial config for the game!
I tried renaming it to config.lua
but that didn't work either
COPY cmake/dockerfile_server_config.lua /root/.config/Hypersomnia/user/config.lua
There was a problem reading /root/.config/Hypersomnia/user/config.lua.
Looks like there was just a comma missing in docker_server_config.lua
. After adding that, the server starts up!
Now I'm having issues connecting to the server:
[20:07:46] Starting a dedicated server. Binding to a port: 8412 (8412 was preferred)
[20:07:46] Starting yojimbo::Server.
[20:07:46] server listening on 127.0.0.1:8412
[20:07:46] server started with 10 client slots
[20:07:46] Server address is 127.0.0.1:8412
When I try to connect to it from https://hypersomnia.io/game/<hostname>:<port>
, I get WebRTC: WebSocket closed
after a while
Thanks for the catch - fixed the comma! That's already some progress.
When I try to connect to it from https://hypersomnia.io/game/
: , I get WebRTC: WebSocket closed after a while
Are you sure your Docker server is visible from the server list here? (the one Server
is someone else's Docker server - although it somehow seems to work fine on their end)
If it's missing, it means it is not registered with the signalling server and has no way of accepting WebRTC connections - even if you use a direct browser link.
Try double-clicking your server from the server list. What about the native client by the way? Does it connect?
Also forgive me for all the chaos - you're actually one of the first testers of the Docker build - you're doing me a favor!
I tested the current dockerfile_server_config.lua
locally as config.force.lua
and it does seem to accept browser connections - if you're using no other user config, I might have forgotten to expose another port.
WebRTC: WebSocket closed after a while
Also make sure any other official server works from your browser, e.g. https://hypersomnia.io/game/pl:1 If it doesn't, your browser might have WebRTC disabled.
I see the server on the list, but still can't connect
I can confirm that https://hypersomnia.io/game/pl:1 works for me in my browser
Here's a link to the server logs in case that's helpful: https://drive.google.com/file/d/1T9X350mc9ydjSH4YBcaXdKUnAttqG_R5/view?usp=sharing
I am using the default codebase from master
, with the exception of the server name override. The only two ports I have exposed are 8412 and 9000, but both those ports are mapped to random external ports on the host (ingress proxy). Would that cause a problem?
both those ports are mapped to random external ports on the host (ingress proxy). Would that cause a problem?
As far as I can tell all currently running dedicated servers are port-preserving cones, so the internal port matches the external port (incl. the other Server
that runs from the Dockerfile) - I would definitely investigate if Dockerfile's EXPOSE
works as expected in your case, or force the internal/external pairs for just 8412
and 9000
to be identical.
How about the native clients? Can they connect? If not, then it's almost surely a problem with how 8412
and 9000
are being exposed - I'm 99.99% sure that the game does not need any more than just 8412
port for the native connection.
I think even if native clients could connect, the WebRTC backend might require that the external ports aren't random so it performs the STUN mapping and SDP exchange without issues (it has to even for public servers without routers). Definitely do try to map internal 9000
to external 9000
somewhere in your configuration.
A small update: the server now uses JSON instead of Lua files, but this is already reflected in the latest Dockerfile
.
Running
docker build -t hypersomnia
onmaster
fails with the following error: