Didstopia / rust-server

Provides a dedicated linux server for Rust (the game) running inside a Docker container.
MIT License
244 stars 106 forks source link

Unable to connect to RCON creating new server #11

Closed joeknock90 closed 7 years ago

joeknock90 commented 7 years ago

Just created a server and I'm unable to connect on the RCON port. Request reaches the server and this shows in the logs:

3/20/2017 2:24:36 PM|Fatal|<>c__DisplayClass6.<receiveRequest>b__5|WebSocketSharp.WebSocketException: An exception has occurred while reading an HTTP request/response. ---> System.IO.EndOfStreamException: The header cannot be read from the data source.
                             at WebSocketSharp.HttpBase+<>c__DisplayClass1.<readHeaders>b__0 (Int32 i) [0x00000] in <filename unknown>:0
                             at WebSocketSharp.Ext.EqualsWith (Int32 value, Char c, System.Action`1 action) [0x00000] in <filename unknown>:0
                             at WebSocketSharp.HttpBase.readHeaders (System.IO.Stream stream, Int32 maxLength) [0x00000] in <filename unknown>:0
                             at WebSocketSharp.HttpBase.Read[HttpRequest] (System.IO.Stream stream, System.Func`2 parser, Int32 millisecondsTimeout) [0x00000] in <filename unknown>:0
                             --- End of inner exception stack trace ---
                             at WebSocketSharp.HttpBase.Read[HttpRequest] (System.IO.Stream stream, System.Func`2 parser, Int32 millisecondsTimeout) [0x00000] in <filename unknown>:0
                             at WebSocketSharp.HttpRequest.Read (System.IO.Stream stream, Int32 millisecondsTimeout) [0x00000] in <filename unknown>:0
                             at WebSocketSharp.Net.WebSockets.TcpListenerWebSocketContext..ctor (System.Net.Sockets.TcpClient tcpClient, System.String protocol, Boolean secure, WebSocketSharp.Net.ServerSslConfiguration sslConfig, WebSocketSharp.Logger logger) [0x00000] in <filename unknown>:0
                             at WebSocketSharp.Ext.GetWebSocketContext (System.Net.Sockets.TcpClient tcpClient, System.String protocol, Boolean secure, WebSocketSharp.Net.ServerSslConfiguration sslConfig, WebSocketSharp.Logger logger) [0x00000] in <filename unknown>:0
                             at WebSocketSharp.Server.WebSocketServer+<>c__DisplayClass6.<receiveRequest>b__5 (System.Object state) [0x00000] in <filename unknown>:0
3/20/2017 2:24:36 PM|Error|WebSocketServiceManager.InternalTryGetServiceHost|A WebSocket service with the specified path isn't found:
                             path: /
Dids commented 7 years ago

I'll need more information on your setup in order to help. :)

Could you paste the docker run command, along with your env file (or env vars)? Remember to censor/remove sensitive information first though.

Which OS/distro are you running on? Any software or hardware firewalls enabled?

joeknock90 commented 7 years ago

Sure.

Distro is Fedora 25, docker version 1.12.6

Docker run command:

docker run --name rust -d --restart always -p 28015:28015 -p 28015:28015/udp -p 28016:28016 -p 8080:8080 -v /mnt/docker/rust:/steamcmd/rust --env-file /mnt/docker/rust/rust.env didstopia/rust-server

Env file:

RUST_SERVER_STARTUP_ARGUMENTS="-batchmode -load -logfile /dev/stdout + server.secure 1" RUST_SERVER_IDENTITY="Servername_SERVER" RUST_SERVER_SEED="47850" RUST_SERVER_NAME="Servername" RUST_RCON_PASSWORD="tottalynotthedefaultpassword" RUST_OXIDE_ENABLED="1" RUST_OXIDE_UPDATE_ON_BOOT="1"

I'm using firewalld and opened the ports (like all of the other containers I use) with

sudo firewall-cmd --add-port=[each port here]/[proto] --perm

then reloaded

sudo firewall-cmd --reload

Thanks for the help by the way

joeknock90 commented 7 years ago

Ignore me. I am a moron. I have figured out the problem. I typo'd when creating port 8080 for the container.

Sorry!

joeknock90 commented 7 years ago

Closing because I am a fat fingered big dummy.

Dids commented 7 years ago

No worries at all, glad to hear it's working, and also nice to hear it's working on Fedora. :)