Using the Distributed Configuration Manager (DCM) command shell…

0 0
Read Time:4 Minute, 1 Second

At first I couldn’t remember this dcm-commands and always had to type them at least twice untill… I learned about the “shell”- subcommand which is part of Oracle iAS’s since iAS9i Rel.1.
Oddly enough, this shell is almost hidden behind a cloud of silence from Oracle’s side and I haven’t found it used in any of the How-to books I read. So why bother?
Because it can make the life of an application server administrator easier – type- and otherwise. It’s a simple command shell for all dcm-commands. It is a little bit like the old command-line servermanager all dba’s know.

Just imagine, you just installed an iAS with OC4J-container (stand-alone) and deployed your Java application. You entered thet URL of your new webserver into your browser just to see that it is working and all you get is “The Page can not be displayed” (HTTP-404).

Sure, you can directly dive into the Apache logs or may be the OC4J-logs first? So, in this case you want to find out first which component of the iAS refuses to work properly.

To check the status of all installed components of an instance you type a command like (and don’t forget to set Oracle_home first and go to OH/dcm/bin if it is not in your path which isn’t if its installed bij the OUI):

> dcmctl getstate -v -D

The command will show the acutal status of all installed components of the instance verbosely (-v can be skipped in 9.0.4, it’s implicit!) and in a Debug-mode (-D).

Let’s say as a result of that command you get:

    Component            Type                   Up Status       In Sync Status
====================================================================================
1   home             OC4J                       Up              True
2   HTTP_Server      HTTP_Server                Down            True

And you see – aha- the HTTP server is down causing the problem and – praise the Lord – the metadata repository is still in sync. So now all you need to do is starting the webserver. That is also done with a dcmctl–command which goes like:

> dcmctl start -co HTTP_Server

Followed again (you don’t really trust it) by an other check of all components. So you typed in total:

>  dcmctl getstate -v -D
>  dcmctl start -co HTTP_Server
>  dcmctl getstate -v -D

While you could have done it (in AS10g) with

> dcmctl shell
dcm >  getstate -D
dcm >  start -co HTTP_Server
dcm > getstate  -D 

(or repeat second last command)

dcm > exit or quit (to leave the shell) 

I hear you cry: an opmnctl stopall/startall would be faster and easier to type.
Yes, I know, not very impressive this far, but just imagine working on an Unix/Linux machine debugging a serious error in one of the components with a repository out of sync and a backup of the configuration after the repairs. Issueing all the necessary dcm-commands in one shell without having to type dcmctl in front of all your commands all the time saves a lot of time and trouble!

You just have to concentrate on the command you have to issue without being afraid of staying in the wrong directory, resetting Oracle_Home over and over again and so forth. In an other terminal window you can hop around in your filesystem in a normal shell doing all the rest without losing the posibility to do your next step in dcm where you left off.

This relatively tiny piece of software (compared to for example the webcache) makes actually the iAS tick by making sure that all components which have to work together are registered to a (filebased) repository and, if clustered, that each machine has a fitting, current configuration.
In iAS version 9.0.2 DCM at first had a serius bug – it collided heavily with the function of EMCTL, which is now just another way of handling dcm-commands.

DCM works in conjunction with the Oracle Process Monitor(s) (OPMN). OPMN is always a pure local process depending on the configration controlled by DCM.
DCM assures that the configurations of all nodes of an instances are in sync and propagates changes over all nodes. It synchronizes with the metadata repository of the infrastructure (if used) or uses a filebased repository for example in a stand-alone installation.

When does one use the opmnctl and when dcmctl?

OPMN is usually used to start/stop the whole instance in one go.

> opmnctl startall

or

> opmnctl stopall

When you have to

  • check the status of components of an application server instance
  • (re)synchronize configuration files with the repository
  • backup the instance configuration
  • stop/start individual components of an instance
  • deploy war/ear-files manually on a command-line

than you better use dcmctl or even better use it as a shell.

About Post Author

Karin Kriebisch

Karin is an experienced, broadly orientated Oracle consultant (senior DBA consultant (OCP)) and is specializing in Oracle Database Security (Oracle Implementation Specialist Security 11g). Karin uses to work in divers enterprise environments like pension fonds, banks or pharmaceuticals, where ITIL and Service Management software products (e.g. Assyst, Remedy, Jira, GLPI) play a big role. She is regularly working for custumers in development projects and migrations, so her experience lead her to pay special attention in the areas of maintenance and (database)infrastructure. Her knowledge embraces multiple operating systems like OpenVMS, Linux, HP-UX and of course Windows, and she is comfortable with Oracle Database versions starting with Oracle 7 up to 12c and virtualization environments like vmWare and Oracle Virtualbox. Add to this her ability of scripting (for Windows commandline and Powershell, *nix shells) and her knowlegde of Oracle applicatieservers (incl. WebLogic) to her portfolio and it makes her a technical allround Oracle specialist. Karin is very customer and service orientated and always strives to reach her goals. She has a very sharp analytical mind and a keen eye for the details in the big picture. Karin is a senior DBA at AMIS b.v. for more than 15 years and she still likes the changing environments she is able to work in and meeting new and interesting people all the time.
Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

