我想托管一个多人游戏的专用蒸汽服务器,我目前正在码头容器中工作。
我的Dockerfile
FROM ubuntu:22.04
RUN useradd -m steam
COPY --chown=steam:steam LinuxServer /home/steam/
COPY --chown=steam:steam steamclient.so /home/steam/.steam/sdk64/steamclient.so
USER steam
WORKDIR /home/steam
CMD ./Server.sh
我的docker-compose.yml
services:
server:
image: server
network_mode: host
启动容器时,专用服务器无法登录到蒸汽。在Steam/logs/connection_log.txt
中,它报告OK消息:
[2022-10-11 10:04:10] Connectivity test: Starting test, fetching 'http://test.steampowered.com/204'
[2022-10-11 10:04:10] Connectivity test: OK!
[2022-10-11 10:04:10] Connectivity test: result=Connected (since 0.0s ago), prev=Unknown, in progress=0
[2022-10-11 10:04:22] Connectivity test: Starting test, fetching 'http://test.steampowered.com/204'
[2022-10-11 10:04:22] Connectivity test: OK!
[2022-10-11 10:04:22] Connectivity test: result=Connected (since 11.5s ago), prev=Unknown, in progress=0
[2022-10-11 10:04:23] Connectivity test: Starting test, fetching 'http://test.steampowered.com/204'
[2022-10-11 10:04:23] Connectivity test: OK!
但是,在Steam/logs/connection_log_7777.txt
中,它重复以下错误:
[2022-10-11 10:04:10] IPv6 HTTP connectivity test (ipv6check-http.steamcontent.com / [2a01:bc80:8:103::9b85:fc12]:80 ([2a01:bc80:8:103::9b85:fc12]:80)) - TIMEOUT
[2022-10-11 10:04:12] IPv6 UDP connectivity test (ipv6check-udp.steamcontent.com / 2a01:bc80:a:100::b919:b604) - TIMEOUT
[2022-10-11 10:04:21] [0,0] SetSteamID( [G:1:0] )
[2022-10-11 10:04:21] CCMInterface::YieldingConnect -- calling ISteamDirectory/GetCMListForConnect web api
[2022-10-11 10:04:21] [0,0] SetSteamID( [G:1:0] )
[2022-10-11 10:04:21] GetCMListForConnect -- web API call failed (status = 0)
[2022-10-11 10:04:21] [0,0] PingWebSocketCM() (cm2-iad1.cm.steampowered.com.:443) starting...
[2022-10-11 10:04:21] [0,0] PingWebSocketCM() (cm2-lax1.cm.steampowered.com:27021) starting...
[2022-10-11 10:04:21] [0,0] PingWebSocketCM() (cm1-lax1.cm.steampowered.com:27021) starting...
[2022-10-11 10:04:21] [0,0] PingWebSocketCM() (cm2-iad1.cm.steampowered.com.:443) failed talking to cm (timeout/neterror - Invalid)
[2022-10-11 10:04:21] [0,0] PingWebSocketCM() (cm2-lax1.cm.steampowered.com:27021) failed talking to cm (timeout/neterror - Invalid)
[2022-10-11 10:04:21] [0,0] PingWebSocketCM() (cm1-lax1.cm.steampowered.com:27021) failed talking to cm (timeout/neterror - Invalid)
[2022-10-11 10:04:21] [1,3] Connect() starting connection (eNetQOSLevelMedium, cm2-iad1.cm.steampowered.com.:443, WebSocket)
[2022-10-11 10:04:21] [1,0] ConnectFailed('Connection Failed':0) (0.0.0.0:0, WebSocket)
[2022-10-11 10:04:21] [1,0] Client thinks it can connect via: UDP - yes, TCP - yes, WebSocket:443 - yes, WebSocket:Non443 - yes
[2022-10-11 10:04:21] [0,0] StartAutoReconnect() will start in 4.0 seconds (attempt 1)
[2022-10-11 10:04:22] [0,0] SetSteamID( [G:1:0] )
在我的本地机器上启动专用服务器时,我没有这些问题。我假设它在码头容器中的工作方式与我使用的“主机”网络模式相同。有人知道我在这里做错了什么吗?
任何帮助都是非常感谢的!
发布于 2022-10-12 09:35:14
如果有人有同样的问题,我通过向Dockerfile
添加以下命令来修复它
RUN apt-get update && \
apt-get install -y openssl iproute2 ca-certificates && \
apt-get clean
https://stackoverflow.com/questions/74026481
复制相似问题