kbroman/miner

mc_connect fails - port number?

crogger62 opened this issue · 3 comments

Hi - I have successfully installed the MC server on an Ubuntu box (using: https://ropenscilabs.github.io/miner_book/installation.html#linux)

I have also installed the miner R package using: https://github.com/ropenscilabs/miner/blob/master/vignettes/miner.Rmd

When I try the first mc_connect it fails:

mc_connect('192.168.0.53')
Error in socketConnection(host = hostname, as.integer(port), open = "r+b", :
cannot open the connection
In addition: Warning message:
In socketConnection(host = hostname, as.integer(port), open = "r+b", :
192.168.0.53:4711 cannot be opened

This will happen if I run on the same host as the R Server or from a different host. It also happens if I try with 'localhost' as well.

I noticed in the MC server properties that there are two other port references:
rcon.port=25575
server-port=25565
I can mc_connect() to these but none of the other commands work. Any ideas?

Thanks - great idea - looking forward to do working in it!
Craig

Can you connect to the server from within Minecraft? That is, if you choose "Multiplayer" and "Direct Connect" and enter "192.168.0.53:4711", does it let you in?

Hi - That string: "192.168.0.53:4711" from Minecraft connecting as you indicated yields the message "io.netty.channel.AbstractChannel$AnnotatedContextException: refused. no further information"

It will work from Minecraft if I leave off the port, i.e., "192.168.0.53" . It also works if I go to "192.168.0.53:25565", which is the server-port in the server.properties files.

I do not get an error message if I try mc_connect(""192.168.0.53", port=25565) but I get an error with subsequent calls:

myid<-getPlayerIds()
Error in mc_receive() :
The server returned nothing; the connection may be down.

Craig

tzerk commented

@crogger62 I just stumbled upon the same problem, but managed to find the culprit. In my case, I did not install the RaspberryJuice plugin for Spigot. As per the instructions, download the JAR file and move it to to plugins subdirectory of your server. (Re)Start your server and then use miner::mc_connect("192.168.0.53", "4711"). Do not connect to the default server port (25565), but instead to the default tcp port of the RaspberryJuice plugin (4711).