users@glassfish.java.net

Re: Glassfish as a Windows service

From: Sathyan Catari <Sathyan.Catari_at_oracle.com>
Date: Thu, 09 Sep 2010 12:40:32 -0700

  Why don't you try the installer bundle(download *exe* installer) of
3.1 B16
and run the installer? You will be given a choice to create the service for
the domain and you do not have to go through these manual steps.

HTH
Sathyan

On 9/9/10 12:53 PM, glassfish_at_javadesktop.org wrote:
> Hi all,
>
> I am trying to set up Glassfish to run as a Windows service on a Windows 2003 server.
> I have done this for other Glassfish instances, but for this particular one it simply does not work.
>
> The service is (seemingly) created correctly and when I start the service all seems ok, only the service starts very quickly but no Glassfish gets started and nothing is written to the Glassfish logs.
>
> Note that I can start the domain bmo asadmin start-domain domain1.
>
> The event viewer says that service started successfully.
>
> I created the service as follows (ref http://wikis.sun.com/display/GlassFish/FaqRunAsWindowsService):
>
> java -jar GlassfishSvc.jar -i -n "eSak-Glassfish" -d "d:\Programs\glassfish" -m domain1
>
> (I ran the same command for another instance successfully.)
>
> and I tried this command - with and without the --user and --passwordfile parameters:
>
> C:\windows\system32\sc.exe create domain1 binPath= "D:\Programs\glassfish\lib\appservService.exe \"D:\Programs\glassfish\bin\asadmin.bat start-domain --user admin --passwordfile D:\Programs\glassfish\.asadminpass domain1\" \"D:\Programs\glassfish\bin\asadmin.bat stop-domain domain1\"" start= auto DisplayName= "Glassfish DOMAIN1"
>
> with the same negative result.
>
> The glassfish instance for which the service fails to start Glassfish has been set up by backing up a domain on a different server and restoring it to the current instance.
>
> On the other instances, Glassfish are installed to D:\glassfish whereas for the problemdomain Glassfish is installed to D:\programs\glassfish; hardly worth mentioning, I know.
>
> Any ideas as to what might be the problem and what I could do to resolve this would be greatly appreciated.
>
> Thanks and kind reagards,
> Bård Tørustad
> [Message sent by forum member 'torustad']
>
> http://forums.java.net/jive/thread.jspa?messageID=482218
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>