I've got activeMQ failing to bind to a port which I never told it
about. I'm guessing that it calculates that number from the number I
did give it. How can I make all the port numbers explicit? The port
I'm supplying is port 49342 assigned by a utility that looks for
unused ports. So I don't see where it gets 49353.

A little code:

    brokerService.setSchedulerSupport(false);
    brokerService.setUseJmx(false);
    brokerService.setPersistenceAdapter(new MemoryPersistenceAdapter());
    brokerService.setPersistent(false);
    brokerService.setUseShutdownHook(true);
    brokerService.setUseLoggingForShutdownErrors(false);
    brokerService.setSchedulerSupport(false);
    bindAddress = "tcp://0.0.0.0:" + getBrokerPort();
    tcpTransport = brokerService.addConnector(bindAddress);
    brokerService.setDataDirectory(dataDirectory.getAbsolutePath());
    brokerService.start();

A bit of logging:

    2011-10-30 08:02:15,722 [WrapperListener_start_runner] INFO
org.apache.activemq.broker.BrokerService - Using Persistence Adapter:
MemoryPersistenceAdapter
    2011-10-30 08:02:15,723 [WrapperListener_start_runner] INFO
org.apache.activemq.broker.BrokerService - ActiveMQ 5.4.1 JMS Message
Broker (localhost) is starting
    2011-10-30 08:02:15,723 [WrapperListener_start_runner] INFO
org.apache.activemq.broker.BrokerService - For help or more
information please see: http://activemq.apache.org/
    2011-10-30 08:02:15,864 [WrapperListener_start_runner] INFO
org.apache.activemq.transport.TransportServerThreadSupport - Listening
for connections at: tcp://tinfoilhat.home:49342
    2011-10-30 08:02:15,864 [WrapperListener_start_runner] INFO
org.apache.activemq.broker.TransportConnector - Connector
tcp://tinfoilhat.home:49342 Started
    2011-10-30 08:02:15,865 [WrapperListener_start_runner] INFO
org.apache.activemq.broker.BrokerService - ActiveMQ JMS Message Broker
(localhost, ID:tinfoilhat.home-49352-1319976135736-0:0) started
    2011-10-30 08:02:15,941 [ActiveMQ Transport:
tcp:///127.0.0.1:49353] INFO
org.apache.activemq.broker.TransportConnection.Transport - Transport
failed: java.net.SocketException: Invalid argument

Reply via email to