AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
  • 1.  How to realeas specific port in AIX?

    Posted Wed October 08, 2008 07:39 AM

    Originally posted by: ragh


    Hi
    We are running weblogic server ( in cluster mode) on AIX 6.1 box. Weblogic server is utilizing ports 7001,7002,7003, and 7004. Our problem is After closing weblogic server still ports are not getting released by the system.

    netstat -an output is as below.

    tcp 0 0 10.254.50.83.7004 . LISTEN
    tcp 0 0 10.254.50.84.7003 . LISTEN
    tcp 0 0 10.254.50.84.7004 . LISTEN
    tcp 0 0 10.254.50.85.7003 . LISTEN
    tcp 0 0 10.254.50.86.7003 . LISTEN
    tcp 0 0 10.254.50.85.7004 . LISTEN
    tcp 0 0 10.254.50.86.7004 . LISTEN
    tcp 0 0 127.0.0.1.7003 . LISTEN
    tcp 0 0 127.0.0.1.7004 . LISTEN

    I did a search of particular process which is responsible for Listening these ports by giving command "lsof -i@10.254.50.83" . After killing those process also it continue to be in Listen status only. So every time to start weblogice server we are rebooting AIX machine. Please give me command or alternate idea how to release port on AIX box...
    #AIX-Forum


  • 2.  Re: How to realeas specific port in AIX?

    Posted Thu October 09, 2008 04:12 AM

    Originally posted by: frenger


    Seems weird due the ports are normally immediate closed after the corresponding program finishes but you can find out which processes are behind that ports without lsof (I do not always trust lsof, sometimes it displays garbage).
    Do a netstat -An and note the first entry of the appropriate LISTEN line (beginning with "f")
    open kdb (by typing it)
    at the kdb prompt type "set scroll false" and then
    si <f.........> tcpcb (where f...... is the number you noted before)
    the last line should tell you a PID and voila you know who is still using this port.
    If this dont help you further try a telnet on that port:
    "telnet localhost 7004" for example on the same machine. Do you get response there?
    #AIX-Forum


  • 3.  Re: How to realeas specific port in AIX?

    Posted Fri October 10, 2008 06:11 AM

    Originally posted by: ragh


    Thanks a lot for the response. The last line of kdb o/p I am getting as below..

    ==========================================================
    fd: 3
    SLOT NAME STATE PID PPID ADSPACE CL #THS

    pvproc+015C00 87*sshd ACTIVE 00570B2 004101E 0000000045BD5400 0 0001
    =======================================================================

    Where PID is "00570B2" is this the Hexadecimal Number. Or any other calculation is required to get exact PID from that.?
    #AIX-Forum


  • 4.  Re: How to realeas specific port in AIX?

    Posted Fri October 10, 2008 06:23 AM

    Originally posted by: frenger


    in kdb use the command hcal <hexnumber> to see what it is in decimal. Vice versa this works with the command dcal <decimalnumber>.

    Chers seth
    #AIX-Forum


  • 5.  Re: How to realeas specific port in AIX?

    Posted Tue October 14, 2008 12:56 AM

    Originally posted by: ragh


    Hi I am facing one more problem with respect to this.
    I followed the method ( using KDB ) suggested by you to find particular process which is not releasing the port. last day I had one more problem...i.e kill -9 <process ID > is not killing the process, the process CMD is saying <exiting> I tried 4 to 5 times to kill that process but I am not able to, and PORT is in CLOSE_WAIT status... Please find details below...

    Process ID from KDB.
    ================
    (0)> hcal 00630FA
    Value hexa: 000630FA Value decimal: 405754
    =====================

    bash-3.00#ps -eaf | grep -i 405754
    ===========================
    - 405754 - - - <exiting>
    ============================
    kill -9 405754
    this is not killing the process.
    ============================

    Due to this again weblogic server is refusing to start, its going to hung state...
    Please help me..

    Thanks
    Ragha..
    #AIX-Forum


  • 6.  Re: How to realeas specific port in AIX?

    Posted Tue October 14, 2008 03:21 AM

    Originally posted by: frenger


    So this seems abug in weblogic.
    The process hangs in a exiting state but in areas where your kill command cant be successful. I assume the weblogic exiting - command still hangs in kernel mode and in this mode there is nothing you can do. The application does not end itself right. Please contact weblogic support for a non-reboot solution.

    Cheers
    #AIX-Forum


  • 7.  Re: How to realeas specific port in AIX?

    Posted Thu October 09, 2008 04:59 AM

    Originally posted by: hdkutz


    Hello,
    try
    lsof -i:<YOURPORTNUMBER>
    to find out running processes on <YOURPORTNUMBER>.
    Kill them. No Ports of <YOURPORTNUMBER> should listen now.

    How is Weblogic started on your machine?
    If it is started by /etc/inittab - look if it is automatically restarted by init.
    If so, comment it out and write your own start/stop utility to fire up weblogic.

    Cheers,
    ku
    #AIX-Forum