dcodeIO / WebRcon

RCON over WebSocket client library and command line interface.
Apache License 2.0
19 stars 5 forks source link

Seems to no longer work ;( #3

Closed Killa4 closed 4 years ago

Killa4 commented 5 years ago

ERROR: { Error: Parse Error at Socket.socketOnData (_http_client.js:441:20) at Socket.emit (events.js:182:13) at addChunk (_stream_readable.js:283:12) at readableAddChunk (_stream_readable.js:264:11) at Socket.Readable.push (_stream_readable.js:219:10) at TCP.onStreamRead (internal/stream_base_commons.js:94:17)

AlexanderDownie commented 5 years ago

It does. Can you upload more of your code? That error doesn't really give much to work with

Killa4 commented 5 years ago

I copied the example and just put my server information in

ERROR: { Error: Parse Error at Socket.socketOnData (_http_client.js:441:20) at Socket.emit (events.js:182:13) at addChunk (_stream_readable.js:283:12) at readableAddChunk (_stream_readable.js:264:11) at Socket.Readable.push (_stream_readable.js:219:10) at TCP.onStreamRead (internal/stream_base_commons.js:94:17) bytesParsed: 0, code: 'HPE_INVALID_CONSTANT', type: 'error', target: WebSocket { _events: { open: [Function], message: [Function], error: [Function], close: [Function] }, _eventsCount: 4, _maxListeners: undefined, _socket: null, _ultron: null, _closeReceived: false, bytesReceived: 0, readyState: 0, supports: { binary: true }, extensions: {}, _binaryType: 'nodebuffer', _isServer: false, url: 'ws://162.248.88.169:28015/****', protocolVersion: 13 } }

AlexanderDownie commented 5 years ago

Okay, looks like you are trying to connect with the actual game port (28015 is the default port). You will want to connect to the RCON port set in your parameters when running your server. You need to set the following: +rcon.port 28016 +rcon.password rconpasswordhere +rcon.web 1 28016 bring the RCON port, and the one you want to connect to. This is all presuming you are running a dedicated server.

Killa4 commented 4 years ago

The rcon port atm is also 28015 as the game uses UDP I believe and Rcon uses TCP so having them the same doesnt effect anything. Websites like Battlemetrics and programs like RustAdmin connect to the server with the Rcon port also being 28015. So that isnt the issue afaik.

Killa4 commented 4 years ago

I have got it to work now! Thanks for the help still not sure what the issue was, went and tried a localhost server got that to work then went back and tried a normal server and it worked out