Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Friday, June 29, 2018

Weblogic Stuck threads

One way to check if you have stuck threads is through Weblogic Admin console.

  1. Login to weblogic admin console with admin credentials.
  2. Expand Environment and click on Servers in the left menu
  3. Click on the Admin server or any managed server you want to check the stuck threads
  4. Click on the Monitoring tab in the server properties
  5. click on Threads tab.
  6. Check the Health column in Self-Tuning Thread Pool table. If it says OK there are no stuck threads.
  7. If Health column value shows "Warning" there are stuck threads in JVM.
  8. Next thing is that you will have to find the root cause of the stuck threads. For that JVM thread dump needs to be taken.
  9. There is a tool called jstack starting from JDK 1.6 version.
  10. Find out the process ID of the weblogic service and execute "jstack <<PID>> > threaddump.log"command.
  11. Above command generates threaddump.log file with JVM thread dump.
  12. Check the STUCK threads and fix the issue. It might be in application code or connection to external services.
Happy debugging.

Thanks
Siva Pokuri.






Monday, July 28, 2014

How to Installation OID 11g (11.1.1.7.0)


Note: Assuming Weblogic Server 11g (10.3.6) & Oracle Database 11g installed

Steps:

1) Download Oracle Internet Directory 11g RCU & Installer from OTN
   
     URL: http://www.oracle.com/technetwork/middleware/downloads/oid-11g-161194.html

2) Follow below steps to create OID database schema












3) Install Oracle Internet Directory using IDM 11g suite




















-- Siva Pokuri.


Monday, June 30, 2014

TIPS: Linux Commands to add swap space

1) Login as "root" user.

2) Execute command "/sbin/swapon -s" (Remove quotations) and you will get current swap size details:

Sample OutPut:
[root@dev /]# /sbin/swapon -s
Filename                                Type            Size    Used    Priority
/dev/mapper/VolGroup00-LogVol01         partition       2064376 0       -1

3) Execute below command to create new swap space with 2048MB space

dd if=/dev/zero of=/home/swapfile bs=2048 count=1048576

Sample OutPut: 
[root@dev /]# dd if=/dev/zero of=/home/swapfile bs=2048 count=1048576
1048576+0 records in
1048576+0 records out
2147483648 bytes (2.1 GB) copied, 13.8048 seconds, 156 MB/s

4) Execute below commands to create swap file:

/sbin/mkswap /home/swapfile 
/sbin/swapon /home/swapfile 

Now, Swap size is increased to 4 GB.

5) To check the swap space execute "/sbin/swapon -s"

Sample OutPut: 

[root@dev /]# /sbin/swapon -s
Filename                                Type            Size    Used    Priority
/dev/mapper/VolGroup00-LogVol01         partition       2064376 0       -1
/home/swapfile                          file            2097144 0       -2


-- Siva Pokuri.

Sunday, June 22, 2014

Linux vi commands

Window motions
--------------------
<CTRL>d -- Scroll down (half a screen)
<CTRL> -- Scroll up (half a screen)
<CTRL>f -- Page forward
<CTRL>b -- Page backward
/string -- Search forward
?string -- Search backward
n -- Repeat search
N -- Repeat search reverse
G -- Go to last line
nG -- Go to line n :n -- Go to line n
<CTRL>l -- Redraw screen
<CTRL>g -- File information

Cursor motions
------------------
H -- Upper left corner (home)
M -- Middle line
L -- Lower left corner
h -- Back a character
j -- Down a line
k -- Up a line
^ -- Beginning of line
$ -- End of line
l -- Forward a character
w -- Forward one word
b -- Back one word
fc -- Find c
; -- Repeat find (find next c)

Input commands (end with ESC)
--------------------------------------
a -- Append after cursor
i -- Insert before cursor
o -- Open line below
O -- Open line above
:r file -- Insert file after current line

Changes during insert mode
---------------------------------
<CTRL>h -- Back one character
<CTRL>w -- Back one word
<CRTL>u -- Back to beginning of insert

Move text from file old to file new
--------------------------------------
vi old "a10yy -- Yank 10 lines to buffer a
:w -- Write work buffer
:enew -- Edit new file
"ap -- Put text from a after cursor

Deletion commands
------------------------
dd -- Delete line
ndd -- Delete n lines to general buffer
dw -- Delete word to general buffer
ndw -- Delete n words
d) -- Delete to end of sentence
db -- Delete previous word
D -- Delete to end of line
x -- Delete character

Recovering deletions
------------------------
p -- Put general buffer after cursor
P -- Put general buffer before cursor
Change commands
s -- Substitute (ESC) - 1 char with string
cw -- Change word (ESC)
cc -- Change line (ESC) - blanks line
c$ -- Change to end of line
rc -- Replace character with c
R -- Replace (ESC) - typeover
. -- Repeat last change

Undo commands
u -- Undo last change
U -- Undo all changes on line

Rearrangement commands
--------------------------------
yy or Y -- Yank (copy) line to general buffer
"z6yy -- Yank 6 lines to buffer z
yw -- Yank word to general buffer
"a9dd -- Delete 9 lines to buffer a
"A9dd -- Delete 9 lines; append to buffer a
"ap -- Put text from buffer a after cursor
p -- Put general buffer after cursor
P -- Put general buffer before cursor
J -- Join lines

File management commands
----------------------------------
:w name -- Write edit buffer to file name
:wq -- Write to file and quit
:q! -- Quit without saving changes
ZZ -- Same as :wq
:sh -- Execute shell commands (<CTRL>d)

Parameters
-------------
:set list -- Show invisible characters
:set nolist -- Don't show invisible characters
:set number -- Show line numbers
:set nonumber -- Don't show line numbers

-- Siva Pokuri.

Tuesday, May 27, 2014

