0
votes

I am running into a strange behaviour with WL 6.2. The WL Console is not listing any of the installed apps/wars (runtimes) in AIX environment. I have setup Worklight 6.2 on two different platforms:

Platform: Linux (Ubuntu)
WebSphere ND 8.5.5.1
DB2 V9.7

Platform: AIX
WebSphere ND 8.5.5.1
Oracle 11g

Both platforms have WAS Global Security enabled with simple file based registry (using Federated Repository). Both were configured using the following steps in the same way. In Ubuntu, I can see the installed runtime (WorklightStarter WAR). But in AIX, I see the horrid message in WL console: "Server error. Contact the server administrator"

I used WorklightStarter App to test my Ubuntu and AIX installations. In specific, I used the WorklightStarter app with no JS frameworks. Imported it into WL 6.2 Studio to build the WAR file for deployment.

Then I followed the simplified installation/configuration steps:

  1. created databases manually, a) wladmin b) wrklght c) wlreports. I followed instructions listed under "Create DB2 Databases Manually" and "Create Oracle Databases Manually" sections of instructions above to configure the databases on both Ubuntu(Linux) and AIX environments:

  2. configured was global security such that admin console access is secure. File based registry with federated repository was used.

  3. Installed the WL 6.2 server binaries from command line (using Installation Manager 1.6.x installc command).

    ./installc -acceptLicense -log /tmp/im_install.log

  4. logged in WAS Admin Console and created a "WorklightCluster" cluster.

  5. used ANT task to deploy a) worklight console + admin service b) WorklightStarter WAR to the WAS cluster created in step 4.

    following command were successful:

    /opt/ibm/worklight/62/shortcuts/ant -f /opt/ibm/worklight/62/WorklightServer/configuration-samples/configure-wasnd-cluster-oracle_custom.xml databases

    /opt/ibm/worklight/62/shortcuts/ant -f /opt/ibm/worklight/62/WorklightServer/configuration-samples/configure-wasnd-cluster-oracle_custom.xml admdatabases

    /opt/ibm/worklight/62/shortcuts/ant -f /opt/ibm/worklight/62/WorklightServer/configuration-samples/configure-wasnd-cluster-oracle_custom.xml adminstall

    /opt/ibm/worklight/62/shortcuts/ant -f /opt/ibm/worklight//62/WorklightServer/configuration-samples/configure-wasnd-cluster-oracle_custom.xml install

In AIX, so far everything worked after installation. I was able to start the WARs (worklight console , admin service, and worklight starter) in the WAS cluster. No startup errors were reported in SystemOut.log. Logging into AIX console eventually shows "Server error. Contact the server administrator". So I looked at Chrome console log and it was showing a 500 internal server error when WL console invokes the REST URIs:

/worklightconsole/services/management-apis/1.0/loginAudit?_=1408335538793
/worklightconsole/services/management-apis/1.0/runtimes/?_=1408335559099

So in order to debug this further in AIX, I went ahead and turned on some traces in WAS ND for worklight server. Since I didn't know which trace specification to turn on to get Worklight WAR's to spit out more message, I had to turn most WebSphere traces on blindly:

*=info: com.ibm.ws.*=all: com.ibm.worklight.*=all: com.ibm.websphere.*=all

This eventually showed that some component in Worklight (or perhaps WAS) is failing. I can't figure which component it is or why it's happening.

