shobhit-pathak / cs2-rcon-panel

A simple web panel to control CS2 servers using RCON
MIT License
50 stars 16 forks source link

Server crashes when Rcon pw is wrong #5

Closed Miraculix1337 closed 8 months ago

Miraculix1337 commented 9 months ago

Server Crashes when you type in a wrong rcon. Output got generated in loops and Pannel would be banned by console. Also the heartbeat Timer can be set to 10-15 secs. It doesnt need to be every second

Miraculix1337 commented 9 months ago
Error in connecting to the server, reconnecting..... ERROR: Error: Already disconnected. Please reauthenticate.
    at /home/tt/cs2-rcon-panel/node_modules/rcon-srcds/dist/rcon.js:122:24
    at new Promise (<anonymous>)
    at RCON.execute (/home/tt/cs2-rcon-panel/node_modules/rcon-srcds/dist/rcon.js:120:16)
    at RconManager.send_heartbeat (/home/tt/cs2-rcon-panel/modules/rcon.js:36:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
starting disconnect 23
CONNECTING RCON 23 10.0.5.57 27016
RCON Authentication failed 23 Error: connect ECONNREFUSED 10.0.5.57:27016
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1595:16) {
 errno: -111,
 code: 'ECONNREFUSED',
 syscall: 'connect',
 address: '10.0.5.57',
 port: 27016

} Error in connecting to the server, reconnecting..... ERROR: Error: Already disconnected. Please reauthenticate. at /home/tt/cs2-rcon-panel/node_modules/rcon-srcds/dist/rcon.js:122:24 at new Promise () at RCON.execute (/home/tt/cs2-rcon-panel/node_modules/rcon-srcds/dist/rcon.js:120:16) at RconManager.send_heartbeat (/home/tt/cs2-rcon-panel/modules/rcon.js:36:58) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) starting disconnect 23 CONNECTING RCON 23 10.0.5.57 27016 RCON Authentication failed 23 Error: connect ECONNREFUSED 10.0.5.57:27016 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1595:16) { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '10.0.5.57', port: 27016 } Error in connecting to the server, reconnecting..... ERROR: Error: Already disconnected. Please reauthenticate. at /home/tt/cs2-rcon-panel/node_modules/rcon-srcds/dist/rcon.js:122:24 at new Promise () at RCON.execute (/home/tt/cs2-rcon-panel/node_modules/rcon-srcds/dist/rcon.js:120:16) at RconManager.send_heartbeat (/home/tt/cs2-rcon-panel/modules/rcon.js:36:58) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) starting disconnect 23 CONNECTING RCON 23 10.0.5.57 27016 RCON Authentication failed 23 Error: connect ECONNREFUSED 10.0.5.57:27016 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1595:16) { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '10.0.5.57', port: 27016 }

shobhit-pathak commented 9 months ago

Hi, thanks for reporting this issue I've pushed a fix with some error handling, also the heartbeat timer is not every second, it is set to 5 seconds

Miraculix1337 commented 9 months ago

Thank you for your quick response. I saw the 5 sec timer. I will check out the fixes Anything to know when i clone the repo to prevent data loss?

shobhit-pathak commented 9 months ago

There should be no data loss if you have your 'cspanel.db' db file in place.