Problems using JMQ 2.0 on Linux

I installed iMQ 2.0 Developer download on a linux machine, exactly

according to the install.pdf

instructions.

When I start jmqbroker, I get in the log.txt:

[23/Jul/2001:15:12:07 CDT] [B1002]: An existing property file for

jmqbroker was not found, no stored properties will be loaded

[23/Jul/2001:15:12:07 CDT]

==============================================================

iPlanet Message Queue for Java Copyright 2001

Version: 2.0 (Build 248-b) Sun Microsystems, Inc.

Compile: Fri Apr 20 21:13:20 PDT 2001 All Rights Reserved

This product includes code licensed from RSA Data Security

==============================================================

Java Runtime Version: 1.3.0_02 Sun Microsystems Inc. /opt/SUNWjmq/jre

[23/Jul/2001:15:12:07 CDT] [B1055]: Arguments:

[23/Jul/2001:15:12:12 CDT] [B1004]: Starting the portmapper service

using tcp [ 7676, 50 ] with min threads 1 and max threads of 1

[23/Jul/2001:15:12:13 CDT] [B1060]: Loading persistent data...

[23/Jul/2001:15:12:13 CDT] WARNING [B2026]: Cluster initialization

failed. Switching to standalone mode.

[23/Jul/2001:15:12:13 CDT] [B1042]: Running in standalone mode.

[23/Jul/2001:15:12:14 CDT] [B1013]: Auto Creation of Queues is Enabled

[23/Jul/2001:15:12:14 CDT] [B1004]: Starting the jms service using

tcp(port=0) with min threads 10 and max threads of 1000

[23/Jul/2001:15:12:14 CDT] [B1004]: Starting the admin service using

tcp(port=0) with min threads 4 and max threads of 10

[23/Jul/2001:15:12:14 CDT] ERROR [B3009]: Unable to start service

httpjms: [B4001]: Unable to open protocol http for httpjms service using

com.sun.messaging.jmq.jmsserver.net.http.HTTPProtocol: mini-cortex

[23/Jul/2001:15:12:14 CDT] [B1039]: Broker "jmqbroker" ready.

[23/Jul/2001:15:34:55 CDT] ERROR [B3018]: Unable to run the service

admin, the broker will no longer accept connections on this service:

java.lang.NullPointerException

at

com.sun.messaging.jmq.jmsserver.service.ConnectionID.initAddrString(ConnectionI D.java:114)

at

com.sun.messaging.jmq.jmsserver.service.ConnectionID.initialize(ConnectionID.ja va:135)

at

com.sun.messaging.jmq.jmsserver.service.ConnectionID.getNewConnectionID(Connect ionID.java:101)

at

com.sun.messaging.jmq.jmsserver.service.Connection.<init>(Connection.java :143)

at

com.sun.messaging.jmq.jmsserver.service.standard.StandardConnection.<init> ;(StandardConnection.java:49)

at

com.sun.messaging.jmq.jmsserver.service.standard.StandardService.run(StandardSe rvice.java:547)

at java.lang.Thread.run(Thread.java:484)

ul/2001:15:19:33 CDT]

And when I try:

./jmqcmd -u admin -p admin query bkr

Querying the broker specified by:

-

Host Primary Port

-

localhost7676

[2990 byte] By [christenscreen] at [2007-11-25 8:06:53]
# 1

Error while connecting to the broker.

[C4003]: Error occurred on connection creation. - caught

java.net.UnknownHostException

Please verify that there is a broker running on the specified host and

port or

use the '-b' option to specify the correct broker host and port.

Querying the broker failed.

I cannot connect to the broker no matter what I try.

Any suggestions?

christenscreen at 2007-7-1 13:57:18 > top of Java-index,Application & Integration Servers,Sun Java System Message Queue...
# 2

Based on the log output it looks like something

is wrong with the address resolution mechanism on

your linux system.

Can you please run the following program on that

linux system, just to confirm the theory?

//

// File: foo.java

//

import java.net.*;

class foo {

public static void main(String args[]) throws Exception {

InetAddress iaddr = InetAddress.getByName(null);

System.out.println("IP Address = " + iaddr);

byte[] saddr = InetAddress.getLocalHost().getAddress();

String addrstr = Integer.toHexString(((int)saddr[0]) & 0xff) +

Integer.toHexString(((int)saddr[1]) & 0xff) +

Integer.toHexString(((int)saddr[2]) & 0xff) +

Integer.toHexString(((int)saddr[3]) & 0xff);

System.out.println("IP Address = " + addrstr);

}

}

//

// EOF

//

My guess is it will generate a NullPointerException...

In past we have seen some other variations of name resolution

problems on Linux. e.g. InetAddress.getLocalHost() returning

the loopback interface "127.0.0.1" instead of the configured

IP address. And this was with "out of the box" linux

configuration. It was addressed by simply correcting the

/etc/hosts entry..

Please let us know when you find a suitable fix for your

system. It will be a good addition to the iMQ admin guide.

christenscreen at 2007-7-1 13:57:18 > top of Java-index,Application & Integration Servers,Sun Java System Message Queue...
# 3

Hi everyone,

not sure if i'm asking in the right place but i seriously and desperately need help.

I have a Linux ES machine and have been developing codes in C/C++ to read and send to and from system Msg Q. What i need is an API or interface in Java that enables me to read and write to these Q. I have tried looking for such API but all were external API provided by other parties. Are there such API in SUN that enables me to read and write to these Msg Q?

Thanks!

yjn85 at 2007-7-1 13:57:18 > top of Java-index,Application & Integration Servers,Sun Java System Message Queue...