Start and Stop Scripts

A little known fact: there are scripts for starting and stopping the 3 different kinds of Glassfish servers. The three kinds of servers are:

  • Domain Administration Server (the only server available in a development profile)
  • Node Agent Server
  • Instance Server

These scripts have always been there but were never officially supported.  They were difficult to use.  E.g. you had to know to type in username, password and master password into the void at the command window for strtserv to work.  The scripts were used internally in pre-V2 versions.  They are not used at all in V2.  They are there for your use exclusively now.

Where Are These Scripts?

They are named: 

   Start Script
 Stop Script
 Windows  startserv.bat  stopserv.bat
 Not Windows
 startserv  stopserv

 

In my own personal default environment, they are here:

 Domain Administration Server
c:/as/domains/domain1/bin
Node Agent Server
c:/as/nodeagents/na/agent/bin
Instance Server
c:/as/nodeagents/na/i1/bin
 

How Do I Use Them?

To start a server run the appropriate startserv script.  It will ask you for the administrator's username, pssword and the master password.  If you don't know what a master password is -- just enter changeit.  This is not really needed for the Domain Administration Server in a developer profile, but the script does not yet have the smarts to know whether or not the server is secure.  A future release may fix this problem. 

To stop a server simply run the stopserv script.  No authentiction information is needed or asked for.

 Features

  •  The scripts are relocatable.  I.e., if you use asadmin backup-domain and asadmin restore-domain to clone a domain to a different location -- the scripts will still work.
  • Shutdown is very fast and efficient.
  • This is the only way you can start an instance with no running Domain Administration Server and no running Node Agent Server.
  • You can take over the lifecycle management of one or more Instance Servers.  If you start the Instance Server with the script then the Node Agent Server will not automatically stop it when the Node Agent Server is stopped.


Comments:

Good start. I am hoping these scripts are fixed now. And it will also help if you tell us what build fixes these.

I think it it still important to stress that these scripts should be used sparingly. They are not a replacement for asadmin commands.

Posted by Kedar on May 29, 2007 at 10:08 AM PDT #

Thanks a ton for working on these scripts. I was doing a VERY basic one for SuSE and my scripting ability isn't that good.

I am using a wrapper script that I will hopefully put in the rc file and then to use to automatically start the server and shut it down on reboot, but I ran in to a small issue. Is there anyway I can pass in the admin user and passwords? Or would it be better to just hack the existing script?

Thanks again.

Posted by Steve Michael on September 16, 2008 at 01:00 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

ByronNevins

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today