ekaomk / Minecraft-RCON-Console

Minecrafe RCON (Web) Console
GNU General Public License v3.0
66 stars 26 forks source link

Can send rcon command,query says server is offline. #14

Open tenent007963 opened 6 years ago

tenent007963 commented 6 years ago

I tried modifying the query port between 25565 and 25585 and changing the host from ip address to domain,but it still says server error.My rcon commands are working half good except sometimes returning a empty respond(command executed successfully on minecraft server).I'm using IIS.

paul1278 commented 6 years ago

Do you have any error logs for your webserver?

tenent007963 commented 6 years ago

Nope.It doesn't have any error.

paul1278 commented 6 years ago

Does your browser log any errors? Open the Developer Tools (in Chrome by pressing F12) and look into the Console-Tab, any errors there? And of course, is the query enabled on your server you try to connect to?

Benricheson101 commented 6 years ago

I'm getting the same message, it says the server is offline but on the side bar it says its online, and lists the players online

paul1278 commented 6 years ago

@Benricheson101 is your RCON-port & host right in config.php?

Benricheson101 commented 6 years ago

Actually, It was not working and then I restarted the server a few times and changed the rconpassword and it worked!! Its awesome! 1 suggestion (if it's possible) are you able to have it mirror the console to show like errors, commands run by players, etc?

paul1278 commented 6 years ago

@tenent007963 If you don't find any errors in your configuration, go in /rcon/rcon.php to line 43 and remove the @ at the beginning of the line. Then try the console again, does it show errors now in your webserver log? @Benricheson101 good suggestion, could be possible using a WebSocket

Benricheson101 commented 6 years ago

I am not sure what that means but great!

tenent007963 commented 6 years ago

@Benricheson101 I too restart my server multiple times....with the same password tho. @paul1278 My case I use special port which is port 255 for both mc client connection and server query,and also if I didn't mistaken the api.php hard coded the port number so I changed it to match my current query port.Also there was no error on both server and client side (tried every error log but seems no luck). Now I try using https://api.mcsrvstat.us to query and get respond and it seems no error too.....Weird enough...

paul1278 commented 6 years ago

@tenent007963 In which line the port is hardcoded? Can MC use the same port for query and client-handling?

tenent007963 commented 6 years ago

@paul1278 query.php line 27 public function __construct($host, $port=25565, $timeout=3, $auto_connect = false) to public function __construct($host, $port=255, $timeout=20, $auto_connect = false)

paul1278 commented 6 years ago

@tenent007963 No thats not hardcoded, thats only the value for $port if no parameter is specified. This should make no difference, if it does, then in your config.php is maybe something wrong. If your query connects then this part is OK, sometimes it could be that a command doesnt generate an output I guess.

Another question, is there an error in your MC log using port 255?

tenent007963 commented 6 years ago

@paul1278 I can make rcon command tho. No. No error on using any port in local (both server and query side are inside same LAN network so it shouldn't be any problem with my networking) .

md5sha256 commented 6 years ago

I currently have the exact same issue as @tenent007963 I know this is somewhat (4 months) late. Has there been any updates to fix this issue?

I have tried both @Benricheson101 restart & password change and both of @paul1278 suggestions.