Monday, January 30, 2012

Issue with NodeManager and Weblogic Server

Error :


<Jan 24, 2012 11:33:43 AM AST> <Error> <NodeManager> <BEA-300033> <Could not execute command "getVersion" on the node manager. Reason: "Access to domain 'Base_Domain' for user 'EZRXyZIP1P' denied".>

Debug Steps:


The default log level for node manager is : Info .
We need to set the log level to Finest.

Below are the available log level for Node Manager :

SEVERE             ----- (highest value)
WARNING
INFO                    ---- Default value .
CONFIG
FINE
FINER
FINEST             ----- (lowest value)

Then We will restart the Node Manager and check for the log file error message again.

Solution :


1 : Log on to the Admin Console of the domain for which we are getting the error ( http://hostname:port/console )

2 : Go to Domain Name (Base_Domain) in my case >>>>> Then to security >>>>

3 : Click on the Advance Option.

4 : Change the username and password values that you want to use with the node manager.

in my case : username is : weblogic

password is : weblogic123

5 : save the changes.

Then each remote host:

  • Navigate to the folder %DOMAINHOME%\config\nodemanager

  • Edit the file: nm_password.properties

  • Content should be set to:

  • username=weblogic

  • password=weblogic123

  • Save

  • Restart the Weblogic Node Manager


6 : Then go to the Base_Domain/servers/mannaged_server/data/nodemanager/ dir.

7 : open the boot.properties file and enter the below values :

username=weblogic

password= weblogic123

the same values as set on Admin Console.

8: Restart the Admin Server.

9 : Now run the nmEnroll() wlst command for all the machines that has the Managed server.

wlst>connect('username','password','t3://admin_host:admin_port')

online>>nmEnroll('Domain_dir_path','NodeManager_Home_Path')

online>>exit()

Now you can check the node manager status from Admin Console .

left panel >> Machines >> Machine1 >> Monitoring >>

The Status should be reachable.

If the above steps did not resolve the issue the you can still post you issue in the comments below and I can try to help .

 

 

 Error :


Feb 2, 2012 2:55:02 AM weblogic.nodemanager.server.NMServer main SEVERE: Fatal error in node manager server java.net.BindException: Address already in use at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365) at java.net.ServerSocket.bind(ServerSocket.java:319) at java.net.ServerSocket.<init>(ServerSocket.java:185) at java.net.ServerSocket.<init>(ServerSocket.java:141) at weblogic.nodemanager.server.Listener.init(Listener.java:56) at weblogic.nodemanager.server.NMServer.start(NMServer.java:206) at weblogic.nodemanager.server.NMServer.main(NMServer.java:377) at weblogic.NodeManager.main(NodeManager.java:31)

Reason :


The error message : java.net.BindException: Address already in use at

Shows that the Port number used by the Node Manager process is being already  used by some other process .

Solution :


1 : First thing we need to check is whether Node Manager is already running on the machine :

For unix :

ps -ef | grep -v grep | grep -i weblogic.NodeManager

For windows :

netstat -a0 | findstr <NM_PORT_NO>

tasklist | findstr nodemanager

2 : If the process is not running already then, check which process is using the using the port assigned to node manager .

By default Weblogic Node Manager runs on port : 5556

So, to check which process is using this port use the below command .

For unix :

netstat -an | grep 5556

For Windows :

netstat -ao | findstr 5556

3 : If this port is already used by some other process then try to change the Node Manager Port number from file

%Middleware_Home%/wlserver_10.3/common/nodemanager/nodemanager.properties file :

ListenPort = XXXX

4 : Now try to start the Node manager from :

%Middleware_Home%/wlserver_10.3/server/bin/startNodemanager.sh or

%Middleware_Home%/wlserver_10.3/server/bin/startNodemanager.cmd

 

 Error :


NodeManager not Reachable: java.io.IOException: Invalid State File Format

Due to above error, Managed Servers cannot be started as the nodemanager is not reachable to Admin Console.

Stack trace from nodemanager.log file :



    