5 thoughts on “Using the Distributed Configuration Manager (DCM) command shell…

  1. I found this article is very very usefull.
    Pleae also post some more good articles on how to setup sso/oid etc.,

  2. Hi Karin,

    I totally agree that the 10g AS is a lot easier to setup and administrate (and 9i forms compile like a charm.. that is.. on a 9.0.4). apachectl was removed with 10g though. Splitting the application server up into a seperate forms and reports edition was a smart move too. I rarely do a complete install nowadays, just because 9 out of 10 times all that is needed is oc4j for some forms. Also I am mostly working as trouble shooter on IAS, that is.. if I am still doing the tech stuff. This is due to the company I work at, but I can imagine you have simular experiences.

    In my humble opinion interesting themes would be:

    – SSL / general security on IAS
    – log offloading ( I am still working on a tool to store dms statistics in a database so I can finaly create some real reports on performance)
    – Webcache is far underrated, it makes life so much easier! This is worth a some credit too.
    – OC4J tweaking (some people just don’t understand the meaning of the islands)
    – IAS and Headstart. If you had to install it once, you now how much trouble it is (especially on *nix).
    – Finaly I would like to see some test results in performance differences on different operating systems (and yes, I am still a linux adept 😉 )

    As you know I’m no rocket science engineer, but I hope this gives you some pointers for some more case studies.

    Cheers,

    Jacco

  3. Hello Jacco,

    Thank you very much for your appreciation of our blog and our contributions on it ;-))

    yes, it happened to us once while installing an iAS9i R2. First we tried to reanimated it with ResyncInstance which didn’t work (= still out of sync). As far as I can remenber the only remedy which actually helped was to deregister the midtier from the infrastructure, reinstall the infrastructure an reregister the midtier to the infrastructure again (which was half a days work).

    This is especially tricky when the midtier is using SSL and also an SSO server (which is not in the default position on the Infrastructure machine – recommended by Oracle ).

    Be happy that Oracle 10G does not have that problem anymore. Oracle adapted the EM-website and made DCM leading, meaning EM uses the DCM-commands in the background now.
    And the Log-viewer of version 10 makes the checkup on the logs much easier too. So, if you can switch to OAS10g.

    About apachectl, I’m not quite sure but I thougth that it still exists in 9i but it is not recommended to use.

    Any idea what would be an interesting theme to write about next time?

    Hope to read from you again,

    Karin Kriebisch

  4. Debugging startup issues at an application server is hell, especially since Oracle decided to scatter the logfiles all over the place (without even thinking about logrote before 10g). Remove apachectl as binary was a huge mistake too. The first thing to check when apache is not running is it’s configuration and what better tool then apachectl exists? (just try apachectl configtest and fix what is broken).

    My main issue with dcm is the lack of clear error messages as well as a broken interface on top of already existing (and if I might say so: perfectly correct functioning) tools. The more low-level the tool, the better the messages it returns. If you get an error message from dcm, nine out of ten times you need to check 2 more logfiles to find out what is the actual cause of the pin you are sitting on.

    My second issue with dcm is the “sync” issue. Have you even been experiencing an infrastructure out of sync because of working with dcm (or even better, because you have hacked your way through configuration files?). I already found applications servers at customers sites that have a wrapper for opmn and dcmctl that makes sure it syncs before the actual action that is asked will be performed. I sure as hell created them for some customers too. Just becuase (especially unix-) administrators are used to hacking in files, in stead of using a rather broken interface called enterprise manager, which has a poor performance and lacks proper (management) information.

    So far for my tirade on application servers for today. Karin, keep up the good stuff. I would love to read some more of your thoughts about application servers.

Comments are closed.

Next Post

Craig McClanahan - JavaServer Faces: Dead on Arrival or Raging Success? (from the TheServerSide Java Symposium 2005)

What seems like a very interesting presentation from the tech lead for JSF: TheServerSide Java Symposium 2005. The description: The need for a common API for Java-based web application user interface components was obvious – by the time that the Java Specification Request (JSR) for this API was started, there […]
%d bloggers like this: