ISSUE:
Unable
to start Oracle HTTP server.
$cd
$OHS_HOME/instances/$INSTANCE_NAME/bin
$./opmnctl
startall
opmnctl
startall: starting opmn and all managed processes...
Response:
0 of 1 processes started.
Error
-->
Process (index=1,uid=978846797,pid=14844)
failed
to start a managed process after the maximum retry
limit
Log:
$OHS_HOME/instances/$INSTANCE_NAME/
diagnostics/logs/OHS/ohs1/console~OHS~1.log
ERROR OBSERVED:
Logs
: @
$OHS_HOME/instances/$INSTANCE_NAME/
diagnostics/logs/OHS/ohs1/ohs1.log
<<
2015-04-05T15:03:31.1435+12:00]
[OHS] [INCIDENT_ERROR:32] [OHS-9999] [core.c] [host_id: ] [host_addr:
192.168.8.9] [pid: 14844] [tid: 140174359107376] [user: fusion]
[VirtualHost: main] (98)Address already in use: make_sock: could not
bind to address 192.168.8.9:10621
[2015-04-05T15:03:31.1435+12:00]
[OHS] [INCIDENT_ERROR:32] [OHS-9999] [core.c] [host_id: ] [host_addr:
192.168.8.9] [pid: 14844] [tid: 140174359107376] [user: fusion]
[VirtualHost: main] (98)Address already in use: make_sock: could not
bind to address 192.168.8.9:10621
[2015-04-05T15:03:31.1435+12:00]
[OHS] [INCIDENT_ERROR:20] [OHS-9999] [core.c] [host_id: [host_addr:
192.168.8.9] [pid: 14844] [tid: 140174359107376] [user: fusion]
[VirtualHost: main] no listening sockets available, shutting down
>>
It
seems the port
10621
is already in use by some other process and
hence the error was observed.
SOLUTION:
Step
1) Find the process ID which is using port 10621 using below script.
__________________________#!/bin/bash
#
is the port we are looking for
if
[ $# -lt 1 ]
then
echo
"Please provide a port number parameter for this script"
echo
"e.g. %content 1521"
exit
fi
echo
"We are checking , please be patient (CTRL+C breaks) . "
for
i in `ls /proc`
do
pfiles
$i | grep AF_INET | grep $1
if
[ $? -eq 0 ]
then
echo
Is owned by pid $i
echo
..
fi
done
______________________________
Step
2) Save above mentioned script as shell script(.sh)
Eg:
find_pid_with_port.sh
Step
3) Execute script as below
$./find_pid_with_port.sh
10621 ( since we need to find process holding on port 10621)
O/P:
pfiles:
permission denied: 6
pfiles:
permission denied: 607
pfiles:
permission denied: 862
sockname:
AF_INET 192.168.8.9 port:10621
Is
owned by pid
8856
Step
4) In Step 3 we found PID which is holding port 10621
So
we can kill that process id(PID)
$kill
-9 8856
Step
5) Try starting OHS again and it comes up with no issues.
$cd
$OHS_HOME/instances/$INSTANCE_NAME/bin
$./opmnctl
startall
Note:
Same steps are applicable for any ports and
10621
i
s
example port here.
Ref:
No comments:
Post a Comment