java.io.IOException: Invalid state file format. State file contents: at weblogic.nodemanager.common.StateInfo.load(StateInfo.java:135) at weblogic.nodemanager.server.ServerMonitor.loadStateInfo(ServerMonitor.java:475) at weblogic.nodemanager.server.ServerMonitor.isCleanupAfterCrashNeeded(ServerMonitor.java:139) at weblogic.nodemanager.server.ServerManager.recoverServer(ServerManager.java:255) at weblogic.nodemanager.server.DomainManager.initialize(DomainManager.java:103) at weblogic.nodemanager.server.DomainManager.(DomainManager.java:55) at weblogic.nodemanager.server.NMServer.getDomainManager(NMServer.java:257) at weblogic.nodemanager.server.Handler.handleDomain(Handler.java:224) at weblogic.nodemanager.server.Handler.handleCommand(Handler.java:108) at weblogic.nodemanager.server.Handler.run(Handler.java:70) at java.lang.Thread.run(Thread.java:619)


 

 

 Reason :


The state file of the managed server is in an invalid state.
Under each managed server directory, there is a NodeManager directory containing a state file <managed_server_name>.state. If this file is empty or corrupt, then the described errors occur.

For example, underE:\oracle\middleware\user_projects\domains\base_domain\servers\soa_server1\data\nodemanager, the soa_server1.state file is empty.
The major cause of the corruption of this file is unexpected shutdown of the Machine.

Solution :



  1. Stop the managed server if it is RUNNING.

  2. Stop the Admin Server.

  3. Stop Node Manager.

  4. Delete the following files:



E:\oracle\middleware\user_projects\domains\base_domain\servers\soa_server1\data\nodemanager\soa_server1.state
E:\oracle\middleware\user_projects\domains\base_domain\servers\soa_server1\data\nodemanager\soa_server1.lck
E:\oracle\middleware\user_projects\domains\base_domain\servers\soa_server1\data\nodemanager\soa_server1.pid


  1. Start Node Manager again.

  2. Start the Admin Server again.

  3. Start the managed server using the Admin Console.


 

Thursday, January 26, 2012

XDMCP connection failed.

Not able to connect to Xbrowser.


 

Enable XDMCP in Linux


Problem:


Need to enable the xdmcp protocol in the Linux server for getting remote using XBrowser.

Release:


RedHat Enterprise Linux 5
SUSE Linux 10

Error:


Error :


XDMCP connection failed.

cat: 0.log: No such file or directory
[root@KWWBDCSRVOAM01 gdm]# cat :0.log

X Window System Version 7.1.1
Release Date: 12 May 2006
X Protocol Version 11, Revision 0, Release 7.1.1
Build Operating System: Linux 2.6.18-128.1.10.el5 x86_64 Red Hat, Inc.
Current Operating System: Linux KWWBDCSRVOAM01 2.6.18-155.el5 #1 SMP Fri Jun 19 17:06:31 EDT 2009 x86_64
Build Date: 03 June 2009
Build ID: xorg-x11-server 1.1.1-48.64.el5
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Tue Jan 24 14:06:34 2012
(==) Using config file: "/etc/X11/xorg.conf"
(WW) VMWARE(0): Failed to set up write-combining range (0xd4000000,0x400000)
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Multiple symbols for level 1/group 1 on key <I5F>
>                   Using XF86Sleep, ignoring XF86Standby
> Warning:          Symbol map for key <I5F> redefined
>                   Using last definition for conflicting fields
Errors from xkbcomp are not fatal to the X server

Solution:


1)      Install the gdm package

# yum install gdm

2)      Enable the xdmcp protocol by adding the below entries in the custom.conf file.

# vi /etc/gdm/custom.conf

[security]

AllowRemoteRoot=true

DisallowTCP=false

[xdmcp]

Enable=true

Note: Here “AllowRemoteRoot=true” used to allow root access.

3)      Restart the gdm service

# gdm-restart


4)      Check weather xdmcp port is opened or not, using netstat command

