Thursday 6 September 2007

startserv doesn't

you've downloaded the latest version. want to start it? don't want to use asadmin? (find out why in a later post)

try the "startserv" command.

pity it doesn't work.

it has the -Dcom.sun.aas.promptForIdentity=true flag set, which means that is should prompt you for its login password. But it will only do that if you're redirecting from a file anyway.

So here is startserv in all its glory:

$ domains/itscrap/bin/startserv


erm thats it - it waits for ever!

Now lets try 'unattended mode'

$ cat /tmp/shit | domains/itscrap/bin/startserv
Redirecting output to /someplace/logs/server.log
Enter Admin User:
Enter Admin Password:
Enter Master Password:
Enter Other Password Information (or ctrl-D or ctrl-Z):
$

Great- prompt when not needed!

Lets take a look at ProcessLauncher.java (line 369)

// See is there is input that needs to be sent to the process
if (System.getProperty(PROPMPT_FOR_IDENTITY_SYSTEM_PROPERTY) != null && action.equals(LAUNCHER_START_ACTION)) {
sendInputToProcessInput(System.in, process);
}


Brilliant! - so even if we set PROPMPT_FOR_IDENTITY_SYSTEM_PROPERTY (sic) to false it still will so the wrong thing.

2 comments:

Mark Basler said...

The startserv and stopserv scripts have ceased to be a means to control the app server since version 8.

They aren't supposed to work.

somepoorsod said...

i'm completely speechless.

do you want to rethink your comment now you are less drunk?