users@glassfish.java.net

asadmin: --user and --passwordfile not working

From: <glassfish_at_javadesktop.org>
Date: Sun, 27 Sep 2009 17:53:44 PDT

Hello.

I'm writing an init.d script for my ubuntu server to run on boot that will start my glassfish domain, and I am trying to nail down the exact command to use. First, I have a password file (/home/alpha/glassfishv2/toilet/password.txt):

AS_ADMIN_PASSWORD=passwordInPlainText
AS_ADMIN_ADMINPASSWORD=passwordInPlainText
AS_ADMIN_USERPASSWORD=passwordInPlainText
AS_ADMIN_MASTERPASSWORD=passwordInPlainText

with a trailing newline. The file permissions are 0777. The command I'm trying to run is:

asadmin start-domain --domaindir /home/alpha/glassfishv2/ --user alpha --passwordfile /home/alpha/glassfishv2/toilet/password.txt toilet

But that prompts me for the admin user and password, with absolutely no indication of defaults, anything that is in the password.txt, or the user parameter passed in. Am I not providing that? Does the same when running as sudo. Do I need to reconfigure the domain or something? I want it to be totally hands off, requiring no user interaction to start. Running Ubuntu 9.04, with the latest glassfish (2.1) from the repos.
[Message sent by forum member 'abailey' (praetoralpha_at_gmail.com)]

http://forums.java.net/jive/thread.jspa?messageID=365982