Monday, December 17, 2012

Common Error With Apache 2.4 on Windows 7 64 bit


Common Error With Apache 2.4

I was trying to install Apache Http Server 2.4 on Windows 7 64 bit and was receiving error while starting the Apache Server :

AH00558: httpd.exe: Could not reliably determine the server's fully qualified domain name, using XXXX::XXXX:XXXX:XXXX.
Set the 'ServerName' directive globally to suppress this message

Root Cause :

Apache Server is looking for the hostname name which it can use to start and listen for request. If there is a hostname configured on the machine and it is not configured in the httpd.conf file then it will throw this error .

Solution:

  • Get the hostname of the machine on which the Apache Server is installed using the OS command : hostname
  • Configure the same in the httpd.conf file with the directive : ServerName as shown below:
ServerName Sandeep
  • Restart the Apache Server.
In case you do not want to use the Machine Hostname with the Apache Server then make the ServerName Entry in the httpd.conf file as localhost.

WEBLOGIC COMMON


Managed Weblogic Server


Weblogic Managed Servers:

In this post I will be providing some basic idea about the Weblogic Domain and its component called Managed Weblogic Server.

What is Weblogic Domain?

domain is the basic administration unit for WebLogic Server instances. A domain consists of one or more WebLogic Server instances (and their associated resources such as JDBC resource or JMS resource) that can be managed with a single Administration Server.
A minimal domain can contain only one WebLogic Server instance, which functions both as an Administration Server, and as a Managed server. This instance is called as Weblogic Administration Server or Weblogic Admin Sever.
As it is the only instance present in domain so this Weblogic Admin Server can also be used as Managed Weblogic Server.
Below figure Fig.1 , shows a minimal Weblogic domain containing only one Admin Server.
Fig.1 Weblogic domain with Admin Server only.

Till now I hope, the concept of Weblogic Domain is clear.
As terms Weblogic Admin Server and Weblogic Managed Server has been used, let me explain each of them separately.

Weblogic Admin Server OR Weblogic Administration Server:

The minimum requirement for a Weblogic Domain to exist is that it must contain one Administration Server. This Weblogic Server Instance is basically used for the Administrative purpose of complete Weblogic domain.
This Admin Server can also be used for the purpose of deployment of applications along with Administrative purpose and in that case the Admin Server is acting as Managed Weblogic Server instance.

Managed Weblogic Server:

Any other server instance other than Administrative Server of a Weblogic domain is called as Managed Weblogic Server. Managed Servers host the components and associated resources that constitute the applications—for example, JSPs and EJBs.
Below figure Fig. 2 Shows A Weblogic Domain with 1 Admin Server and 1 Managed Server on a Single Machine.
Weblogic domain with Admin Server and one Managed Server.
Fig.2 Weblogic domain with Admin Server and one Managed Server.

Starting Managed Servers without an Administration Server using Node Manager and WLST


Weblogic 12c


The steps for starting the Managed  Server without AdminServer using WLST and Node Manager are as follows :
i)  Setting up your environment.
Add WebLogic Server classes to the CLASSPATH environment variable and WL_HOME\server\bin to the PATH environment variable.  OR
You can use a  C:\Oracle\Middleware\wlserver_12.1\server\bin\setWLSEnv.cmd  script to set both variables.

ii)  Start WLST Session using command : java weblogic.WLST
iii)  Start Node Manager using command :
                         startNodeManager(verbose=’true’, NodeManagerHome=’C:\\Oracle\\Middleware\\wlserver_12.1\\common\\nodemanager’, ListenPort=’5556′, ListenAddress=’localhost’)
iv) Connect WLST to a Node Manager by entering the nmConnect command.
nmConnect(‘weblogic’, ‘weblogic123′, ‘localhost’, ’5556′, ‘base_domain’ , ‘C:\\Oracle\\Middleware\\user_projects\\domains\\base_domain’ , ‘ssl’)
note: Node Manager security relies on a one-way SSL connection between the client and server.If you are establishing a command line connection to the Java Node Manager using the WebLogic Server Scripting Tool (WLST) nmConnect command, you provide the Node Manager user name and password(here weblogic and weblogic123 respectively). Node Manager verifies the username and password against the domain’s nm_password.properties file.Node Manager credentials are located on the Security>General>Advanced Options of Console page.Administration Console users do not need to explicitly provide credentials to connect to Node Manager—the Node Manager user name and password are available in the domain configuration and are provided automatically.
v) Starts the managed server in the current domain using Node Manager. : nmStart('Server-0')


 Related Common Issues :