# netstat –an | grep 177


udp        0      0 0.0.0.0:177         0.0.0.0:*


5)  Firewall was blocking the Xmanager connection.
6) SE Linux was on. Turning off the SE Linux resolved the issue.

 

 

 

Tuesday, January 24, 2012

Deploy application on weblogic server

Deploy application on weblogic server 12c


 

Steps to Deploy Application using Administration Console


1. Start the Admin Server and Managed Server.

How to start Admin Server.  click here

How to start Managed Server. click here

2. Navigate to Administration console  http://localhost:7001/console and login.

3. Navigate to Domain Environment --> Deployments. Lock the console.



4. click the 'Install' button.



5. Browse to the location on your file system and select Application (war, jar, ear) File . Click the radio button next to the .war file and click 'Next' .



6. 'Install this deployment as an application'  is selected. Click 'Next'.



7. Select deployment targets



8.  Click 'Next' again to accept the defaults in this next pane.



9. Then click 'Finish'.



10. Click the 'Save' button and Activate Changes by clicking on button on left as shown in screen below. The application has been 'prepared', but not yet deployed at this point.



 

11. Again navigate to the Domain Structure --> 'Deployments' link. In the Summary of Deployments, check the box next to your application  and click the 'Start' button. Select 'Servicing all requests'. Click Yes to continue.



 

12. If the state of your deployment says 'Active', you have successfully deployed your Web application to Weblogic.


 Test application  deployment using Weblogic Administration Console


 

1. Navigate to  Domain Structure -->'Deployments'.

2. In the Summary of Deployments page, click on the name of the deployed Web application.



3. Select the 'Testing' tab .  Click the link to launch it .



 

Monday, January 23, 2012

Weblogic Deployment Staging Modes

 

Deployment applications and modules (which has been organized according to the J2EE specification) may include Java classes for EJBs and servlets, resource adapters, Web pages and supporting files such as XML-formatted deployment descriptors can be deployed to Weblogic server.

You can deploy, redeploy, undeploy, and distribute applications using Weblogic server Administration Console and weblogic.Deplopyer.

You can deploy an application as a single archive EAR file or as an exploded archive directory.

WebLogic Server provides three different options for deployment files:

Nostage mode: The Administration Server does not copy the deployment unit files to the target servers. The deployment units are deployed directly from the source. This mode is useful when deploying very large deployments to multiple targets. This is the default staging mode for the Administration Server.

Stage mode: The Administration Server copies the deployment unit files to the staging directories of target servers and they are deployed using the local copy. This mode is useful when deploying small size applications. This is the default staging mode for Managed Servers.

External mode: In this mode you manually  copy the deployment units  to the staging directories and then deploy.

Note: If you wish to deploy an application or module with in external stage mode, use the weblogic.Deployer utility.

 

Monday, January 16, 2012

How to start weblogic server in windows

Starting the Weblogic 12c Managed Server


To start the Weblogic  Server Instance:


1. Open a command prompt on the computer on which you created the domain.

Click Start.

Click Run.

Type cmd or command and press enter.





2. Change to the directory in which you created the domain.

For example: C:\Oracle\Middleware\user_projects\domains\base_domain\bin



3.Run the available start-up script.

For example:

UNIX: stopManagedWebLogic.sh

startManagedWebLogic.sh <managed_server_name> <admin_url>

Windows: stopManagedWebLogic.cmd

startManagedWebLogic.cmd <managed_server_name> <admin_url>



4.Weblogic  Server Instance  Started in Running Mode.



 

 

How to start weblogic administration server 12c

Starting the Weblogic 12c Administration Server


 To start the Administration Server:


1. Open a command prompt on the computer on which you created the domain.

Click Start.

Click Run.

Type cmd or command and press enter.





2. Change to the directory in which you created the domain.

For example: C:\Oracle\Middleware\user_projects\domains\base_domain\bin



 

3.Run the available start-up script.

For example:

Windows: startWebLogic.cmd
UNIX: startWebLogic.sh



