Cant get Selenium Grid 1.0.8 working with Windows 7

76 views
Skip to first unread message

krishnam raju

unread,
Aug 29, 2011, 9:23:10 AM8/29/11
to Selenium Users
I cant get Selenium grid working. I am using 1.0.8 on Windows-7.

I can start grid and the selenium RC's and when the script (junit)
tries to access the grid, then I see the below exception and I am just
lost. However, the script runs successfully when I point to a stand
alone rc that is independent of Grid.


java.lang.RuntimeException: Could not start Selenium session: ERROR:
ERROR: Unknown environment '*firefox C:\Program Files (x86)\Mozilla
Firefox\firefox.exe'
at
com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:
90)
at
nl.fortes.selenium.tests.suites.DebugTestSuite_RV.setUpClass(DebugTestSuite_RV.java:
89)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
................
Caused by: com.thoughtworks.selenium.SeleniumException: ERROR: ERROR:
Unknown environment '*firefox C:\Program Files (x86)\Mozilla Firefox
\firefox.exe'
at
com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:
101)
at
com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:
95)
at
com.thoughtworks.selenium.HttpCommandProcessor.getString(HttpCommandProcessor.java:
266)
at
com.thoughtworks.selenium.HttpCommandProcessor.start(HttpCommandProcessor.java:
227)
at
com.unitedinternet.portal.selenium.utils.logging.FortesLoggingCommandProcessor.start(FortesLoggingCommandProcessor.java:
312)
at
com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:
82)
... 17 more

krishnam raju

unread,
Aug 29, 2011, 9:26:35 AM8/29/11
to Selenium Users
Starting of RC is done as below:

C:\Users\rajup\Downloads\selenium-grid-1.0.8>ant -Dport=5556 -
Denvironment="Firefox on Windows" -Dhost=172.16.29.92 -DseleniumArgs="-
multiWindow" -DhubURL=http://172.16.29.92:4444 launch-remote-contro
l
Buildfile: C:\Users\rajup\Downloads\selenium-grid-1.0.8\build.xml

launch-remote-control:
[java] 29 Aug, 2011 6:03:46 PM
com.thoughtworks.selenium.grid.remotecontrol.RegistrationRequest
execute
[java] INFO: Registering to http://172.16.29.92:4444/registration-manager/register

Error on the Grid console when the script is run:

[java] 29 Aug, 2011 5:30:42 PM
com.thoughtworks.selenium.grid.hub.HubServlet forward
[java] SEVERE: Failed to parse '1 => "*firefox C:\Program Files
(x86)\Mozilla Firefox\firefox.exe", 2 => "http://
tdc290.tdclighthouse.com", 3 => "", cmd => "getNewBrowserSession"' :
ERROR: Unknow

Luke Inman-Semerau

unread,
Aug 29, 2011, 6:35:37 PM8/29/11
to seleniu...@googlegroups.com
Any chance you'd be willing to upgrade to 2.5.0?  (Yes, you can run the grid with RC still... http://code.google.com/p/selenium/wiki/Grid2 )


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.


krishnam raju

unread,
Aug 30, 2011, 1:26:04 AM8/30/11
to Selenium Users
Hi Luke,

I tried with the selenium server 2.5.0 and see a new exception like
below now.. can you pls draw me out of this trouble?

java.lang.RuntimeException: Could not start Selenium session: org
%2Eopenqa%2Egrid%2Einternal%2EGridException%3A+Empty+pool+of+VM+for
+setup+%7BbrowserName%3D%2Afirefox%7D
at
com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:
90)
at
nl.fortes.selenium.tests.suites.DebugTestSuite_RV.setUpClass(DebugTestSuite_RV.java:
89)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod
$1.runReflectiveCall(FrameworkMethod.java:44)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:
15)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:
41)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:
27)
.......
Caused by: com.thoughtworks.selenium.SeleniumException: org%2Eopenqa
%2Egrid%2Einternal%2EGridException%3A+Empty+pool+of+VM+for+setup+
%7BbrowserName%3D%2Afirefox%7D
at
com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:
101)
at
com.thoughtworks.selenium.HttpCommandProcessor.getCommandResponseAsString(HttpCommandProcessor.java:
172)
at
com.thoughtworks.selenium.HttpCommandProcessor.executeCommandOnServlet(HttpCommandProcessor.java:
108)
at
com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:
90)
at
com.thoughtworks.selenium.HttpCommandProcessor.getString(HttpCommandProcessor.java:
266)
at
com.thoughtworks.selenium.HttpCommandProcessor.start(HttpCommandProcessor.java:
227)
at
com.unitedinternet.portal.selenium.utils.logging.FortesLoggingCommandProcessor.start(FortesLoggingCommandProcessor.java:
312)
at
com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:
82)
... 17 more



Krishnan Mahadevan