If you are trying to automate the environment using Node Manager and WLST .
And you are trying to Start the Admin Server and all the Managed Server using WLST only.
And the Managed servers are to be started for the first time using WLST and Node Manager then you may encounter the below error :


<Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG to FIPS186PRNG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true> 
<Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) 64-Bit Server VM Version 20.1-b02 from Sun Microsystems Inc.> 
<Info> <Management> <BEA-141107> <Version: WebLogic Server 10.3.4.0 Fri Dec 17 20:47:33 PST 2010 1384255 > 
<Critical> <WebLogicServer> <BEA-000362> <Server failed. Reason: 

There are 1 nested errors:

weblogic.management.ManagementException: Booting as admin server, but servername, soa_server1, does not match the admin server name, AdminServer
at weblogic.management.provider.internal.RuntimeAccessService.start(RuntimeAccessService.java:67)
at weblogic.t3.srvr.ServerServicesManager.startService(ServerServicesManager.java:461)
at weblogic.t3.srvr.ServerServicesManager.startInStandbyState(ServerServicesManager.java:166)
at weblogic.t3.srvr.T3Srvr.initializeStandby(T3Srvr.java:879)
at weblogic.t3.srvr.T3Srvr.startup(T3Srvr.java:566)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:467)
at weblogic.Server.main(Server.java:71)

Cause :

The reason for the above error is that when the Managed Server are to be started for the first time using the Node Manager and WLST,  the boot.properties file ( at %domain_home%/servers/ManagedServer/security/) and startup.properties file ( %domain_home%/servers/ManagedServer/data/NodeManager/) should be already present.

Solution :

To generate the boot.properties file , and startup.properties file use the below WLST command :
 nmGenBootStartupProps('ms1') 

Weblogic 12c Installation Directories Structure


Exploring Middleware Home Directory

By default, Weblogic 12c choose C:\Oracle\Middleware directory for installation on Windows.

Oracle\Middleware Directory

Directory
Contents
/ coherence_3.7Coherence home directory
/ jdk160_29Sun JDK ((Recommended for Development Mode))
/ jrockit_versionJRockit JDK (Recommended for Production Mode)
/ logsLocation for various log files about installation and uninstallation for the Middleware home directory.
/modulesLocation for modules such as Apache Ant
/ oepe_12.1.1.0.1Files related to Oracle Enterprise Package for Eclipse
/ patch_ocp371
/ patch_oepe101
/user_projectsContains Domain
/ utilscontains utilities that are used to support the installation of all products installed in this home directory.
/ wlserver_12.1WebLogic Server home directory
.homeThis file contains the information about the Middleware home directory.
domain-registry.xmlThis registry file contains the location of all domains currently registered with this WebLogic Server installation. Whenever you add a new domain, it is registered in this file.
ocm.rspThis response file contains information about the Oracle Configuration Manager (OCM) installation.
registry.datThis registry contains product-related information, such as version number, patch set level, patch level, and location of the product installation directories. It also contains the name of the installed JDK(s) and the Java home.
registry.xmlThis is an encrypted version of the registry.xml file.

WebLogic Server Home Directory(WL_HOME): By default it is located in theOracle\Middleware\wlserver_12.1

WebLogic Server Domain Directory

Directory
Content
/ autodeployIn a development environment, the server will automatically deploy any applications or modules you place here. You must run the server in development mode for it to take advantage of the automatic deployment feature.
/ binContains the start and stop scripts
/ configContains the key domain configuration file, config.xml.
/ console-extContains any Administration Console extensions you’ve created
/ init-info This directory contains files that are used for WebLogic domain provisioning. You should not modify any files in this directory.
/ libYou can place JAR files in this directory so they can be available to all applications running on the domain’s server instances.
/ securityHolds security-related files such as SerializedSystemIni.dat.
/ serversThis is an important directory that contains a separate subdirectory for each of the servers in your domain, including both Admin and Managed Servers.
fileRealm.properties
startWebLogic.cmd
startWebLogic.sh
Note:
Note while creating  the Middleware home directory:
  • Do not include spaces in the name of your Middleware home directory otherwise the CLASSPATH may not be resolved properly.
  •  You can install only one instance of each version of a WebLogic Server product in a single Middleware home directory. For example, you can install only one instance of the current version of WebLogic Server in a Middleware home directory, but you can have an earlier version of WebLogic Server in a separate Middleware home directory.
  • If the home directory is not empty and it does not contain registry.xml, or if any of the product installation directories are not empty, one of the following messages is displayed:
For home directory selection task—Middleware home directory is not empty. Proceed with installation?
For product installation directory selection task—One or more installation directories are not empty. Proceed with installation?