4.Weblogic Administration  Server Started in Running Mode.



 

 

Sunday, January 15, 2012

Create and Configure Weblogic Server Machine

Weblogic Machine Configuration


Create a New Machine On Weblogic Server 12c


1.      Navigate to Domain Structure --> Environment --> Machines. Lock the console.



2.      Specify the following properties in the “ Create a New Machine ” page.

          Name:  Machine-0

          Machine OS: Other  (For Windows)



 Click Next

3.      Configure the Node Manager on this machine.

         Type:   SSL

         Listen Address:  localhost

         Listen Port: 5556



    Click Finish

4.      Machine created successfully. Activate the changes.



 

Configure  Machine On Weblogic Server 12c  (Assign Server to the weblogic Machine)


5.      Click The Machine name Machine-0  ( Navigate to Domain Structure --> Environment --> Machine ) Under “Summary of Machines”



6.      Click The “Server” tab under “Configuration” tab.



7.      Click Add under the “Server” tab. Select a server:   Server-0 from the drop down.



8.      Click Finish



Activate the Changes

 

 

Creating New Managed Server

 Create the Weblogic Server


1. Navigate to Domain Structure à Environment and click Server.




2. In the Summary of Servers section, under the Configuration tab, click New. Then specify the following properties:

Server Name =  Server-0

Server Listen Address = 127.0.0.1             (Note: You can also leave this blank)

Server Listen Port = 7003

Under, “Should this server belong …..”  Select No, this is a stand-alone server.



3.  Review the choices and click Finish. Server created successfully.



click Activate Changes.

 

weblogic server domain creation

Creating a new domain in Weblogic Server 12c



  1. To create a new domain, go to %BEA_HOME%/wlserver_12.1\common\bin .For example C:\Oracle\Middleware\wlserver_12.1\common\bin




2. Then run config.cmd (config.sh incase of Linux versions) file. This will bring the following screen.



3. Click on Next. Select the option: “Generate a domain configured automatically…”



4.Specify Domain Name and Location .



5. Give Administrator User Name and Password.(Password should be = > 8)



6. Select the Development mode.



7. Select Administration Server



8. Configure the Administration Server

Name : AdminServer

Listen address: All Local Addresses

Listen port: 7001



9. Click Create



10. Click Done  (Uncheck “start Admin Server” )

Saturday, January 14, 2012

Weblogic installation guide

Install weblogic 12c


 

Step 1: Weblogic server 12c download


Enter the following URL in a Web browser:

http://www.oracle.com/technetwork/middleware/weblogic/downloads/index.html

Step 2: Start the Installation


Double click the installer file.



Click Next.

Step 3: Select an Installation Directory


This directory is called the Middleware home directory.



You may use existing directory, or click Create a new Middleware Home to specify a new directory to be created for the installation.

By default, the Middleware home directory is named Oracle/Middleware.

Click Next.

Step 4: Register for Security Updates


Deselect "I wish to receive security updates via My Oracle Support" and confirm your choice.



Click Next.

Step 5: Choose a Custom Installation




Click Next.

Step 6: Choose Products and Components


Select All



click Next.

Step 7: JDK Selection


Choose Both

Note: Recommended, For Development Mode Choose SUN JDK and for Production Mode choose Oracle JRockit.



click Next.

Step 8: Choose Product Installation Directory


Choose installation directory.



By default, WebLogic Server is installed in the Middleware home directory chosen in Step 3. You may click Browse to choose a new location for the product installation directory.

Click Next.

Step 9: Install Node Manager


Choose No

Optionally, on Windows systems you may choose to install the WebLogic Server Node Manager as a Windows service.



Click Next.

Step 10: Choose Shortcut Location


Choose  “All users”



Click Next.

Step 11: View Installation Summary




You can also click on an individual component to display its approximate installed size.

Click Next.

After you click Next on the Installation Summary screen, a splash screen is displayed to indicate that the installation process has begun.



When the installation is complete, the following screen is displayed:



Uncheck  "Run Quickstart"  and click "Done".