WebView - failed to start

Document ID : KB000113606
Last Modified Date : 18/12/2018
Show Technical Document Details
Issue:
after a full EM stop, restarted the EM, then the WebView and WebView failed to start. 
Cause:
The below command is unable to get the PORT number..
PORT=`netstat -nlp 2>/dev/null | grep jav | grep -Fw $1 | awk '{print $4}' | awk -F':' '{print $NF}' | grep ${WEBVIEW_PORT} | sed -n 1p`
The above command generates error in this environment. For this purpose we have redirected the errors message by using 2>/dev/null.
But it seems the port number is also being taken away by 2>/dev/null.
The above command doesn't return the port number as expected because it might be throwing any error.
As we have redirected error output to /dev/null we are now not getting any error in the debug scripts as well. We suggest that we should check with Linux system admin on your side and explore why the above line getting error (basically the nestat -nlp if we executed as non root). This seems to be specific to this Linux environment,
Resolution:
One solution that we can suggest (apart from checking with system admin) is to hard code the. Line 496 in WVCtrl.sh
wvports=`check_process_for_port $PID_JVM`
Modify this line as below. with Webview port.
This by passes identifying webview port through above command.
wvports=8080

A sample WVCtrl.sh is attached which takes the value of webview port from IntroscopeWebView.properties file.
File Attachments:
WVControlScript.zip