1 Reply Latest reply: Sep 26, 2013 4:33 AM by user4876379 RSS

    Weblogic 12C logging location after NodeManager restart

    user4876379

      Hi,

       

      Im having a problem with Weblogic 12c, when we start it via the init.d script listed below the logs go into hte following directory

       

      /var/log/weblogic/nodename.log which is what we want. But when node manager restarts the node the logs are storred in the server directory under the root domain.

       

      Ive made the changes listed in : Change server log file name and location

       

      But this hasnt fixed the issue.  It seems to be that when nodemanager starts the startup script for weblogic it uses the startmanagedweblogic.sh script in the domain directory but as we use a redirect in our init script listed below this doesnt get called and the logs dont redirect. Any ideas ?

       

       

      # Source function library.

      . /etc/rc.d/init.d/functions

       

      WL_USER=oracle

       

      WL_HOME=/opt/weblogic/Oracle/Middleware/user_projects/domains/geodev_domain/bin/

      WL_SERVER_NAME=mfgeodev1

      WL_ADMIN_URL=http://10.0.1.184:7001

      WL_LOGFILE=/var/log/weblogic/$WL_SERVER_NAME.log

       

      WL_STOP_ADMIN_URL=http://10.0.1.184:7001

      WL_ADMIN_USERNAME=weblogic

      WL_ADMIN_PASSWORD=Mapflow123

       

      start() {

              echo -n $"Starting $prog: "

              su - $WL_USER -c "$WL_HOME/startManagedWebLogic.sh $WL_SERVER_NAME $WL_A                                                                             DMIN_URL" > $WL_LOGFILE 2>&1 &

              RETVAL=$?

              echo

              return $RETVAL

      }

       

      # When stopping httpd a delay of >10 second is required before SIGKILLing the

      # httpd parent; this gives enough time for the httpd parent to SIGKILL any

      # errant children.

      stop() {

              echo -n $"Stopping $prog: "

              su - $WL_USER -c "$WL_HOME/stopWebLogic.sh $WL_SERVER_NAME $WL_STOP_ADMI                                                                                                                                                          N_U                                                                             RL $WL_ADMIN_USERNAME $WL_ADMIN_PASSWORD" >> $WL_LOGFILE 2>&1

              RETVAL=$?

              echo

      }

       

      # See how we were called.

      case "$1" in

        start)

              start

              ;;

        stop)

              stop

              ;;

        *)

              echo $"Usage: $prog {start|stop}"

              RETVAL=2

      esac

       

      exit $RETVAL

        • 1. Re: Weblogic 12C logging location after NodeManager restart
          Fabian

          Hi,

           

          Add -Dweblogic.Stdout -Dweblogic.Stderr flag while starting the managed server .

          For setting the flag follow the below steps

          If your using Linux box and not using node manager to start the managed server,add the below line startManagedWebLogic.sh file


          JAVA_OPTIONS="-Dweblogic.Stdout=/var/log/weblogic/mfgeodev1.log -Dweblogic.Stderr=/var/log/weblogic/mfgeodev1.log ${JAVA_OPTIONS}"

          echo "JAVA_OPTIONS=${JAVA_OPTIONS}"

           
          If you are starting the Managed server through the node manager then use these flags From Admin console : servers >>>mfgeodev1 >>>> server start >>>> Arguments--> -Dweblogic.Stdout=/var/log/weblogic/mfgeodev1.log

          -Dweblogic.Stderr=/var/log/weblogic/mfgeodev1.log

           

          Please rotate these logs on hourly or daily basis


          Regards,

          Fabian