I got the error like:
Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: ;
nested exception is:
java.net.BindException: Address already in use: JVM_Bind
If we need to monitor the Java using JMC (Java Mission Control), you need 1.7.0 U40 or higher.
Install the latest Java SE Development Kit in your laptop.
Edit the startWeblogic.sh at $DOMAIN_HOME/bin
Hashout all the lines starting from
#START
WEBLOGIC to
Before
stopAll
It will be like:
# START WEBLOGIC
echo "starting weblogic with Java version:"
${JAVA_HOME}/bin/java ${JAVA_VM} -version
if [ "${WLS_REDIRECT_LOG}" = "" ] ; then
echo "Starting WLS with line:"
echo "${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS} ${PROXY_SETTINGS} ${SERVER_CLASS}"
echo $JAVA_OPTIONS
${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS} ${PROXY_SETTINGS} ${SERVER_CLASS}
else
echo "Redirecting output from WLS window to ${WLS_REDIRECT_LOG}"
${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS} ${PROXY_SETTINGS} ${SERVER_CLASS} >"${WLS_REDIRECT_LOG}" 2>&1
fi
echo "starting weblogic with Java version:"
${JAVA_HOME}/bin/java ${JAVA_VM} -version
if [ "${WLS_REDIRECT_LOG}" = "" ] ; then
echo "Starting WLS with line:"
echo "${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS} ${PROXY_SETTINGS} ${SERVER_CLASS}"
echo $JAVA_OPTIONS
${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS} ${PROXY_SETTINGS} ${SERVER_CLASS}
else
echo "Redirecting output from WLS window to ${WLS_REDIRECT_LOG}"
${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME} -Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS} ${PROXY_SETTINGS} ${SERVER_CLASS} >"${WLS_REDIRECT_LOG}" 2>&1
fi
stopAll
TO
# START WEBLOGIC
echo "starting weblogic with Java
version:"
${JAVA_HOME}/bin/java ${JAVA_VM}
-version
if [ "${WLS_REDIRECT_LOG}" =
"" ] ; then
echo "Starting WLS with line:"
if [ "${SERVER_NAME}" =
"" ] ; then
SERVER_NAME="AdminServer"
export SERVER_NAME
fi
echo
"${SERVER_NAME}"
sleep 10
if [ "${SERVER_NAME}" =
"AdminServer" ]; then
echo "Inside
AdminServer***********************************************"
echo "${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME}
-Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS}
${PROXY_SETTINGS} ${SERVER_CLASS}"
JAVA_OPTIONS="${JAVA_OPTIONS}
-Djava.rmi.server.hostname=voim01ay.chainsys.com -Dcom.sun.management.jmxremote.port=7091 -Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false"
echo $JAVA_OPTIONS
${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS}
-Dweblogic.Name=${SERVER_NAME}
-Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS}
${PROXY_SETTINGS} ${SERVER_CLASS}
else
echo "Inside Other Domains
**********************************************"
${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS}
-Dweblogic.Name=${SERVER_NAME}
-Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS}
${PROXY_SETTINGS} ${SERVER_CLASS}
fi
else
echo "Redirecting output from WLS window to
${WLS_REDIRECT_LOG}"
if [ "${SERVER_NAME}" =
="AdminServer"] ; then
echo "Inside
AdminServer***********************************************"
echo "${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS}
-Dweblogic.Name=${SERVER_NAME}
-Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS}
-Djava.rmi.server.hostname=voim01ay.chainsys.com -Dcom.sun.management.jmxremote.port=7091
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false ${PROXY_SETTINGS} ${SERVER_CLASS}
>"${WLS_REDIRECT_LOG}"" 2>&1
JAVA_OPTIONS="${JAVA_OPTIONS}
-Djava.rmi.server.hostname=voim01ay.chainsys.com -Dcom.sun.management.jmxremote.port=7091
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false"
echo $JAVA_OPTIONS
${JAVA_HOME}/bin/java ${JAVA_VM} ${MEM_ARGS}
-Dweblogic.Name=${SERVER_NAME}
-Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy
${JAVA_OPTIONS} ${PROXY_SETTINGS}
${SERVER_CLASS} >"${WLS_REDIRECT_LOG}" 2>&1
else
echo "Inside Other Domains
**********************************************"
${JAVA_HOME}/bin/java
${JAVA_VM} ${MEM_ARGS} -Dweblogic.Name=${SERVER_NAME}
-Djava.security.policy=${WL_HOME}/server/lib/weblogic.policy ${JAVA_OPTIONS}
${PROXY_SETTINGS} ${SERVER_CLASS}
>"${WLS_REDIRECT_LOG}" 2>&1
fi
fi
stopAll
After this, start the weblogic
Check the port 7091 has been listening
[oracle@voim01ay bin]$ netstat -an |grep 7091
tcp 0 0 :::7091 :::* LISTEN
Restart all the servers
From the Client (Desktop) start the Java Mission Control
Click the Icon mentioned
Fill in the machine name and port
The connection details.
Click Next
Start JMXConsole
No comments:
Post a Comment