Configuring Sonic in a command line environment

Posted by ChUIMonster on 23-Jul-2009 12:03

Suppose that you have Sonic in a pure Unix character environment.

How can you obtain a listing of what queues and topics have been created and are running?

How do you add or delete a queue?

All Replies

Posted by mjabali on 23-Jul-2009 16:18

Hi Tom,

You can remotely connect to the Domain Manager broker using the Sonic Management Console and see a list of queues created on any broker in the same domain.

Topics are created at runtime so there is no list of topics.

To create or delete a queue you can also use the Sonic Management Console and do that.

Additionally, you can also use the Management API shipped with the product to perform the tasks mentioned above.

There is a sample java class under $SONICMQ/samples/Management/runtimeAPI/javaProxy called ShowQueue.java. That class lists all of the queues on a specific broker.

-Marcelo

Posted by ChUIMonster on 23-Jul-2009 16:32

Thatnks but, unfortunately, in this case I'm stuck in a very restrictive environment where there is no SMC available (and I cannot simply plug in my laptop and make one available either).

I'm not enough of a Java programmer to take the example and turn it into a command line tool.  But it seems that surely someone must have done such a thing at some point in the past?

Posted by mjabali on 23-Jul-2009 23:16

There is also a javascript sample of the same example available at $SONICMQ/samples/Management/runtimeAPI/jsProxy. It might be easier for you then.

Keep in mind that any utility interacting with the Management API must be written in Java.

I'm curious why you don't have a single instance of the SMC which is very common at any Sonic environment.

Hope this helps.

Posted by Admin on 24-Jul-2009 02:56

There are a  configAdmin tool but be very careful using this,

backup, backup, backup.

Doing some tests, I just crash my Sonic installation ...

and of course I have not a backup

$MQ_HOME/bin/configAdmin.sh >
connect tcp://localhost:2506 Administrator Administrator Domain1
export-bean /Brokers/MgmtBroker/Queues /tmp/Queues
delete-bean /Brokers/MgmtBroker/Queues/SampleQ4
import-bean /tmp/CreateQueues.xml override

Posted by ChUIMonster on 24-Jul-2009 08:07

I'm not sure how javascript is more useful.

In any event the site was installed a long time ago.  There almost certainly was an SMC somewhere at the time.  But it is no longer available -- people have moved on, PCs have been replaced, policies have changed etc, etc.  Even if I can manage to find the original CDs (doubtful) and license key (even more doubtful) getting the necessary approvals to install it will be a major challenge.  Just getting logged in is an exercise in patience.

On the bright side the system has stayed up and running without any serious attention for years.  Which is a nice comment on Sonic's reliability.

Posted by ChUIMonster on 24-Jul-2009 08:27

That's a start

Is there any documentation for configAdmin?  I've poked around the kbase without any luck and I didn't find anything in the PDFs either   The "help" within the command is a bit "sparse".

I'm puzzled as to why the "list" command doesn't list the queues.  The "export-bean" command created a nice XML file which has the data in it, it seems like "list" should have as well.

Posted by Admin on 24-Jul-2009 11:11

No , there is no documentation for this, and the "documentation" says:

"There is also a command line tool for importing and exporting (configAdmin.bat on
Windows or configAdmin.sh on UNIX/Linux). It is reserved for advanced users and
Progress Sonic consultants, as inappropriate usage is risky.
"

and this is true , my chance to win with this tool is: 1 to 5.

Backup your installation !!!

The better ideea is to use the SMC, export your DISPLAY to another station,

start the XServer and run startmc.sh or "shoot the system administrator".

Posted by ChUIMonster on 24-Jul-2009 11:58

You seem to be a big fan of backing up Sonic so tell me, exactly how would you go about doing that?

Posted by ChUIMonster on 24-Jul-2009 11:59

Using the SMC may indeed be the best idea but it is NOT available in this situation.  Nor is X.

Posted by Admin on 24-Jul-2009 12:18

this the dead point ... tell me you can ftp/ssh/cp/scp/nfs something on these machine ?

can you put something in a USB key ?, burn a CD/DVD ... ?

Posted by ChUIMonster on 24-Jul-2009 12:21

No.  It is a locked down environment.

Posted by Admin on 24-Jul-2009 12:28

what OS ?

Posted by ChUIMonster on 24-Jul-2009 12:34

AIX 5.3

Posted by Admin on 24-Jul-2009 12:52

Sincerely, I don't see any solution, in this case !

shoot the sheriff

Posted by ChUIMonster on 24-Jul-2009 13:01

Bang.  I still can't install anything.  But i feel better now