unread,
Aug 30, 2011, 1:41:21 AM8/30/11
to seleniu...@googlegroups.com
Please include the commands that you ran to spawn the Hub and WebDriver/RC nodes.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

krishnam raju

unread,
Aug 30, 2011, 3:23:12 AM8/30/11
to seleniu...@googlegroups.com
@BeforeClass
    public static void setUpClass() throws Exception {
       selenium = new FortesDefaultSelenium(
               SeleniumInitHelper.getServerName(),             
                SeleniumInitHelper.getServerPort(),
                SeleniumInitHelper.getBrowserMode(),
                SeleniumInitHelper.getBaseUrl(),
                SeleniumInitHelper.getResultBasePath(),
                SeleniumInitHelper.getScreenshotBasePath()
                );       
        selenium.start();

/**
     * Constructor
     * @param server the Server name or IP address of the machine where Selenium Server is running
     * @param port selenium server listening port
     * @param browserEngine which Browser enginge is to use for the test
     * @param baseURL URL of the tested application
     * @param resultpath the location of the result file
     * @param screenshotPath the location of the screenshots
     */
    public FortesDefaultSelenium(String server, int port, String browserEngine, String baseURL,
            String resultpath, String screenshotPath) {
        super(createFortesLoggingCommandProcessor(server, port, browserEngine, baseURL, resultpath, screenshotPath));
Thanks,
Krishnam Raju P
M: +91 99893 17171

Krishnan Mahadevan

unread,
Aug 30, 2011, 3:29:27 AM8/30/11
to seleniu...@googlegroups.com
I guess you got my question wrong.

I was asking if you were spawning the Grid2 hub and the remote controls as below :

This command will spawn the hub

java -jar selenium-server-standalone-2.5.0.jar -role hub

Run this command if you want to spawn a WebDriver Node [ If your code is working with either WebDriverBackedSelenium or RemoteWebDriver]

java -jar selenium-server-standalone-2.5.0.jar -role webdriver -hub http://localhost:4444/grid/register -port 5556 

Run this command if you want to spawn a Remote Control Node [ If your code is working with DefaultSelenium ]
java -jar selenium-server-standalone-2.5.0.jar -role remotecontrol  -hub http://localhost:4444/grid/register -port 5557 

After doing this, you might want to try and re-run your code again.

Hope that helps

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



krishnam raju

unread,
Aug 30, 2011, 3:45:16 AM8/30/11
to Selenium Users
yes, you are correct.

Br,
Krishnam

On Aug 30, 12:29 pm, Krishnan Mahadevan
<krishnan.mahadevan1...@gmail.com> wrote:
> I guess you got my question wrong.
>
> I was asking if you were spawning the Grid2 hub and the remote controls as
> below :
>
> This command will spawn the hub
>
> java -jar selenium-server-standalone-2.5.0.jar -role hub
>
> Run this command if you want to spawn a WebDriver Node [ If your code is
> working with either WebDriverBackedSelenium or RemoteWebDriver]
>
> java -jar selenium-server-standalone-2.5.0.jar -role webdriver -hubhttp://localhost:4444/grid/register-port 5556
>
> Run this command if you want to spawn a Remote Control Node [ If your code
> is working with DefaultSelenium ]
> java -jar selenium-server-standalone-2.5.0.jar -role remotecontrol  -hubhttp://localhost:4444/grid/register-port 5557

krishnam raju

unread,
Aug 30, 2011, 3:48:55 AM8/30/11
to Selenium Users
I have the below commands to start grid and rc and then started
executing the junit script normally from eclipse.

java -jar selenium-server-standalone-2.5.0.jar -role hub

java -jar selenium-server-standalone-2.5.0.jar -role remotecontrol -
hub
On Aug 30, 12:45 pm, krishnam raju <krishnamraju.capri...@gmail.com>
wrote:
> yes, you are correct.
>
> Br,
> Krishnam
>
> On Aug 30, 12:29 pm, Krishnan Mahadevan
>
>
>
>
>
>
>
> <krishnan.mahadevan1...@gmail.com> wrote:
> > I guess you got my question wrong.
>
> > I was asking if you were spawning the Grid2 hub and the remote controls as
> > below :
>
> > This command will spawn the hub
>
> > java -jarselenium-server-standalone-2.5.0.jar -role hub
>
> > Run this command if you want to spawn a WebDriver Node [ If your code is
> >workingwith either WebDriverBackedSelenium or RemoteWebDriver]
>
> > java -jarselenium-server-standalone-2.5.0.jar -role webdriver -hubhttp://localhost:4444/grid/register-port5556
>
> > Run this command if you want to spawn a Remote Control Node [ If your code
> > isworkingwith DefaultSelenium ]
> > java -jarselenium-server-standalone-2.5.0.jar -role remotecontrol  -hubhttp://localhost:4444/grid/register-port5557
>
> > After doing this, you might want to try and re-run your code again.
>
> > Hope that helps
>
> > Thanks & Regards
> > Krishnan Mahadevan
>
> > "All the desirable things in life are either illegal, expensive, fattening
> > or in love with someone else!"
>
> > On Tue, Aug 30, 2011 at 12:53 PM, krishnam raju <
>
> > krishnamraju.capri...@gmail.com> wrote:
> > > @BeforeClass
> > >     public static void setUpClass() throws Exception {
> > >        selenium= new FortesDefaultSelenium(
> > >                SeleniumInitHelper.getServerName(),
> > >                 SeleniumInitHelper.getServerPort(),
> > >                 SeleniumInitHelper.getBrowserMode(),
> > >                 SeleniumInitHelper.getBaseUrl(),
> > >                 SeleniumInitHelper.getResultBasePath(),
> > >                 SeleniumInitHelper.getScreenshotBasePath()
> > >                 );
> > >        selenium.start();
>
> > > /**
> > >      * Constructor
> > >      * @param server the Server name or IP address of the machine where
> > >SeleniumServer is running
> > >      * @param portseleniumserver listening port
> > >      * @param browserEngine which Browser enginge is to use for the test
> > >      * @param baseURL URL of the tested application
> > >      * @param resultpath the location of the result file
> > >      * @param screenshotPath the location of the screenshots
> > >      */
> > >     public FortesDefaultSelenium(String server, int port, String
> > > browserEngine, String baseURL,
> > >             String resultpath, String screenshotPath) {
> > >         super(createFortesLoggingCommandProcessor(server, port,
> > > browserEngine, baseURL, resultpath, screenshotPath));
> > >     }
>
> > > On Tue, Aug 30, 2011 at 11:11 AM, Krishnan Mahadevan <
> > > krishnan.mahadevan1...@gmail.com> wrote:
>
> > >> Please include the commands that you ran to spawn the Hub and WebDriver/RC
> > >> nodes.
>
> > >> Thanks & Regards
> > >> Krishnan Mahadevan
>
> > >> "All the desirable things in life are either illegal, expensive, fattening
> > >> or in love with someone else!"
>
> > >> On Tue, Aug 30, 2011 at 10:56 AM, krishnam raju <
> > >> krishnamraju.capri...@gmail.com> wrote:
>
> > >>> Hi Luke,
>
> > >>> I tried with theseleniumserver 2.5.0 and see a new exception like
> > >>> below now.. can you pls draw me out of this trouble?
>
> > >>> java.lang.RuntimeException: Could not startSeleniumsession: org
> > >>> > > Error on theGridconsole when the script is run:
>
> > >>> > >     [java] 29 Aug, 2011 5:30:42 PM
> > >>> > > com.thoughtworks.selenium.grid.hub.HubServlet forward
> > >>> > >     [java] SEVERE: Failed to parse '1 => "*firefox C:\Program Files
> > >>> > > (x86)\Mozilla Firefox\firefox.exe", 2 => "http://
> > >>> > > tdc290.tdclighthouse.com", 3 => "", cmd => "getNewBrowserSession"' :
> > >>> > > ERROR: Unknow
> > >>> > > n environment '*firefox C:\Program Files (x86)\Mozilla Firefox
> > >>> > > \firefox.exe'
>
> > >>> > > --
> > >>> > > You received this message because you are subscribed to the Google
> > >>> Groups
> > >>> > > "SeleniumUsers" group.
> > >>> > > To post to this group, send email toseleni...@googlegroups.com
> > >>> .
> > >>> > > To unsubscribe from this group, send email to
> > >>> > >selenium-user...@googlegroups.com.
> > >>> > > For more options, visit this group at
> > >>> > >http://groups.google.com/group/selenium-users?hl=en.
>
> > >>> --
> > >>> You received this message because you are subscribed to the Google Groups
> > >>> "SeleniumUsers" group.
> > >>> To post to this group, send email toseleni...@googlegroups.com.
> > >>> To unsubscribe from this group, send email to
> > >>>selenium-user...@googlegroups.com.
> > >>> For more options, visit this group at
> > >>>http://groups.google.com/group/selenium-users?hl=en.
>
> > >>  --
> > >> You received this message because you are subscribed to the Google Groups
> > >> "SeleniumUsers" group.
> > >> To post to this group, send email toseleni...@googlegroups.com.
> > >> To unsubscribe from this group, send email to
> > >>selenium-user...@googlegroups.com.
> > >> For more options, visit this group at
> > >>http://groups.google.com/group/selenium-users?hl=en.
>
> > > --
> > > Thanks,
> > > Krishnam Raju P
> > > M: +91 99893 17171
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "SeleniumUsers" group.
> > > To post to this group, send email toseleni...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages