geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russell E Glaue <rgl...@cait.org>
Subject ActiveMQ does not use PortOffset
Date Wed, 01 Jun 2011 21:53:55 GMT
When configuring PortOffset and starting Geronimo, ActiveMQ still creates the
service connection on the default port 61616. Then components complain that they
cannot make a connection to ActiveMQ because they are expecting it to be
listening on {61616 + PortOffset}.

I have read already in other threads that people are configuring ActiveMQ in
deployments similar in this way:

Thread: Using vm:// transport for ActiveMQ5.3 (Geronimo 2.2) - Apr 22, 2010
-
<transportConnectors>
           <transportConnector name="openwire"
uri="tcp://${ServerHostname}:${${ActiveMQPort} + ${PortOffset}}" />
           <transportConnector name="openwireVM"
uri="vm://${ServerHostname}" />
       </transportConnectors>
-

Thread: JMS Port and portOffset - Jun 1, 2011
-
Stop your server and edit var/config/config.xml:

At the bottom of this file, replace:

    <module name="console.jms/top/1.0/rar"/>

with:

    <module name="console.jms/top/1.0/rar">
      <gbean name="top">
        <attribute name="ServerUrl">tcp://${ServerHostname}:${ActiveMQPort +
PortOffset}</attribute>
      </gbean>
    </module>
-

This is the two error messages you receive when configuring PortOffset to 10, 20
or 100. The second error message, regarding XAResource, repeats:
-
2011-06-01 16:26:49,883 ERROR [MCFConnectionInterceptor] Error occurred creating
ManagedConnection for handle: nullManagedConnectionInfo:
org.apache.geronimo.connector.outbound.ManagedConnectionInfo@1c211b3. mc: null]
javax.resource.ResourceException: Could not create connection.
	at
org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:171)
...
Caused by: java.net.ConnectException: Connection refused
...
-
This one reveals the problem that ActiveMQ ia not using PortOffset
-
2011-06-01 16:26:49,885 ERROR [RecoveryController] Recovery error: Could not get
XAResource for recovery for mcf:
geronimo:J2EEApplication=null,J2EEServer=geronimo,JCAConnectionFactory=DefaultActiveMQConnectionFactory,JCAManagedConnectionFactory=DefaultActiveMQConnectionFactory,JCAResource=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapter=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapterModule=org.apache.geronimo.configs/activemq-ra/3.0-SNAPSHOT/car,j2eeType=JCAConnectionManager,name=DefaultActiveMQConnectionFactory
2011-06-01 16:27:05,894 ERROR [MCFConnectionInterceptor] Error occurred creating
ManagedConnection for handle: nullManagedConnectionInfo:
org.apache.geronimo.connector.outbound.ManagedConnectionInfo@287dba. mc: null]
javax.resource.ResourceException: Could not create connection.
...
Caused by: javax.jms.JMSException: Could not connect to broker URL:
tcp://localhost:61716. Reason: java.net.ConnectException: Connection refused
...
-

Looks like ActiveMQ is not coded to use PortOffset when creating the initial
service, but the other Geronimo components are coded to expect ActiveMQ at the
PortOffset.

ActiveMQ seems to be configured to run as a single-service on a server, and NOT
expected to be ran under multiple instances. (See also JIRA Issue GERONIMO-5987:
The ActiveMQ working directory is not referenced correctly)

Should it be that only one ActiveMQ service is ran on a single server with
multiple instances?
Or should it be that several separate ActiveMQ services are allowed to run, one
within each of multiple geronimo instances on a singe server?


I would assume the later is expected. Am I correct?
If so, then I would need to file another bug report... but I think I should
expand issue 5987 to include this.
comments?
confirmation this is an issue?


-RG

Mime
View raw message