Zero Downtime: Restart Admin Server from Admin Console / Rolling Restart of Servers or Cluster (WebLogic 12.2.1)

Before WebLogic 12.2.1 I was often asked if there is any OOTB restart of the admin server, especially from the admin console. Now with WLS 12.2.1 it can be done easily. Also of course you rolling restart a set of servers, a cluster or two, or whole domain!

  • Admin Server has to be assigned to a machine
  • Admin Server has to be started under nodemanager

Goto DOMAIN / ZDT Control / Domain | Cluster | Servers, chose what you would like to rolling restart, then click on Patch.

Select Rolling Restart.

rollingrestart

SQL to duplicate table structure with / without data rows

Just a note to myself.

How to duplicate a table structure with / without data. Drop the where 1=0 to copy over the data as well.

As an example the Oracle HR scheme with the employees table is used and replicated to employees2 (see bold SQL line below).

Note, that not null constraints are replicated but primary keys, foreign key, unique constraints and triggers aren’t.

 

SQL> describe employees;
 Name Null? Type
 ----------------------------------------- -------- ----------------------------
 EMPLOYEE_ID NOT NULL NUMBER(6)
 FIRST_NAME VARCHAR2(20)
 LAST_NAME NOT NULL VARCHAR2(25)
 EMAIL NOT NULL VARCHAR2(25)
 PHONE_NUMBER VARCHAR2(20)
 HIRE_DATE NOT NULL DATE
 JOB_ID NOT NULL VARCHAR2(10)
 SALARY NUMBER(8,2)
 COMMISSION_PCT NUMBER(2,2)
 MANAGER_ID NUMBER(6)
 DEPARTMENT_ID NUMBER(4)

SQL> 
SQL> create table employees2 as select * from employees where 1=0;

Table created.

SQL> describe employees2;
 Name Null? Type
 ----------------------------------------- -------- ----------------------------
 EMPLOYEE_ID NUMBER(6)
 FIRST_NAME VARCHAR2(20)
 LAST_NAME NOT NULL VARCHAR2(25)
 EMAIL NOT NULL VARCHAR2(25)
 PHONE_NUMBER VARCHAR2(20)
 HIRE_DATE NOT NULL DATE
 JOB_ID NOT NULL VARCHAR2(10)
 SALARY NUMBER(8,2)
 COMMISSION_PCT NUMBER(2,2)
 MANAGER_ID NUMBER(6)
 DEPARTMENT_ID NUMBER(4)

DevOps tools: http REST client httpie

Doing unplanned things adds fun to our lives. Last year at Open World when heading back to the Hilton I sneaked into a REST session at Java One that I never planned to attend. Honestly, I went there to finish my very late lunch. There I learned about a REST client tool that you should add to your toolbox: http (pronounced “HTTP Pie”, with the brave abbreviation: http).

In short http is more convenient version of curl, for the non-color blind folks. It includes heaps of features, like storing session data that can referenced for following requests, easy specification of JSON values, etc.

Here is an example of its usage with the the new WebLogic 12.2.1 REST interface for administration:

http -a weblogic:welcome1 \ "localhost:7001/management/weblogic/latest/domainRuntime/serverLifeCycleRuntimes/AdminServer?links=none&fields=name,state"

 

Screen Shot 2016-04-15 at 09.34.54

You read it here first. But also check out my other DevOps tools postings like lsof, high CPU threads, tunnel with ngrok.

 

DevOps tools: Easily tunnel your localhost (WebLogic or some other) server with ngrok to the world

Here is another addition to my DevOps tools series that is worth to know if you work with any kind of servers such as WebLogic, nginx or Apache httpd etc.

ngrok is a fun and very easy tool I use from time to time in demos or when running a training.
It opens a public tunnel (that of course can be protected) to connect to your local server. Really nice if you are in a different network than your audience, or hidden between a DSL router etc.

In the webcast below I show how to access WebLogic 12.2.1 running on localhost:7001

You read it here first 🙂

also check out the webcasts of the DevOps tools series about how to detect high CPU threads, or the usage of lsof.

 

Oracle Service Bus 12c (12.2.1) Native REST: Bug in HTTP GET in Pipeline?

While working on an Oracle tech presentation to be posted here, I discovered the following issue with native REST and Oracle Service Bus.

Version

SOA Quickstart / 12.2.1 OSB, running on RedHat derivative with Oracle JDK 8.

Description

OSB 12.2.1 Native REST pipelines don’t work with GET parameters.

Creating a native REST business services works fine, also adding a REST proxy service.
Once you insert a pipeline HTTP stops working correctly (since the URL parameters aren’t forwarded, a list will be returned by the backend service according to REST semantics), since URL parameters are not forwarded.

Steps to reproduce:

  • Use REST tech adapter to create a REST business service for an existing REST backend.
  • Define GET and POST methods. WADL will be created.
  • Test business service from WADL: both GET and POST will work.
  • Create proxy service from REST business service
  • Test proxy service, again GET and POST methods will work from OSB test client.
  • In JDev, drop a pipeline on the line connecting proxy and business service.
  • In JDev verify the pipeline configuration. it will display correct values.
  • Test the proxy service again, only POST will work. GET does not work anymore (now returns a whole list), since the URL parameters are not forwarded. Even an empty OSB pipeline will swallow the GET URL parameters.

Severity

IMHO this is a bug. I am currently in discussion with Oracle about it.

What is next?

I will let you know about updates / fixes or workarounds. Note, you could set the URL parameters as routing options to circumnavigate the issue for a particular use case.