Advertisement
Guest User

Untitled

a guest
Aug 20th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.57 KB | None | 0 0
  1. Starting NodeManager...
  2. NodeManager Started
  3. Elapsed time: 00:00:10
  4.  
  5. Starting AdminServer...
  6. AdminServer Started
  7. Elapsed time: 00:01:10
  8.  
  9. #!/bin/bash
  10. set -e
  11. clear
  12.  
  13. TFILE=starting.log
  14. #--------------------------------------------------------------------------------
  15. Check_Status_NM ()
  16. {
  17. tail -F ${TFILE} | while read LOGLINE
  18. do
  19. if [[ "${LOGLINE}" == *"Secure socket listener started on port"* ]]
  20. then
  21. pkill -P $$ tail
  22. break
  23. elif [[ "${LOGLINE}" == *"Address already in use"* ]]; then
  24. pkill -P $$ tail
  25. echo -e "Cannot Start ServernSee starting.log for more info "
  26. exit 1
  27. fi
  28. done
  29. }
  30. #----------------------------------------------------------------
  31. Check_Status ()
  32. {
  33. tail -F ${TFILE} | while read LOGLINE
  34. do
  35. if [[ "${LOGLINE}" == *"The Network Adapter could not establish the connection"* ]] ; then
  36. echo -e "e[5me[93mWARNINGe[0m Could not establish the connectionne[91mCheck Connection to Databasee[0mn"
  37. elif [[ "${LOGLINE}" == *"<Server started in RUNNING mode>"* ]]
  38. then
  39. pkill -P $$ tail && cat /dev/null > ${TFILE}
  40. sleep 1
  41. break
  42.  
  43. elif [[ "${LOGLINE}" == *"<Server state changed to FORCE_SHUTTING_DOWN>"* ]] || [[ "${LOGLINE}" == *"Address already in use"* ]]; then
  44. pkill -P $$ tail
  45. echo -e "e[91mCannot Start Servere[0mnSee starting.log for more info "
  46. exit 1
  47. fi
  48. done
  49. }
  50. export JAVA_OPTIONS="-Dweblogic.management.username=weblogic -Dweblogic.management.password=oracle11g"
  51. #-------Start NodeManager-------------------------------------------------------
  52. echo -e "Starting NodeManager..."
  53. nohup "$WLS_HOME"/server/bin/startNodeManager.sh > ${TFILE} 2>&1 &
  54. Check_Status_NM
  55. echo -e "NodeManager e[92mStartede[0mn"
  56. #--------------------------Start WebLogic Domain------------------------------------------------
  57. echo -e "Starting AdminServer..."
  58. nohup "$DOMAIN_HOME"/bin/setDomainEnv.sh > ${TFILE} 2>&1 &
  59. nohup "$DOMAIN_HOME"/bin/startWebLogic.sh > ${TFILE} 2>&1 &
  60. Check_Status
  61. echo -e "AdminServer e[92mStartede[0mn"
  62. #----------- Start FORMS------------------------------
  63. echo "Starting Forms Server..."
  64. nohup "$DOMAIN_HOME"/bin/startManagedWebLogic.sh WLS_FORMS t3://$(hostname):7001 > ${TFILE} 2>&1 &
  65. Check_Status
  66. echo "Forms Server e[92mStartede[0mn"
  67. #----------- Start Reports------------------------------
  68. echo -e "Starting Reports Server..."
  69. nohup "$DOMAIN_HOME"/bin/startManagedWebLogic.sh WLS_REPORTS t3://$(hostname):7001 > ${TFILE} 2>&1 &
  70. Check_Status
  71. echo -e "Reports Server e[92mStartede[0mn"
  72. #---------------------Start anything remaining using OPMN------------------------
  73. opmnctl startall ; opmnctl status ; emctl start agent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement