I encountered this problem a while ago during a VM Manager restart: OVMM service didn't started anymore going in timeout.
As a general suggestion when this happens first thing to do is to have a look at VM Manager logs, located at:
/u01/app/oracle/ovm-manager-3/machine1/base_adf_domain/servers/AdminServer/logs/AdminServer.log
if file is too long to read you could just give a try grepping only errors
cat /u01/app/oracle/ovm-manager-3/machine1/base_adf_domain/servers/AdminServer/logs/AdminServer.log | grep ERROR
In this case however OVMM Timeout was caused by an issue in /etc/init.d/ovmm file and in detail by this line:
nohup su - oracle -c "$USER_MEM_ARGS DOMAIN_PRODUCTION_MODE=true JAVA_OPTIONS=\"-Djava.awt.headless=true -Xdebug -Xrunjdwp:transport=dt_socket,address=127.0.0.1:8453,server=y,suspend=n -da:org.apache.myfaces.trinidad\" /u01/app/oracle/ovm-manager-3/machine1/base_adf_domain/startWebLogic.sh &" > /dev/null
As you can see by default ovmm start script starts WebLogic server as oracle user, instead of root user, the one used to perform VM Manager installation.
I just fixed it by simply swapping oracle user with root user, this happened despite before VM Manager installation I launched "createOracle.sh" script which performs oracle user creation and permissions assignment.
So, to solve this issue simply replace:
nohup su - oracle -c "$USER_MEM_ARGS DOMAIN_PRODUCTION_MODE=true JAVA_OPTIONS=\"-Djava.awt.headless=true -Xdebug -Xrunjdwp:transport=dt_socket,address=127.0.0.1:8453,server=y,suspend=n -da:org.apache.myfaces.trinidad\" /u01/app/oracle/ovm-manager-3/machine1/base_adf_domain/startWebLogic.sh &" > /dev/null
with:
nohup su - root -c "$USER_MEM_ARGS DOMAIN_PRODUCTION_MODE=true JAVA_OPTIONS=\"-Djava.awt.headless=true -Xdebug -Xrunjdwp:transport=dt_socket,address=127.0.0.1:8453,server=y,suspend=n -da:org.apache.myfaces.trinidad\" /u01/app/oracle/ovm-manager-3/machine1/base_adf_domain/startWebLogic.sh &" > /dev/null
Then start ovmm service again:
service ovmm start
That's all!!
Visualizzazione post con etichetta start stop script. Mostra tutti i post
Visualizzazione post con etichetta start stop script. Mostra tutti i post
giovedì 2 agosto 2012
mercoledì 27 giugno 2012
Automating Business Intelligence Startup and Shutdown on Linux
It's pretty common to install Oracle Middleware on an "unmanned" server, which means that there's no dedicated server admin or in general a person who could manually start the services in event of server failure. So I usually create boot scripts that prevent services downtime in case of server restart or server crash.
This script is intended for automate starting of Oracle Business Intelligence on a Linux Server. I run this script on Oracle Linux 6 but this should work on other distributions too.
[root@orcl ~]# nano /etc/init.d/bi
#! /bin/bash
#
# OBIEE Start/Stop Script
#
# chkconfig: 345 20 80
# description: Starts and stops the Oracle BI and listeners
#
# Set BI_HOME to be equal to the $ORACLE_HOME
#
# Set ORA_OWNER to the user id of the owner of the OBIEE.
BI_HOME=/home/oracle/obiee
ORA_OWNER=oracle
export ORACLE_INSTANCE=$BI_HOME/instances/instance1
start()
{
echo "Starting BI service "
su $ORA_OWNER -c "$BI_HOME/Oracle_BI1/opmn/bin/opmnctl startall"
su $ORA_OWNER $BI_HOME/user_projects/domains/bifoundation_domain/startWebLogic.sh > /dev/null 2>&1 &
}
stop()
{
echo "Stopping BI service "
su $ORA_OWNER -c "$BI_HOME/Oracle_BI1/opmn/bin/opmnctl stopall"
su $ORA_OWNER $BI_HOME/user_projects/domains/bifoundation_domain/bin/stopWebLogic.sh > /dev/null 2>&1 &
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status -p $pidfile $processname
RETVAL=$?
;;
restart)
stop
start
;;
condrestart)
if [ -f /var/lock/subsys/$servicename ]; then
stop
start
fi
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart}"
;;
esac
exit $RETVAL
Chmod this script and make it executable on boot
[root@orcl ~]# chmod 750 /etc/init.d/bi
[root@orcl ~]# chkconfig --add bi
We need to allow Weblogic autostart forcing username and password, I know it's a security risk display username and password in plaintext, since by default Oracle stores passowrd information in boot.properties by encryprint using AES.
[root@orcl ~]# nano /home/oracle/obiee/user_projects/domains/bifoundation_domain/servers/AdminServer/security/boot.properties
password=YOUR_WEBLOGIC_PASSWORD_HERE
username=YOUR_WEBLOGIC_USERNAME_HERE
[root@orcl ~]# chown oracle /home/oracle/obiee/user_projects/domains/bifoundation_domain/servers/AdminServer/security/boot.properties
Now everything should work as expected!!
Try if everything works fine:
[root@orcl ~]# /etc/init.d/bi start
If you would like to have Weblogic output you can modify script, though I suggest to leave output redirection enabled, maybe change it from /dev/null to an appropriate log file.
su $ORA_OWNER $BI_HOME/user_projects/domains/bifoundation_domain/startWebLogic.sh &
On start Weblogic returned this error:
PKI-02002: Unable to open the wallet. Check password.
which was solved chmodding /tmp directory
chmod -R 777 /tmp
That's all!!
This script is intended for automate starting of Oracle Business Intelligence on a Linux Server. I run this script on Oracle Linux 6 but this should work on other distributions too.
[root@orcl ~]# nano /etc/init.d/bi
#! /bin/bash
#
# OBIEE Start/Stop Script
#
# chkconfig: 345 20 80
# description: Starts and stops the Oracle BI and listeners
#
# Set BI_HOME to be equal to the $ORACLE_HOME
#
# Set ORA_OWNER to the user id of the owner of the OBIEE.
BI_HOME=/home/oracle/obiee
ORA_OWNER=oracle
export ORACLE_INSTANCE=$BI_HOME/instances/instance1
start()
{
echo "Starting BI service "
su $ORA_OWNER -c "$BI_HOME/Oracle_BI1/opmn/bin/opmnctl startall"
su $ORA_OWNER $BI_HOME/user_projects/domains/bifoundation_domain/startWebLogic.sh > /dev/null 2>&1 &
}
stop()
{
echo "Stopping BI service "
su $ORA_OWNER -c "$BI_HOME/Oracle_BI1/opmn/bin/opmnctl stopall"
su $ORA_OWNER $BI_HOME/user_projects/domains/bifoundation_domain/bin/stopWebLogic.sh > /dev/null 2>&1 &
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status -p $pidfile $processname
RETVAL=$?
;;
restart)
stop
start
;;
condrestart)
if [ -f /var/lock/subsys/$servicename ]; then
stop
start
fi
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart}"
;;
esac
exit $RETVAL
Chmod this script and make it executable on boot
[root@orcl ~]# chmod 750 /etc/init.d/bi
[root@orcl ~]# chkconfig --add bi
We need to allow Weblogic autostart forcing username and password, I know it's a security risk display username and password in plaintext, since by default Oracle stores passowrd information in boot.properties by encryprint using AES.
[root@orcl ~]# nano /home/oracle/obiee/user_projects/domains/bifoundation_domain/servers/AdminServer/security/boot.properties
password=YOUR_WEBLOGIC_PASSWORD_HERE
username=YOUR_WEBLOGIC_USERNAME_HERE
[root@orcl ~]# chown oracle /home/oracle/obiee/user_projects/domains/bifoundation_domain/servers/AdminServer/security/boot.properties
Now everything should work as expected!!
Try if everything works fine:
[root@orcl ~]# /etc/init.d/bi start
If you would like to have Weblogic output you can modify script, though I suggest to leave output redirection enabled, maybe change it from /dev/null to an appropriate log file.
su $ORA_OWNER $BI_HOME/user_projects/domains/bifoundation_domain/startWebLogic.sh &
On start Weblogic returned this error:
PKI-02002: Unable to open the wallet. Check password.
which was solved chmodding /tmp directory
chmod -R 777 /tmp
That's all!!
Iscriviti a:
Post (Atom)