Ok, now how about "how to backup"?  You seem to think that its a good idea prior to running configAdmin and yet I've noticed that its another one of those things that isn't exactly documented anywhere.  In fact, if I'm following the docs correctly, it seems to me that the sole method of backing up would be to shutdown the container (which would seem to require the use of the SMC... at least if you want a reliably "clean" shutdown) and then do an OS backup of the Sonic root directory.

Posted by Admin on 24-Jul-2009 13:15

> do an OS backup of the Sonic root directory.

you see ? ... This is a kind of magic ...

every time we speek about a problem, we already have the solution.

Posted by ChUIMonster on 24-Jul-2009 13:27

That's not really the sort of "solution" that I would expect from Enterprise Messaging Software...

Posted by Admin on 24-Jul-2009 13:49

When I've started my first sonic project, it was SonicMQ 2000.1; after 3.0 ...

at the time, all commands was, in command line. Cool for old man's !

Now, we leave in another world ... the X world / iphone world.

What is the last time when you see an phone box on the streed ?

Posted by ChUIMonster on 27-Jul-2009 09:58

I suppose that GUI's have a place in the world but they have some very serious deficiencies when it comes to automating adminsitrative tasks.

Suppose, for instance, that I'm developing a new feature that involves a new queue, some code to put data onto the queue and some code to pull data off of that queue.  Are you seriously suggesting that I should fire up my nice pretty GUI IDE and (happily) type in the code (or click and drag and so on and so forth in the "Visual Designer") each time I promote it from dev to test to production?  No, of course you aren't.  The code is in files and there are automated processes for ensuring that those files move, without change, between environments.

To do the same thing (move it from dev to test to production) with the queue definition I would do what?

Posted by Admin on 27-Jul-2009 11:16

you are aleady say that is a "locked down environment". You can't transfer files. Ok, I understard.

The problem using Queues is that the Queue have to be created in SonicMQ.

I place to use Queues, use a Topic, the Topic is created dynamic, not need to get the SMC console

to create it.

Btw ...

how the system administrator can supervize the SonicMQ application with no SMC console ?

If something don't work ... he can not handle the situation. In my opinion, as already say ... fire him !

Posted by ChUIMonster on 27-Jul-2009 11:40

There is no Sonic Admin to fire.  Sonic was setup a long time ago by someone who has long since moved on -- on the bright side it "just runs".  But now it is time to add a few things and change a few things... and that needs to be done in a manner which is compliant with the environment.

Transferring files isn't hard.  It can be easily scripted and proper controls can be put in place. Installing an all powerful GUI tool is another thing all together.

Posted by Admin on 27-Jul-2009 11:41

the frame to read the message on this site becomes to litte to handle the message size,

I'm asking when the message becomes one letter by line

I loved the OLD PSDN ... the new one is very poluated with marketing annonces, very slow and

we see the messages wrapped in words!

Well donne .... the new PSDN administrators

Posted by ChUIMonster on 27-Jul-2009 11:42

Queues and topics serve very different purposes and the choice is highly application dependent.  The application in question uses both for various purposes.

Posted by Admin on 27-Jul-2009 11:47

in my opinion, create a vmware AIX using the same hostname and hard copy the SonicMQ installation

to the virtual box. Like this, you can local setup the SonicMQ in your laptop. After the job is done

you hard-copy SonicMQ Directory to AIX.

Posted by ChUIMonster on 27-Jul-2009 11:58

Perhaps I am misunderstanding you but wouldn't that require at least two production outages?  One to shutdown and make the original copy and another to promote the changes?  I'm fairly sure that this system hasn't been shutdown in years.  And I'm even more certain that the idea of shutting it down for this purpose won't be warmly embraced.

I have trouble beleiving that I'm the only person who has ever had this problem but at this point I believe that my options are:

1) Find a way to get an SMC running.

2) Try to work with the Java and/or JavaScript examples in the "samples" directory to create what is apparently missing.

3) Hope that someone reads this thread and posts a pointer to the command line tools and documentation that I've been overlooking.

None of those options are very good but they are what appears to be available.

Posted by Admin on 27-Jul-2009 12:05

what is the SonicMQ version ?, the older versions was more CHUI.

version: 2000.1 up to 3.5 have a INFORMIX CoudScape database build-in

we can do a JDBC connection on in and create new queues

user: root

pwd: paceaesalute

... this is "jad" who talk

Posted by ChUIMonster on 27-Jul-2009 12:09

6.1

Posted by Admin on 27-Jul-2009 12:16

6.1 no way ! ... in this version we have a object-database who is a clone of ObjectStore, no way to use JDBC.

The only way is to not fire the port 2506 on AIX, take a SMC on a laptop, connect, and do the config.

This thread is closed