giovedì 12 novembre 2015

Java Cloud Service: How to enable and use RESTful Management Services on WebLogic Server and how to read logs file

Access to your JCS and open the Weblogic Console :


Login in WebLogic console:



Click on your domain (ITPWORK_domain in my case )


Scroll down the page and click on "Advanced"


Scroll down the page:


you must now select "Enable RESTful Management Services" to do this remember before to click on "Lock & Edit" button.

Click on "Save" button.


Now click on "Activate Changes"


As you can see, you will receive a message that all the servers must be restarted.


Under Environment->Servers, select Control and shutdown all the servers.




Now with Putty access to your JCS in SSH.
[How to access in SSH to Oracle Cloud using Putty and ppk key]
In the next image you can find all the commands and where to go to restart the Admin Server:
The path of the domains are always the same : /u01/data/domains
To access to /u01 remember to execute "sudo su"
To start the AdminServer you MUST use the startJCSServer.sh under <your_domain>/bin
Use the command:
nohup ./startJCSServer.sh  -Dweblogic.Name=<your WLS Admin server name> &


When the Admin Server is Running restart the Console and login:


Now you can restar the managed Server:





Now you can call RESTful Management services.

At the first access will appear a pop-up for Authentication, put here the same user and password that you are using for the login in WebLogic Console.

In the next images you can see some sample url to call:

[Oracle Docs on RestFul Management Services]


Servers informations:


Specific Server Info:


Logs for a specific server:


Here we are reading a Log of a Managed Server with Rest and with a simple Browser:
If you plan to do this I suggest to use Log Rotation on WSL and to limit the size of each lof file, to do this in the Admin Console go to Environment->Servers->your managed server->Logging.


I suggest to use a Rest Client, for example I use Postman Chrome App:



Nessun commento:

Posta un commento