Uncategorized

Selenium Grid : Forbidden for Proxy , HTTP ERROR: 403

Command to start Selenium Grid at your local


F:\Selenium>java -jar selenium-server-standalone-2.41.0.jar
Aug 20, 2014 7:44:34 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a selenium grid server
2014-08-20 19:44:35.907:INFO:osjs.Server:jetty-7.x.y-SNAPSHOT
2014-08-20 19:44:35.952:INFO:osjsh.ContextHandler:started o.s.j.s.ServletContextHandler{/,null}
2014-08-20 19:44:35.960:INFO:osjs.AbstractConnector:Started SocketConnector@0.0.0.0:4444

Browser Console

403

Error Message from browser

Forbidden for Proxy
RequestURI=/grid/console

Powered by Jetty

Root cause analysis

To start selenium grid , you need selenium standalone jar. That has to be executed at the local machine ,or at the machine where you want to host your hub on.

For this, you need to make sure the command you are executing should be correct and complete. Recheck the above command I have added.

The command is not specifying any role,whether Selenium grid should treat this instance as Node or Hub.

Solution


F:\Selenium>java -jar selenium-server-standalone-2.41.0.jar <strong>-role hub</strong>
Aug 20, 2014 7:44:34 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a selenium grid server
2014-08-20 19:44:35.907:INFO:osjs.Server:jetty-7.x.y-SNAPSHOT
2014-08-20 19:44:35.952:INFO:osjsh.ContextHandler:started o.s.j.s.ServletContextHandler{/,null}
2014-08-20 19:44:35.960:INFO:osjs.AbstractConnector:Started SocketConnector@0.0.0.0:4444

Specifying the role as hub will solve this issue, you can make this instance as Node also for this you have to make sure that the -role parameter should get Node as role.

Advertisements

3 thoughts on “Selenium Grid : Forbidden for Proxy , HTTP ERROR: 403”

  1. Hi Khyati,

    One more major reason for this error is , some other application might me running on the same port . We can specify a different port using ‘-port’ option in the command.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s