From: Konstantin Kolinko [mailto:[email protected]]
> 2012/6/1 Ives Laaf <[email protected]>: >> Hi there, >> >> I'm not so firm with jvm and parameter passing, so I wonder how I transform >> the following java call into settings für deamon setup/runner so that the >> java application gets the parameters and can parse them: >> >> java -jar selenium-server-standalone-2.21.0.jar -role hub -hub >> http://localhost:4444/grid/register >> >> So I have actually no idea how to pass those -role and -hub cmd line >> parameters to the jvm or deamon settings, to get them to the service. >> Actually I have the service running but only with its defaults what is now >> the assumed outcome. > > See "StartParams" > http://commons.apache.org/daemon/procrun.html Looks as I experimented with this already but did it again and I see the following log output, so it does something like intended but does not work fully yet. I tried it in two versions, one to give each one as a separate argument, see first log output and second in one line as on the normal cmd line. So looks like they may get passed on but unfortunaltly they seem to be ignored. I can easily confirm this while calling the service on port 4444 and if it gets the parameters it runs in a different mode and serves different urls while in the startup without additional parameters. So service is up and running but ignores cmd line arguments - and I've no idea why :/. If I start it on the cmd line directly like posted in the beginning - it just works :/ with the service not. Debug output from the deamon looks like this - so this looks not bad - but does not do what I expect, I tried a view variations like: -role hub -hub http://localhost:4444/grid/register -role hub -hub http://localhost:4444/grid/register role=hub hub=http://localhost:4444/grid/register [2012-06-01 18:46:08] [info] ( prunsrv.c:1089) Starting service... [2012-06-01 18:46:08] [debug] ( javajni.c:206 ) loading jvm 'C:\Program Files\Java\jre7\bin\server\jvm.dll' [2012-06-01 18:46:08] [debug] ( javajni.c:660 ) Jvm Option[0] -Djava.class.path=d:\seleniumgrid\selenium-server-standalone-2.21.0.jar [2012-06-01 18:46:08] [debug] ( javajni.c:844 ) argv[0] = -role [2012-06-01 18:46:08] [debug] ( javajni.c:844 ) argv[1] = hub [2012-06-01 18:46:08] [debug] ( javajni.c:844 ) argv[2] = -hub [2012-06-01 18:46:08] [debug] ( javajni.c:844 ) argv[3] = http://localhost:4444/grid/register [2012-06-01 18:46:08] [debug] ( javajni.c:897 ) Java Worker thread started org/openqa/grid/selenium/GridLauncher:main [2012-06-01 18:46:09] [debug] ( javajni.c:914 ) Java Worker thread finished org/openqa/grid/selenium/GridLauncher:main with status=0 [2012-06-01 18:46:09] [debug] ( prunsrv.c:1148) Java started org/openqa/grid/selenium/GridLauncher [2012-06-01 18:46:09] [info] ( prunsrv.c:1244) Service started in 1341 ms. [2012-06-01 18:46:09] [debug] ( prunsrv.c:1496) Waiting for worker to finish... [2012-06-01 18:46:09] [debug] ( prunsrv.c:1501) Worker finished. [2012-06-01 18:46:09] [debug] ( prunsrv.c:1524) Waiting for all threads to exit ---------------------------- [2012-06-01 18:59:06] [debug] ( prunsrv.c:1644) Commons Daemon procrun log initialized [2012-06-01 18:59:06] [info] ( prunsrv.c:1648) Commons Daemon procrun (1.0.10.0 64-bit) started [2012-06-01 18:59:06] [info] ( prunsrv.c:1561) Running 'SGRID1' Service... [2012-06-01 18:59:07] [debug] ( prunsrv.c:1345) Inside ServiceMain... [2012-06-01 18:59:07] [info] ( prunsrv.c:1089) Starting service... [2012-06-01 18:59:07] [debug] ( javajni.c:206 ) loading jvm 'C:\Program Files\Java\jre7\bin\server\jvm.dll' [2012-06-01 18:59:07] [debug] ( javajni.c:660 ) Jvm Option[0] -Djava.class.path=d:\seleniumgrid\selenium-server-standalone-2.21.0.jar [2012-06-01 18:59:07] [debug] ( javajni.c:844 ) argv[0] = -role hub [2012-06-01 18:59:07] [debug] ( javajni.c:844 ) argv[1] = -hub http://localhost:4444/grid/register [2012-06-01 18:59:07] [debug] ( javajni.c:897 ) Java Worker thread started org/openqa/grid/selenium/GridLauncher:main [2012-06-01 18:59:08] [debug] ( prunsrv.c:1148) Java started org/openqa/grid/selenium/GridLauncher [2012-06-01 18:59:08] [info] ( prunsrv.c:1244) Service started in 1410 ms. [2012-06-01 18:59:08] [debug] ( prunsrv.c:1496) Waiting for worker to finish... [2012-06-01 18:59:08] [debug] ( javajni.c:914 ) Java Worker thread finished org/openqa/grid/selenium/GridLauncher:main with status=0 [2012-06-01 18:59:08] [debug] ( prunsrv.c:1501) Worker finished. [2012-06-01 18:59:08] [debug] ( prunsrv.c:1524) Waiting for all threads to exit Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
