ThanksABundle
ThanksABundle

Reputation: 385

RSelenium with Docker. Error in checkError(res)

Following documentation online for using RSelenium with Docker, I have installed Docker Toolbox and RSelenium.

In the Docker Toolbox, I run

$ docker run -d -p 4445:4445 selenium/standalone-chrome

and

$ docker ps,

and get the following output.

enter image description here

Then, I run the following in R:

library(RSelenium)
library(Rvest) #not sure if I need this?
#192.168.99.100 is my IP

remDr <- RSelenium::remoteDriver(remoteServerAddr = "192.168.99.100", 
                             port = 4445L)
remDr$open()

but I get the error

Error in checkError(res) : 
  Undefined error in httr call. httr output: Failed to connect to 
192.168.99.100 port 4445: Connection refused

In Kitematic, I see this:

enter image description here

The only things I can think of that is causing this, is that I'm not using Toolbox correctly (need Docker for Windows instead), or that the default path in the path argument to remoteDriver() is not right.

I am running on Windows machine, but don't have Windows 10 pro.

Anyone got any thoughts?

Upvotes: 2

Views: 361

Answers (1)

Senior Pomidor
Senior Pomidor

Reputation: 1925

the selenium/standalone-chrome listen to the 4444 port. that's why you should to map yo 4444 port.

run as docker run -d -p 4445:4444 selenium/standalone-chrome

Upvotes: 1

Related Questions