In this post I am going to show how to manage and monitor Oracle ADF Applications in the Oracle Cloud using Oracle Java Cloud Service Control.
Prerequisites
You should have the following done before trying the described steps in this post yourself.
- Having a (trial) Oracle Cloud Java Service (which includes the database cloud service as well)
- Having deployed an ADF Application to Oracle Cloud as described in the previous post (http://multikoop.blogspot.de/2012/12/deploying-adf-applications-into-oracle.html)
The Oracle Java Cloud Service Control - that's the official name - is a subset of Enterprise Manager Cloud Control 12.1.0.2.0. It supports the Cloud Service Administrator to do the following tasks:
- View the list of services, metrics and availability of each service instance
- Deploy / Undeploy / Start / Stop Java EE (ADF) applications
- View cloud service job logs to see and verify recent activity
- View and export application log messages
- View ADF Application performance metrics <<< "does not work for me"
Getting started, Monitor Service Metrics
To get started log in at cloud.oracle.com and open "My Services" tab.
On this screen the first interesting metrics can be monitored per Java service instance.
- Java Heap usage, averaged over the last 15 minutes
- CPU usage, averaged over the last 15 minutes
From the service overview we can follow the 'Service Console' Icon that will take us to the 'Oracle Cloud Java Service Control'
The dashboard mainly shows an overview of the service availability and some common used resource usage metrics in different representations (diagram, table) like
- Active HTTP Sessions
- Request processing time (in ms)
- Request count (per minute)
- Open JDBC Connections
- Java Heap Usage
- CPU Usage
Deploy / Undeploy / Start / Stop Java EE (ADF) applications
The next important part is the possibility to Deploy, Undeploy (Delete), Redeploy, Start & Stop Applications. These are common administration tasks which are easy to use without any complications - at least start, stop worked fine so far ;).
For this post I am going to try deployment of ADF App right from the browser. Let's see if it works (The first ADF Deployment into the Oracle Cloud I have done from JDeveloper IDE, which worked without any problems). So let's click 'Deploy New'
Choose an EAR from you local machine, give the child a name and press 'Deploy'.
The upload goes really quick and user is provided with a message which says that a cloud service Job has been started in order to perform the task.
Lesson learned: It is not possible to provide a deployment plan while deploying ADF Applications in the Oracle Cloud.
This brings us to the next feature.
Cloud service job logs
On the bottom of the cloud control dashboard there is a table panel 'Java Cloud Service Jobs' to track the recent activity. After refreshing the dashboard we notice that the previously started deployment job has failed.
Select the corresponding row and open the 'View Java Cloud Service Job Logs' Menu
The strange thing here (bad UX) is that the service administrator has to guess what actually caused the deployment to fail from 3 options
- The uploaded EAR might have not passed the virus scan
- The uploaded ADF Application might have not passed the whitelist validation
- The deployment failed due to some other issue.
a) For every option you choose from the Menu a file is downloaded and can be viewed on the local machine.
Virus Scan: Passed successful.
b) Next: Application Whitelist Validation
2012-12-29 16:41:23 CST: Starting action "API Whitelist"
2012-12-29 16:41:23 CST: API Whitelist started
2012-12-29 16:41:24 CST: WARNING - There are 2 warnings(s) found for enpit_cloudapp2.ear.
2012-12-29 16:41:24 CST: WARNING - Path:enpit_cloudapp2.ear (2 Warnings)
2012-12-29 16:41:24 CST: WARNING - Path:enpit_cloudapp2.ear (2 Warnings)
2012-12-29 16:41:24 CST: WARNING - Path:enpit_cloudapp2.war (2 Warnings)
2012-12-29 16:41:24 CST: WARNING - Path:WEB-INF**** (2 Warnings)
2012-12-29 16:41:24 CST: WARNING - 1:Recommended child element "jsp-descriptor" missing under element /
bea-weblogic:weblogic-web-app.
If you have a JSP file that is not pre-compiled, The compilation errors
could be shown on the browser. It is recommended to include
<jsp-descriptor><verbose>false<****><****-descriptor> in weblogic.xml.
Line No:2.
2012-12-29 16:41:24 CST: WARNING - 2:Recommended child element "session-descriptor" missing under element /
bea-weblogic:weblogic-web-app.
You will be required to have distinct cookie-path, if multiple
applications are accessed with in the same SSO session or if you have
multiple applications with different auth-method(CLIENT-CERT, FORM, BASIC)
in the same service instance.
Line No:2.
2012-12-29 16:41:24 CST: WARNING - enpit_cloudapp2.ear had 2 warning(s).
2012-12-29 16:41:24 CST: INFO - Whitelist validation has completed with 0 error(s) and 2 warning(s).
2012-12-29 16:41:24 CST: Whitelist validation passed.
2012-12-29 16:41:24 CST: "API Whitelist" complete: status SUCCESS
c) Looks like the deployment actually went wrong - and indeed
2012-12-29 16:41:24 CST: Starting action "Deploy Application"
2012-12-29 16:41:24 CST: Deploy Application started
2012-12-29 16:41:40 CST: weblogic.application.ModuleException:
2012-12-29 16:41:40 CST: WLS action state: failed
2012-12-29 16:41:40 CST: Action FAILED with WLS state: failed
2012-12-29 16:41:40 CST: Application deployment failed.
2012-12-29 16:41:42 CST: [Deployer:149034]An exception occurred for task [Deployer:149026]remove application enpit_cloudapp2 on c1.: .
2012-12-29 16:41:42 CST: WLS action state: completed
2012-12-29 16:41:42 CST: "Deploy Application" complete: status FAILED
=> Well so it looks like an exception occurred while 'removing the application on c1". This message does not help really much, is confusing since that was the first deployment and no need for removing a previous application.
Application log messages
Maybe the log messages give some more information about the failure. The messages are accessible by following the link 'View Log Messages'
Looks like there is a configuration exception in the deployed ADF Application. After deploying the same application from JDeveloper into the Cloud I have noticed the Deployment Platform in the Log was 'Oracle Cloud'. So the problem was clear to me. Open the Deployment Profile and adjust the platform to 'Oracle Cloud' for creating the EAR.
After creating the EAR once again with that setting and performing same steps from the Cloud Control as described above the deployment worked as expected.
Important lesson learned: The Deployment Profiles and so the resulting ADF Application EAR differs. You cannot use the same EAR for Deployment to on-premise WebLogic Server AND Oracle Cloud Java Service!
ADF Performance metrics
Clicking on a given ADF applications name shows a dedicated performance view
IMHO the displayed metrics cannot be realtime values because most of the testing time - there were 2 active HTTP sessions all values were displaying 0. So I guess it is an average view over the last 15 Minutes.
From the application menu the ADF Performance view can be opened.
This part is very disappointing for now since the displayed information is just not true!
The sample app is using an Application Module and so should also display application module pool stats as indicated (but empty :( )
Same to the TaskFlows view
Sample application is using two bounded task flows. So I would expect them to be shown up here.
Conclusion
In general the Java Cloud Service Control makes what it is made for. It looks like the observed shortcomings are a limitation to the trial account or the ADF Performance Summary does not work in its current state. It is interesting to see that even in the official Oracle Cloud Documentation (Sec. Monitoring Oracle Java Cloud Service) there is no word left about the ADF Performance Summary + all available screenshots show 0 sessions, 0 requests and so on.
If someone has a different experience or some guy from Oracle has an explanation for the inconsistent behavior in the Cloud Service Control feel free to comment. I would be happy to be convinced from the opposite - a reliable cloud service control for monitoring ADF Applications.
Enhancement Requests
- Java Cloud Service Jobs
- Emphasize failed jobs, e.g. displaying 'Failed' in Red.
- In case of failed jobs there should be made clear on first view what caused the issue (Virus detected, Whitelist violated, other issue).
- Error message in case of failed deployment should be more useful. An message like 'An exception occurred for task [Deployer:149026]remove application enpit_cloudapp2 on c1.: .' does not say anything about the cause.
- Resource Usage metrics (sessions, Request processing time, JDBC Connections)
- Realtime Values. Currently it looks like the values are most of the time 0 even if there is some load.
- ADF Performance
- Display the actual metric values. Currently AM Pool and Taskflow metrics are not shown.
- General: Improved Reliability. Sometime there were just errors and inconsistent information displayed (see next image). E.g. error getting datasources and open JDBC Connections = 0 but the DB based application was accessible and worked fine.
Documentation
- Oracle Cloud Documentation (Monitoring Oracle Java Cloud Service) http://docs.oracle.com/cloud/CSJSU/monitor.htm#CSJSU7070
Related Posts
- Deploying ADF Applications into Oracle Cloud using JDeveloper (by enpit) (http://multikoop.blogspot.de/2012/12/deploying-adf-applications-into-oracle.html)
- Deploying Database Objects to Oracle Cloud using JDeveloper (by enpit) (http://multikoop.blogspot.de/2012/12/deploying-database-objects-to-oracle.html)
- Oracle Cloud Java and Database Services in Action (by enpit) (http://multikoop.blogspot.de/2012/11/oracle-java-and-database-cloud-services.html)