WEBLOGIC MANAGED SERVER START HANGING AFTER DEPLOYMENT
We have a 4 node test SOA/Weblogic cluster. After CI deployment, the pipeline automatically restarted SOA managed servers. But managed servers in all 4 nodes stuck in STARTING state. We faced similar startup issues earlier. So, revisited these pages: Issue 1, Issue 2, Issue 3, Issue 4, to check if the current issue is similar to earlier issues. Unfortunately, it is not related to any of them. Ran lsof (Issue 3) output to check if server is waiting for any remote connection. But there isn’t any. Ran strace and thread dump but could not pick anything.
As admin server is running without issue and problem is with only managed servers, I guessed that problem could be with databases that SOA adapters are connecting to. So, removed the targets from all datasources like EBS (excluded SOA DB as Admin server is up without any issue). Now, I was able to start managed servers. In order to identify the culprit, added targets to one datasource at a time and able to find the database that was causing. Apparently, that DB has too many blocking sessions. It was ablet to accept connections but not able to provide provide response for test sql. Thats why we are not able to find out issue with strace, lsof and thread dumps. Our DBAs fixed the issue and we are able to target all those datasources again.
Though issue was fixed, it took considerable to time to identify the database that was causing issue. As post issue analysis, we came up with below one liner to find out which datasource is not deployed successfully. Please note you need to provide server.log file location as input. Make sure that this file has only logs related to current startup and not earlier startup logs.
read -p "Enter log file name: " logFile; awk -F'Creating data source connection pool named' ' { print $2 } ' $logFile | awk -F',' ' { print $1 } ' | sort -u | sed '/^[[:space:]]*$/d' | sed --expression='s/.>//g' | while read -r line; do grep "Data source $line has been successfully created" $logFile 2>&1 >/dev/null; if [ $? -gt 0 ] ; then echo "$line not deployed."; fi; < /dev/tty; done;
Output:
Enter log file name: WLS_SOA2.log06243
Datasource1 not deployed.
Datasource2 not deployed.
Datasource3 not deployed.
Comments
Post a Comment