users@glassfish.java.net

Re: Problem with GlassFish windows service

From: Ryan de Laplante <ryan_at_ijws.com>
Date: Wed, 05 Sep 2007 23:46:07 -0400

I sent my last email too soon.. my keyboard decided that every key
mapped to something else and as I typed it sent the email!! :(



I am using the following tool, which uses source from Sun's installer to
build the command line String. It makes using paths such as C:\Program
Files\Sun\GlassfishV2RC4\ easier.

http://www.ryandelaplante.com/rdelaplante/entry/creating_a_windows_service_for

I checked, the logon tab for the service does have "Local system
account", but the service still stops when I log out. Very strange.


I think there is something different about the cluster profile and
passwords. Here is a quote from someone on this mailing list on Aug 19
2007 regarding glassfish asking for a password:

> A cluster-aware domain would need admin user and password to be available to the admin server.


> If you did "--savelogin" on "asadmin create-domain" (which setup.xml's do),
> you should not be prompted for that domain's startup. If you create your own
> domain, you'll have to take care of it yourself. For the default domain, you should
> not be prompted for password as it is already available in ~/.asadminpass. The only
> caveat is that this file should contain entry corresponding to the admin port (generally 4848)
> of your domain.
>
> Encrypted/hashed entries in ~/.asadminpass -- this is not supported. The password is
> encoded and for general use case, it should be enough, IMO. If not, just provide the
> platform security for it on Windows. On Unix(es), it will have a permission of 600 as I mention
> before.
>
> Let me work even harder on explaining to you that the file that is taken as an argument to
> --passwordfile is completely different from the ~/.asadminpass. The argument to --passwordfile
> should generally contain passwords in clear text but it can get arbitrarily sophisticated. I will
> blog about it a little later.


When starting glassfish it looks for ~/.asadminpass. I'm wondering how
glassfish would find ~/.asadminpass when "Local system account" is used
to start the service. The .asadminpass file lives in my own user's home
directory.


Thanks,
Ryan




glassfish_at_javadesktop.org wrote:
> Assumption: "Logoff your system" means you logged out of Windows.
>
> How did you create the service? The logon tab for the service should have "Local System Account" selected.
>
> Why don't you try removing the service and start over with these instructions:
>
> to delete your service:
>
> sc delete the-service-name
>
> here is how I create a service:
>
> sc create service-name binPath= "C:\as\lib\appservService.exe \"C:\as\bin\asadmin.bat start-domain domain-name\" \"C:\as\bin\asadmin.bat stop-domain %2\"" start= auto DisplayName= service-name
>
> -- Note how I don't need a password file. I just do the steps below before creating the service and I never need to give the password again. (I use the developer version).
>
> 1) asadmin start-domain
> 2) asadmin login
> [Message sent by forum member 'bnevins' (bnevins)]
>
> http://forums.java.net/jive/thread.jspa?messageID=234142
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
>