Get Stack Trace from a Oracle HTTP Server(OHS) CORE file on Unix



-- Navigate to core file location (Ex: /oracle/Middleware/Oracle_WT1/instances/instance1/)

-- Execute command "file <<corefilename>>". 
    Sample Output: core.12273: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from '/oracle/middleware/Oracle_WT1/ohs/bin/httpd.worker -DSSL'

-- Execute command "file httpd.worker".
    Sample Outputhttpd.worker: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically     linked (uses shared libs), for GNU/Linux 2.4.0, not stripped.

-- Execute command "script <<filename to generate stacktrace>>". 
    Sample OutputScript started, file is /opt/mystack

-- Execute command "gdb <<program(Ex: https.worker file)>> <<core file>>". This will start the stack trace.

-- Once the stack trace is completed, execute commands "quit" and then "exit". 

Core file stack trace is loaded into targeted file!!

-- Siva Pokuri. 

    

Wednesday, April 2, 2014

Windows Native Authentication(WNA) configuration in Oracle Access Manager 11g R2 PS2


Agenda: Process to configure WNA Authentication in Oracle Access Manager 11GR2 PS2.

Process:

  • Create new service account in Active Directory domain controller. User should not have any password expiry.


  • Open the command prompt in AD machine and  execute the below command to generate the keytab file.
"ktpass -princ HTTP/<oamHostName>@<adDomainName> -mapuser <adDomain>\<username> -pass <userPassword> -out <path>"


  •  Check the success message as shown in the below screen shot. 


  •  Open the user account in AD and click on the Account tab. Verify that principle name as shown in the below screen.

  • Copy the keytab file from AD machine to OAM machine. 

  •  Login as a root user and edit the /etc/krb5.conf file


  •  Please verify the below screen for your reference.


  •  Execute the klist command in OAM machine as shown in the below screen.  Find the Syntax below.
"klist -k -t -K -e FILE:/<keytab file path>"


  •  Execute the kinit command in OAM machine as shown in the below screen. Find the syntax below.
"kinit -V <Principle Name> -k -t <keytab file path>"

  •  Execute the klist command in OAM machine as shown in the below screen. 


  •  Login to the access manager admin console.
  • Navigate to Authentication modules > Kerberos
  • Provide the required parameters as shown below.


  •  Create new data store for AD in OAM.


  •  Create Authentication policy with Kerberos schema.


  •  For your reference verify the Kerberos authentication schema as shown in the below screen. 


  •  NTLM Changes.
  • Login to the server and navigate to the directory /<weblogic_domain>/config/fmwconfig/
  • Modify the NTLM Response from DEFAULT to BASIC. 


  •  Restart the Weblogic Admin server and OAM Managed server.

Testing:


  • Login to the AD Domain machine. 
  • Open command prompt and execute command "klist" to check the kerberos tokens are generated or not.


  •  Open IE browser then open Internet options and navigate to Advanced tab. Scroll down and verify "Enable Integrated Windows Authentication" is selected. 

  • Try to access the application which is protected by OAM Kerberos authentication.

-- Kiran Pokuri 

Friday, March 21, 2014

Oracle Traffic Directory Installation and Configuration

Description:

This post covers the process of installation and configuration of Oracle Traffic Directory 11.1.1.7.0

About OTD:


Oracle Traffic Director is a fast, reliable, and scalable layer-7 software load balance. You can set up Oracle Traffic Director to serve as the reliable entry point for all HTTP, HTTPS and TCP traffic to application servers and web servers in the back end. Oracle Traffic Director distributes the requests that it receives from clients to servers in the back end based on the specified load-balancing method, routes the requests based on specified rules, caches frequently accessed data, prioritizes traffic, and controls the quality of service.

Process: 

  • Download the Oracle Traffic Directory From Oracle Download
  • Copy the Binary to the Linux server and extract it.
  • Navigate to Binaries folder <OTD_Binary_Folder>/Disk1/
  • Execute the below command. 
    • ./runInstaller -jreLoc /<JAVA_HOME>/jre

  • Click Next to start Installation.


  • Select the Skip Software Updates and click Next.


  • Click Next.


  • Select the Directory location for Installation and  Click Next
  • Next Check the Installation Summary and click on Install.


  • This Screen Shows Installation Progress.


  • After Successful installation Click on Next. 


  • Verify the Installation Complete page shows the location of OTD installed. Click Finish


  • After Successful Installation of OTD next is Configure Admin Server. Execute the Below command to Configure Admin Server
    • Navigate to the <OTD_HOME>/bin
    • Execute ./tadm configure-server --user=<username> -- instance-home=<Location for Admin Server>
    • Please refer the below screen shot for example.


  • Enter the Admin User Password and press Enter.


  • Confirm Password and Press Enter.


  • Below screen shows the Successful configuration message of Admin Server 


  • Follow the below process to start the Admin Server.
    • Navigate to the <Admin_Instance_Home>/bin
    • Execute ./startserv
    • Then check for the message saying admin server started successfully. 


  • Open the Browser and try to access the below URL
    • https://<HostName>:8989
    • Check the below log in page.
    • Provide the Credentials which provided in Admin Server Configuration.  


  • Click on Create an Oracle Traffic Directory Configuration.


  • Provide the name and Server User and select the Server type as shown in the below screen. Click Next.


  • Select the port, IP address and Server Name in Listener Information Page. Click Next


  • In Server Pool Information Page add the list server to work for load balancing. Click Next


  • Select the Admin Server to Deploy the Configuration. Click Next


  • Verify the Configuration and click on Create Configuration.


  • Verify the successful configuration message and click close. 


  • Click on the Instances in left panel top corner. It will display the newly created Configuration. Click on start button to start the configuration.
  • Now try to access the application with new listener and port.
-- Kiran Pokuri