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.


New and Cool Features in WebLogic 10.3.3 / latest WLS 11g

NEW: For more details please take a look at the Oracle Fusion Middleware chapter in my book Middleware and Cloud Computing.

Some interesting features I personally like in WLS 10.3.3.

  1. The MBean attribute PlatformMBeanServerUsed default is true now. So you can see your WLS MBeans from a local JConsole (for WLS11g = WLS10.3.1 you had to enable this first)
  2. A new dashboard replaces the WLDF console extension. Good news:, there is no installation required. You can access it with admin:port/console/dashboard.
  3. The request performance for WebLogic Diagnostic Framework (WLDF) TraceElapsedTimeAction is displayed directly in the admin web console under Diagnostics / RequestPerformance
  4. A new TraceMemoryAllocationAction shows memory allocated during a method similar to TraceElapsedTimeAction. You have to enable WLDF with instrumentation for this deployment first.
  5. The beloved Pointbase that was bundled with WebLogic is gone. This was one of my predictions for 2010 (Oracle made it in time).  Change your demos to use the Java DB Derby instead. I have updated my WebLogic 11g training course already.

For all changes see the what-is-new-in-WLS10.3.3.

Access the RackspaceCloud via NX

Sometimes you wish there was a Linux desktop image – but there isn’t. Typically all RackspaceCloud Linux images are server images without Gnome, KDE or even X11. It is still possible to install a desktop together with NX server (NX is a compelling alternative to using vnc) to get to the remote desktop on such a server image. The following lines list the necessary steps. There is a detailed instruction explaining how to get VNC running on RackspaceCloud / Ubuntu. I tried the following steps with RackspaceCloud and documented them here. Part of this information is taken from Eric Hammonds blog about EC2 and Ubuntu.

To start with, I found there is a problem with the locale setting  in Ubuntu 9.10 from Rackspace. You need to install the language pack first and then reconfigure the locale:

apt-get install language-pack-en-base
dpkg-reconfigure locales

You better test it with, e.g. with perl -v which shouldn’t complain about any locale settings anymore.

After that, create a new user “ubuntu” and set a password. The ubuntu user will be used to connect to the remote desktop once everything is set up correctly:

sudo useradd -d /home/ubuntu -m ubuntu
passwd ubuntu new_password

Installing NX involves three packages. It is no big deal to install manually, but there is a script available at Alestic written by Eric Hammand that I will use to install all of them. You can even run this script remotely with a little utility called runurl. So if you like, get the runurl utility and make it executable:

wget -qO/usr/bin/runurl
chmod 755 /usr/bin/runurl

Copy and paste the following URL to  your browser to see the details of the script you are going to execute. If you feel uncomfortable executing a script which is hosted at some remote site, then go and copy the script or simply cut and past the commands.

Then run the script by executing the following command:


The script will need a couple of minutes even on a fast machine. It download and installs the gnome desktop with the NX environment for the server.

At the end double check the file /etc/ssh/sshd_config contains the following two lines, if it doesn’t, correct it:

# Change to no to disable tunnelled clear text passwordsPasswordAuthentication yes
AllowUsers ubuntu

For Rackspace Ubuntu image, I also had to add the following entry to the hosts.allow file:

sudo echo 'SSHD: ALL' >> /etc/hosts.allow

After that, restart ssh with: sudo /etc/init.d/ssh restart

Then start and configure the Gnome desktop and X-server:

sudo /etc/init.d/gdm start
sudo dpkg-reconfigure xserver-xorg

To tell you the truth, depending on the Linux distribution, the way the distribution was built, and the cloud environment, it is easy to spend hours debugging connections problems with the UNIX desktop. The other solution, using ssh, be it from cygwin, or even better a real Linux with X-forwarding is typically easier and faster.


That’s it for the server site. On the client site get a NX client and enjoy.

Weblogic Scripting Tool WLST Quick Reference

NEW: For more details please take a look at the Oracle Fusion Middleware chapter in my book Middleware and Cloud Computing.

What is your opinion about the WebLogic Scripting Tool (WLST)? I find it more and more useful and offered a presentation about it at the Swiss Oracle User Group SOUG.

Here is a summary of key commands you should know to cut your way through the WebLogic MBEAN jungle.

Weblogic Scripting Tool (WLST) Quick Reference Guide and Commands.