The upgrade guide : http://wikihome.sfbay.sun.com/swrm/Wiki.jsp?page=R5UpgradeGuide R5 upgrade guide : - For JES, there is installer. - Appserver also can be seapartely obtained and installed. - The upgrade guide, install guide, admin guide's exist. - installed JES4 in v210c : - HADB is installed in /opt/SUNWhadb; 8.2 EE install guide (not yet available) http://docs.sun.com/doc/819-4891 Need to understand exact steps involved in install/upgrade; .... Java ES 2005Q1 (Release 3) Java ES 2005Q4 (Release 4). Java ES 2006Q4 (Release 5). JES4 install summary: Java Enterprise System : Installed Sun Java(TM) System Web Server 6.1 SP5 2005Q4 : Installed, Configured Sun Java(TM) System Message Queue 3 2005Q4 Enterprise Edition : Installed Sun Java(TM) System Application Server Enterprise Edition 8.1 2005Q4 : Installed Sun Java(TM) System Directory Preparation Tool : Installed Sun Java(TM) System Directory Server 5 2005Q4 : Installed Sun Java(TM) System Administration Server 5 2005Q4 : Installed High Availability Session Store (HADB) : Installed ----------- Q1: The install summary should specify HADB version number. ----------- I upgraded the install to JES5, selected only appserver related components: Install Summary Java Enterprise System 2006Q4 : Installed Sun Java(TM) System High Availability Session Store 4.4 2006Q4 : Installed Sun Java System Message Queue 3.7 UR1 : Installed Sun Java(TM) System Application Server Enterprise Edition 8.2 2006Q4 : Installed All Shared Components : Installed, Configure After Install -------------------------------------------------------------------------- * As of now, HADB is used only for session replication for Appserver. If Appserver does not enable HA, then don't bother with HADB. * Understand prior upgrade guides: * Understand about online upgrade and where it is documented. Understanding JESR4 upgrade guide : ------------------------------------ JES4 Release notes: http://docs.sun.com/doc/819-2329 There is an Application Server Upgrade Guide: - asupgrade (gui/cmdline) utility upgrades the configuration and deployed applications of a previous version of the Application Server $ asupgrade --adminuser admin --passwordfile password.txt --source /home/sunas7 --target /home/sjsas8.1 Note: You will be prompted to migrate certificates. Example 2: Upgrading an Application Server 7.1 EE to 8.1EE with cluster & NSS certificates. asupgrade --adminuser admin --passwordfile password.txt -source /home/sjsas7.1 --target /home/sjsas8.1 --domain domain1 --nsspwdfile /home/sjsas7.1/nsspassword.txt --targetnsspwdfile /home/sjsas8.1/nsspassword.txt --clinstancefile /home/sjsas7.1/config/clinstance.conf - If asupgrade fails, asmigrate command should be run and then applications must be deployed again manually! ===================================================================== From Appserver 8.1 HA Admin Guide .... - Application Server, Enterprise Edition 8.1 supports load balancing and HTTP session persistence. HTTP Session Failover in Sun Java System Application Server Enterprise Edition 8.1 2005Q2 High Availability Administration Guide. -http://docs.sun.com/app/docs/doc/819-2555/6n4r9qoa0?a=view # Enable failover and load balancing, this involves: Edit sun-web.xml : persistence-store - This can take the values memory, file, or ha. (earlier only memory was supported) persistence-scope - define the scope of persistence. session - For every session, the session information will be saved. modified-session - Only the modified session data will be stored. modified-attribute - Only the modified attribute data will be stored. ?? persistenceFrequency - The frequecy can be for every web method or time based. In 6.5, only web-method was supported. web-method - The session state is stored at the end of each web request prior to sending response. High availability. high perf impact time-based - periodical. less perf impact. A sample of the sun-web.xml file is given below: For more information about the load balancer: see Chapter 4, Configuring Load Balancing and Failover, in Appserver 8.1 EE HA Admin guide: http://docs.sun.com/app/docs/doc/819-2555/6n4r9qo8c?a=view # In the load-balancer.xml file, make sure that the web-module enabled element is set to true. ... enabled=true specifies that the web module is active (enabled) for requests to be load balanced to it. # Define the https-routing property and set its value to true. You can enable session availability at five different scopes : 1. Server instance, enabled by default. 2. Container (web or EJB), enabled by default. 3. Application, disabled by default 4. Stand-alone web or EJB module, disabled by default 5. Individual Stateful session bean(EJB), disabled by default To have HA all levels above also should have HA configured. - Configure cluster for Ha: 1. Create Appserver Cluster 2. asadmin configure-ha-cluster --user admin --hosts hadb_host1,hadb_host2 --devicesize 256 appserver_clusterName 3. configure application for HA : do it from admin console. set HA enable,save 4. Restart cluster: asadmin stop-cluster --user admin clustername; asadmin start-cluster --user admin cluster-name; 5. Restart webserver: web_server_root/https-hostname/reconfig 6. To Clean Up theWeb Server Instance Acting as Load Balancer Delete the Load Balancer configuration: asadmin delete-http-lb-ref --user admin --config MyLbConfig FirstCluster asadmin delete-http-lb-config --user admin MyLbConfig If you created a newWeb Server instance you can delete it by: a. Log on to theWeb Server's Administration Console. ??? how??? b. Stop the instance. Delete the instance. See the following exmaple applications: install_dir/samples/ee-samples/highavailability install_dir/samples/ee-samples/failover Install experiments : - Installed /home/thava/pub/sjsas_ee-8_2-fcs-bin-b08-solaris-sparc-dbg-20_jan_2006.bin* - It is sparc binary which invokes graphical installer. It is not pkg based install. just asks for install dir and installs it there. - For example, installing it on /home/thava/pub/labarchive/install/appsrv82 - Asks for choose webserver to install load balancing plugin: Either SunONE WebServer 6.0SP6 or above (which I don't have) or For Apache webserver 1.3.27, the local install needs root perm, otherwise you will have to download and compile with special options... Note: JES4/JES5 installer needs you to be root. - Went to google.com, and searched for downloading sun webserver, all things pointed to JES suite only. so I went to Web Infrastructure Suite and when I attempted download, there was indeed a separate zip file for sun one webserver !!! along with other separate zip files for appsrv etc. Downloaded sjsws-7.0_2006Q1-b47-solaris-sparc.tar.gz; It is also available from internal site: http://javaweb.sfbay/java/re/sjws/7.0/ - Installed webserver7 in /home/thava/pub/labarchive/install/webserver7 https://s4u-v210d-blr03:8989 has webadmin server. - Then completed appserver installation using standalone appserver installer with loadbalancer plugin. admin console at port 4849 - If I directly download JES from external website, 2 CD iso imgs are available, also, the .zip image (for non-root users) of CD is also available. however installing would require root privileges. - Note: JES5 installs webserver7 in /opt/SUNWwbsvr7 if vers6 already exists. - JES5 installer suggests to perform postinstallation config and verifn tasks as documented in "JES Installation Guide" http://docs.sun.com/doc/819-4891 Instead look at JES4 install guide: http://docs.sun.com/app/docs/doc/819-2328 There is also JES4 installtion Reference (?!) : http://docs.sun.com/app/docs/doc/819-3765/ - From Install guide: - Application Server default Admin server instance is "server" - Standalone EE install has $APPSRV_TOP/config/asenv.conf : AS_HADB="/home/thava/pub/labarchive/install/appsrv82/hadb/4.5.0-2" AS_DERBY_INSTALL="/home/thava/pub/labarchive/install/appsrv82/derby" AS_DEF_DOMAINS_PATH="/home/thava/pub/labarchive/install/appsrv82/domains" - In JES5 install in v210c machine: AS_DEF_DOMAINS_PATH="/var/opt/SUNWappserver/domains" AS_HADB="/opt/SUNWhadb/4" - on s4u-v210d-blr03.india : /home/thava/pub/labarchive/install/appsrv82/bin @s4u-v210d-blr03 $./asadmin start-domain --user admin Starting Domain domain1, please wait. Log redirected to /home/thava/pub/labarchive/install/appsrv82/domains/domain1/logs/server.log. Please enter the master password> /home/thava/pub/labarchive/install/appsrv82/domains/domain1/logs/server.log contains following: java -Djava.security.policy=domain1/config/server.policy -Djava.security.auth.login.config=domain1/config/login.conf -Djdbc.drivers=org.apache.derby.jdbc.ClientDriver -cp -Ddomain.name=domain1 -Dcom.sun.aas.configName=server-config -Dcom.sun.aas.instanceRoot=.../domains/domain1 -Dcom.sun.aas.instanceName=server javax.enterprise.system.container.web "Created virtual server server" javax.enterprise.system.container.web "Created virtual server __asadmin" javax.enterprise.system.tools.deployment "[AutoDeploy] Selecting file .../appsrv82/lib/install/applications/MEjbApp.ear for autodeployment" javax.enterprise.system.container.ejb Instantiated container for: ejbName: MEJBBean; javax.enterprise.system.core.classloading All ejb(s) of [MEjbApp] loaded successfully! javax.enterprise.system.container.web Loading web module [__default-admingui] in virtual server [__asadmin] at [/] (using built-in source war file ???) Loading web module [adminapp] in virtual server [__asadmin] at [/web1]|#] javax.enterprise.system.container.web Loading web module [admingui] in virtual server [__asadmin] at [/asadmin] javax.enterprise.system.container.web Loading web module [com_sun_web_ui] in virtual server [__asadmin] at [/com_sun_web_ui] org.apache.catalina.core.StandardEngine: Starting Servlet Engine: Sun-Java-System/Application-Server javax.enterprise.system.container.web [LS http-listener-1] http://s4u-v210d-blr03:8080 ready to accept requests [LS http-listener-2] https://s4u-v210d-blr03:8181 ready to accept requests [LS admin-listener-2] https://s4u-v210d-blr03:4849 ready to accept requests javax.enterprise.system.tools.admin Here is the JMXServiceURL for the Standard JMXConnectorServer: [service:jmx:rmi:///jndi/rmi://s4u-v210d-blr03:8686/jmxrmi]. This is where the remote administrative clients should connect using the standard JMX connectors|#] javax.enterprise.resource.jms JMS service successfully started. Instance Name = imqbroker, Home = [/home/thava/.../appsrv82/imq/bin]. com.sun.mfwk.Discovery Loading Public Key com.sun.mfwk.Mfwk MfConfig : url: jar:file: /opt/SUNWmfwk/lib/mfwk_instrum_tk.jar!/com/sun/mfwk/config/MfConfig.class Cannot load file //etc/opt/SUNWmfwk/config/security/password.cp. Use defaults. com.sun.mfwk.Mfwk MfCrypto Load Public Key (Have you done mfwksetup -i ?) /etc/opt/SUNWmfwk/config/security/jsse/truststore (No such file or directory) com.sun.mfwk.Discovery Could not load discovery public key! javax.enterprise.system.core Application server startup complete. Connect to admin console using https://localhost:4849, site certificate is presented to be accepted to user: Issued to: s4u-v210d-blr03 Serial Number: 5-bytes-number SHA1 FingerPrint: 20-bytes-number MD5 FingerPrint: 16-bytes-number Starting and Stopping Webserver: When you install Web Server: - Administration Server instance and a Web Server instance are started. - $ cd WebServer-base/https-admserv $ ./start ; /* Starts webserver admin process */ - $ cd WebServer-base/https-hostname.domainname $ ./start ; /* Starts webserver instance. */ Admin server startup msgs: Sun Java System Web Server 7.0 B06/29/2006 16:20 Loading web module in virtual server [admin-server] at [/admingui] Loading web module in virtual server [admin-server] at [/jmxconnector] admin-ssl-port: https://s4u-v210d-blr03:8989 ready to accept requests admin-http-port: http://s4u-v210d-blr03:8800 ready to accept requests Webserver startup msg: Sun Java System Web Server 7.0 B06/29/2006 16:20 config: trying to GET /, name-trans-passthrough reports: init-passthrough has not been called config: trying to GET /WEB-INF/web.xml, name-trans-passthrough reports: init-passthrough has not been called catastrophe: LBConfigurator.cpp@87: reports: lb.configurator: CNFG1014 : Error occured while initializing Loadbalancer config Parser. Please check the config file: /home/thava/pub/labarchive/install/webserver7/https-s4u-v210d-blr03/config/loadbalancer.xml failure: lbplugin.cpp@225: reports: lb.runtime: RNTM3005 : Failed to initialise load balancing subsystem info: HTTP3072: http-listener-1: http://s4u-v210d-blr03:8080 ready to accept requests info: CORE3274: successful server startup PostInstallation HADB Config: Install guide points to HA Admin Guide (!) *. Create app server cluster using GUI. No nodes are created yet. (same as asadmin create-cluster) * Create node agent place holder using GUI -- nodeagents menu or directly execute next step, this will be auto created. (same as using asadmin create-node-agent-config) * Then create node agent: Go to node agent machine and run: $ asadmin create-node-agent --host myhost --port 4849 ---user admin nodeagent1 In the above used hostname s4u-v210d-blr03 for myhost and nodeagent1. I can create another node-agent on the same host, if I wish so. (note: above step also creates node agent place holder in DAS if that is up) * Then start node agent: asadmin start-node-agent --user admin nodeagent1 (to stop: asadmin stop-node-agent nodeagent1) Note: Single Node Agent can serve multiple clusters. i.e. manages multiple server instances each belonging to possibly different clusters. The nodeagent serves to one domain only! One DAS can manage multiple domains each containing multiple clusters. * Now click on Clusters -> instances; Create new server instance in "thava-cluster" cluster with server name "tinstance1" (same as asadmin create-instance) Here is the config info: ClusterName Node-Agent Server-Instance thava-cluster tnodeagent1 tinstance1 ,, tnodeagent2 tinstance2 Question: A node agent can manage multiple server instances serving to different clusters. But Can single node agent manage 2 server instances which are both serving to the same cluster ? Answer: Yes. You will specify non-conflicting http/https ports to create them. Note: You can create and deploy node agents online/offline. If offline, the steps are: 1. create node agent config at DAS; 2. create server instance at DAS; 3. Later create-node-agent in node; 4. start-node-agent in node; Syncs with DAS and starts server instance. 2. Then run following cmd to use hadb for that cluster after starting hadb: export AS_ADMIN_USER=admin asadmin configure-ha-cluster --user admin --port 4849 --hosts s4u-v210d-blr03,s4u-v210d-blr03 --devicesize 256 --packagepath /home/thava/hadb/src/clustra/install/solaris2.10-SUN57_CC-SUN_C --haagentport 1872 thavac /* thavac is the cluster name */ /* add --property portbase=port_num if you need different portbase */ /* --H `hostname` specifies DAS host. by default, it is localhost */ /* yet better, use: --packagepath /home/thava/pub/labarchive/install/appsrv82/hadb/4.5.0-2 */ server.log indicates: HADBM Command: .../appsrv82/hadb/4.5.0-2/bin/hadbm create --portbase=15200 --devicesize=256 --adminpasswordfile=.../domain1/config/adminpassword --dbpasswordfile=.../domains/domain1/config/dbpassword --hosts=10.12.162.135,10.12.162.135 --agent=10.12.162.135,10.12.162.135:1872 --packagepath=.../install/solaris2.10-SUN57_CC-SUN_C/bin thavac HADBM Command: hadbm get jdbcURL thavac Note: Appserver creates a database of the same name as cluster. HADBM Command: java -cp lib/appserv-se.jar:hadb/4.5.0-2/lib/hadbjdbc4.jar com.sun.enterprise.ee.admin.hadbmgmt.HADBSessionStoreUtil create admin .../domain1/config/schemadbpassword system .../domain1/config/schemasystempassword javax.enterprise.system.tools.verifier setting attribute: sfsb-store-pool-name to: jdbc/thavac-hastore setting attribute: sfsb-persistence-type to: ha setting attribute: sfsb-checkpoint-enabled to: true setting attribute: http-session-store-pool-name to: jdbc/thavac-hastore To restart cluster: // The start-cluster basically starts the "lib/appserv" instances in cluster. asadmin stop-cluster --user admin cluster-name asadmin start-cluster --user admin cluster-name To deploy: asadmin deploy --user admin --passwordfile filename --target cluster1 Cart.ear Create Load balancer config: asadmin create-http-lb-config -user admin [--passwordfile file] -p 4849 --target thavac thavalbconfig Create load balancer ref: ./asadmin create-http-lb-ref --user admin --config thavalbconfig thavac See also: asadmin list-http-lb-configs ; delete-http-lb-ref Enable cluster, applications for loadbalancing : ./asadmin enable-http-lb-server thavac ./asadmin enable-http-lb-application --name SessionStorage thavac ./asadmin enable-http-lb-application --name sfsbFailover thavac Create healthchecker: ./asadmin create-http-health-checker --user admin --config thavalbconfig thavac Export config: ./asadmin export-http-lb-config --user admin --config thavalbconfig loadbalancer.xml Copy this file to webserver/https-/config directory $ cp loadbalancer.xml .../webserver7/https-s4u-v210d-blr03/config Now edit config/magnus.conf file to delete the initial Init fn="load-modules" and leave the last line Init fn="load-modules" ... libj2eeplugin.so on. Basically, the load balancer plugin "libpassthrough.so" in webserver7/plugins/ lbplugin/bin/ directory should be loaded before libj2eeplugin.so; This shared obj has been copied as part of JES appserver install into this. Now restart webserver: cd /home/thava/pub/labarchive/install/webserver7/https-s4u-v210d-blr03/bin ./reconfig; ./restart Gives following msg: Sun Java System Web Server 7.0 B06/29/2006 16:20 warning: Daemon http://s4u-v210d-blr03:38080 has been intialized. warning: Daemon https://s4u-v210d-blr03:38181 has been intialized. warning: Daemon http://s4u-v210d-blr03:38081 has been intialized. warning: Daemon https://s4u-v210d-blr03:38182 has been intialized. http-listener-1: http://s4u-v210d-blr03:7080 ready to accept requests To turn on load balancer logging : With Sun Java System Web Server In the server?s admin console, go to the Magnus Editor tab and set the Log Verbose option to On. $ cd /home/thava/pub/labarchive/install/webserver7/admin-server/bin $ ./startserv admin-ssl-port: https://s4u-v210d-blr03:8989 ready to accept requests admin-http-port: http://s4u-v210d-blr03:8800 ready to accept requests Note: Applications are available at node agents ports only!! See: http://s4u-v210d-blr03:38080/clusterjsp/ From nodeagents server.log : appsrv82/nodeagents/s4u-v210d-blr03/thavac-v210d/logs/server.log: javax.enterprise.system.container.web [LS http-listener-1] http://s4u-v210d-blr03:38080 ready to accept requests javax.enterprise.system.container.web [LS http-listener-2] https://s4u-v210d-blr03:38181 ready to accept requests javax.enterprise.system.tools.admin Here is the JMXServiceURL for the Standard JMXConnectorServer: [service:jmx:rmi:///jndi/rmi://s4u-v210d-blr03:38686/jmxrmi]. This is where the remote administrative clients should connect. Notes on Ports ============== - The appserver by default comes with domain1 with admin server at port 4849. domain2 will have separate admin server at another port! - domain.xml in domains/domain1/config/ dir contains all port info of domain. - By default appserver comes with a standalone instance called "server", this uses the predefined configuration called "server-config". This typically uses ports 8080, 8181, 4949. The server at 8080 just displays docroot/index.html - When you create a cluster like mycluster, it internally creates config like mycluster-config which is inherited from default-config. This uses port 38080, etc. The cluster is a passive definition and there is no active server associated with it until an instance is created in this cluster. The first instance in the cluster uses all the ports as defined in the mycluster-config. The next instance in the cluster automatically increments the ports in the associated config, like 38081, etc. - These are the default ports for instances : HTTP_LISTENER_PORT 38080 ; http for applications HTTP_SSL_LISTENER_PORT 38181 ; https for secure applications IIOP_SSL_LISTENER_PORT 33820 ; EJB clients use this port: secure IIOP_LISTENER_PORT 33700 ; EJB Cleitns use this port. IIOP_SSL_MUTUALAUTH_PORT 33920 ; IIOP listener for mutual auth JMX_SYSTEM_CONNECTOR_PORT 38686 ; For JMX Connector listen port - The http listeners are associated with "vritual servers". The predefined servers are "server" (for applications http ports 8080, 8081) and "__asadmin" (for admin server port 4849). - When you create cluster, no new "virtual servers" are created. The clusters make use of the predefined virtual server "server". - Clusters and stand alone instances have "resources" (like jdbc for hadb) associated with it. However, the instances in the cluster inherit, the cluster's resources only -- it does not have it's own resources associated. Why cluster ? * All instances in the cluster reference the same configuration. * All instances in the cluster have the same set of deployed applications. * All instances in the cluster have the same set of resources, resulting in the same JNDI namespace. e.g. JDBC resource jdbc/thavac-hastore. * easier to manage and scale Cluster Definition = Cluster_config(i.e. ports info)+applications_info+ instances_info+set_of_resources_info; Note: The hostname:8080 is served by "appserv" process itself. Not webserver load balancer plugin. Note: The appserv processes are in lib dir: appserv, appservDAS, appservAgent, appservLauncher - In v210c machine, start-domain failed with error no nspr4 in java.library.path; I had to edit asenv.conf file with AS_NSS=/usr/lib/mps