You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Ives Laaf <iv...@smarthouse.de> on 2012/06/01 17:57:47 UTC
[deamon] windows: passing normal cmd line arguments to service
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.
Somehow it may work with -D options but I tried like:
-Drole=hub
-DseleniumArgs="role=hub"
Nothing seems to work - any hints? I really looked around on a lot of places but until now I didn't get it up and running, most probably its really easy and therefore no one thought it should be documented seperatly.
Thanks in advance.
With Kind Regards,
Ives
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
RE: [deamon] windows: passing normal cmd line arguments to service
Posted by Ives Laaf <iv...@smarthouse.de>.
From: Ives Laaf [mailto:ives.laaf@smarthouse.de]
>From: Konstantin Kolinko [mailto:knst.kolinko@gmail.com]
>
>> 2012/6/1 Ives Laaf <iv...@smarthouse.de>:
>>> 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
-role
hub
hmm looks like I only one works for now - which is quite nice so far. Like usually should have started with just one cmd line parameter, anyhow
pointing to the place helped a lot as I could try on the right place ;).
Thanks a lot.
With Kind Regards
Ives
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
RE: [deamon] windows: passing normal cmd line arguments to service
Posted by Ives Laaf <iv...@smarthouse.de>.
From: Konstantin Kolinko [mailto:knst.kolinko@gmail.com]
> 2012/6/1 Ives Laaf <iv...@smarthouse.de>:
>> 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: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: [deamon] windows: passing normal cmd line arguments to service
Posted by Konstantin Kolinko <kn...@gmail.com>.
2012/6/1 Ives Laaf <iv...@smarthouse.de>:
> 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
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org