[8/16/14 4:32:50:106 EDT] 000000c6 ServiceProxy  > ServiceProxy getStatusCodeFromException ENTRY java.net.ConnectException: Connection timed out
[8/16/14 4:32:50:106 EDT] 000000f0 SRTServletRes 1 com.ibm.ws.webcontainer.srt.SRTServletResponse getRequestrequest=com.ibm.ws.webcontainer.srt.SRTServletRequest@62121da3 [com.ibm.ws.webcontainer.srt.SRTServletResponse@c3342c0f]
[8/16/14 4:32:50:106 EDT] 000000c6 ServiceProxy  < ServiceProxy getStatusCodeFromException RETURN
[8/16/14 4:32:50:106 EDT] 000000f0 SRTServletReq 1 com.ibm.ws.webcontainer.srt.SRTServletRequest getWebAppDispatcherContext
[8/16/14 4:32:50:106 EDT] 000000c6 SRTServletRes > com.ibm.ws.webcontainer.srt.SRTServletResponse setStatus ENTRY  status --> 500 [com.ibm.ws.webcontainer.srt.SRTServletResponse@f3808481]
[8/16/14 4:32:50:106 EDT] 000000f0 SRTServletRes 1 com.ibm.ws.webcontainer.srt.SRTServletResponse isCommitted false [com.ibm.ws.webcontainer.srt.SRTServletResponse@c3342c0f]
[8/16/14 4:32:50:106 EDT] 000000c6 SRTServletRes 1 com.ibm.ws.webcontainer.srt.SRTServletResponse getRequest request=com.ibm.ws.webcontainer.srt.SRTServletRequest@f4847ba7 [com.ibm.ws.webcontainer.srt.SRTServletResponse@f3808481]
[8/16/14 4:32:50:106 EDT] 000000f0 HttpResponseM 1   setStatusCode(sc): Status code: 500
[8/16/14 4:32:50:106 EDT] 000000c6 SRTServletReq 1 com.ibm.ws.webcontainer.srt.SRTServletRequest getWebAppDispatcherContext
[8/16/14 4:32:50:106 EDT] 000000f0 SRTServletRes < com.ibm.ws.webcontainer.srt.SRTServletResponse setStatus RETURN
[8/16/14 4:32:50:106 EDT] 000000c6 SRTServletRes 1 com.ibm.ws.webcontainer.srt.SRTServletResponse isCommitted false [com.ibm.ws.webcontainer.srt.SRTServletResponse@f3808481]
[8/16/14 4:32:50:106 EDT] 000000f0 SRTServletRes > com.ibm.ws.webcontainer.srt.SRTServletResponse addHeader ENTRY name --> com.worklight.admin.error with value --> Connection timed out [com.ibm.ws.webcontainer.srt.SRTServletResponse@c3342c0f]
[8/16/14 4:32:50:106 EDT] 000000c6 HttpResponseM 1   setStatusCode(sc): Status code: 500
[8/16/14 4:32:50:106 EDT] 000000f0 SRTServletRes 1 com.ibm.ws.webcontainer.srt.SRTServletResponse getRequest request=com.ibm.ws.webcontainer.srt.SRTServletRequest@62121da3 [com.ibm.ws.webcontainer.srt.SRTServletResponse@c3342c0f]

Any help in further debugging this issue will be much appreciated.

1

1 Answers

2
votes

The first message "ServiceProxy > ServiceProxy getStatusCodeFromException ENTRY java.net.ConnectException: Connection timed out" indicates that the service proxy between the Worklight Console and the Worklight admin services does not work. The following messages might be originated by this. It might be that you need to set the JNDI property ibm.worklight.admin.endpoint, or that you have already set it but wrongly. It should be set to something like https://someserver.net:9080/worklightadmin (please replace the protocol, server and port according to your needs).

Two hints:

  1. How to find the correct value for ibm.worklight.admin.endpoint? In your browser, enter, say:

    https://myserver.net:9080/worklightadmin/userAndConfigInfo

    (please modify protocol, host and port). If this asks for user name and password and then shows some JSON string, then the end point is this address excluding the 'userAndConfigInfo' (that is in this example: https://myserver.net:9080/worklightadmin). If this returns a connection time out or any other error, then you entered the wrong value and you need to verify your server configuration to find the correct value.

  2. What is this service proxy? The browser sends all REST requests first to the Worklight Console web application, and this redirects them to the Worklight admin services web application. There are technical reasons for this, as it improves the authentication behavior and the error messages.

    The service proxy can be disabled by setting the JNDI property ibm.worklight.admin.ui.cors to false. In this case, the browser sends the REST requests directly to the Worklight admin services. You still need to set ibm.worklight.admin.endpoint correctly, otherwise you will still get a connection time out.