Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-1465

Trailing space(s) or tab(s) at the end of activemq.host ip or hostname results in IllegalArgumentException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • JBoss A-MQ 6.2, JBoss A-MQ 6.2.1
    • broker, fabric8
    • None
    • Compatibility/Configuration
    • Workaround Exists
    • Hide

      Ensure there are no extra spaces or tabs at the end of the 'activemq.host = hostname' line.

      Show
      Ensure there are no extra spaces or tabs at the end of the 'activemq.host = hostname' line.
    • Hide

      Open./etc/system.properties
      Add space to the end of the line 'activemq.host = localhost' so that it is 'activemq.host = localhost '
      Run the broker
      Observe exception in log and broker failing to start

      Show
      Open./etc/system.properties Add space to the end of the line 'activemq.host = localhost' so that it is 'activemq.host = localhost ' Run the broker Observe exception in log and broker failing to start

      Configured ./etc/system.properties as| activemq.port = 61616|

      #activemq.host = localhost
      activemq.host = localhost
      activemq.url = tcp://${activemq.host}:${activemq.port}

      Note the space at the end of localhost for 'activemq.host'. Also tried with ip, single space, multiple spaces, tab and multiple tabs all with the same result.Ran ./bin/fuse and broker does not start. Checking the log reveals:For 6.2.0:09:15:37,413 | ERROR | pool-13-thread-1 | ActiveMQServiceFactory | 196 - io.fabric8.mq.mq-fabric - 1.2.0.redhat-133 | Exception on start: Transport Connector could not be registered in JMX: java.lang.IllegalArgumentException: Port value out of range: -1
      java.io.IOException: Transport Connector could not be registered in JMX: java.lang.IllegalArgumentException: Port value out of range: -1
      at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27)[184:org.apache.activemq.activemq-osgi:5.11.0.redhat-620133]
      at org.apache.activemq.broker.BrokerService.registerConnectorMBean(BrokerService.java:2110)[184:org.apache.activemq.activemq-osgi:5.11.0.redhat-620133]
      at org.apache.activemq.broker.BrokerService.startTransportConnector(BrokerService.java:2572)[184:org.apache.activemq.activemq-osgi:5.11.0.redhat-620133]
      at org.apache.activemq.broker.BrokerService.startAllConnectors(BrokerService.java:2488)[184:org.apache.activemq.activemq-osgi:5.11.0.redhat-620133]
      at org.apache.activemq.broker.BrokerService.doStartBroker(BrokerService.java:722)[184:org.apache.activemq.activemq-osgi:5.11.0.redhat-620133]
      at org.apache.activemq.broker.BrokerService.startBroker(BrokerService.java:682)[184:org.apache.activemq.activemq-osgi:5.11.0.redhat-620133]
      at org.apache.activemq.broker.BrokerService.start(BrokerService.java:606)[184:org.apache.activemq.activemq-osgi:5.11.0.redhat-620133]
      at io.fabric8.mq.fabric.ActiveMQServiceFactory$ClusteredConfiguration.doStart(ActiveMQServiceFactory.java:504)[196:io.fabric8.mq.mq-fabric:1.2.0.redhat-133]
      at io.fabric8.mq.fabric.ActiveMQServiceFactory$ClusteredConfiguration.access$400(ActiveMQServiceFactory.java:317)[196:io.fabric8.mq.mq-fabric:1.2.0.redhat-133]
      at io.fabric8.mq.fabric.ActiveMQServiceFactory$ClusteredConfiguration$1.run(ActiveMQServiceFactory.java:447)[196:io.fabric8.mq.mq-fabric:1.2.0.redhat-133]
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_91]
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_91]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_91]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_91]
      at java.lang.Thread.run(Thread.java:745)[:1.7.0_91]
      Caused by: java.lang.IllegalArgumentException: Port value out of range: -1
      at java.net.ServerSocket.<init>(ServerSocket.java:232)[:1.7.0_91]
      at javax.net.DefaultServerSocketFactory.createServerSocket(ServerSocketFactory.java:231)[:1.7.0_91]
      at org.apache.activemq.transport.tcp.TcpTransportServer.bind(TcpTransportServer.java:136)[184:org.apache.activemq.activemq-osgi:5.11.0.redhat-620133]
      at org.apache.activemq.transport.tcp.TcpTransportFactory.doBind(TcpTransportFactory.java:56)[184:org.apache.activemq.activemq-osgi:5.11.0.redhat-620133]
      at org.apache.activemq.transport.TransportFactorySupport.bind(TransportFactorySupport.java:40)[184:org.apache.activemq.activemq-osgi:5.11.0.redhat-620133]
      at org.apache.activemq.broker.TransportConnector.createTransportServer(TransportConnector.java:315)[184:org.apache.activemq.activemq-osgi:5.11.0.redhat-620133]
      at org.apache.activemq.broker.TransportConnector.getServer(TransportConnector.java:141)[184:org.apache.activemq.activemq-osgi:5.11.0.redhat-620133]
      at org.apache.activemq.broker.TransportConnector.asManagedConnector(TransportConnector.java:107)[184:org.apache.activemq.activemq-osgi:5.11.0.redhat-620133]
      at org.apache.activemq.broker.BrokerService.registerConnectorMBean(BrokerService.java:2105)[184:org.apache.activemq.activemq-osgi:5.11.0.redhat-620133]
      ... 13 moreFor 6.2.1:09:22:49,194 | ERROR | AMQ-1-thread-1 | ActiveMQServiceFactory | 197 - io.fabric8.mq.mq-fabric - 1.2.0.redhat-621084 | Exception on start: Transport Connector could not be registered in JMX: java.lang.IllegalArgumentException:
      Port value out of range: -1
      java.io.IOException: Transport Connector could not be registered in JMX: java.lang.IllegalArgumentException: Port value out of range: -1
      at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27)[185:org.apache.activemq.activemq-osgi:5.11.0.redhat-621084]
      at org.apache.activemq.broker.BrokerService.registerConnectorMBean(BrokerService.java:2110)[185:org.apache.activemq.activemq-osgi:5.11.0.redhat-621084]
      at org.apache.activemq.broker.BrokerService.startTransportConnector(BrokerService.java:2572)[185:org.apache.activemq.activemq-osgi:5.11.0.redhat-621084]
      at org.apache.activemq.broker.BrokerService.startAllConnectors(BrokerService.java:2488)[185:org.apache.activemq.activemq-osgi:5.11.0.redhat-621084]
      at org.apache.activemq.broker.BrokerService.doStartBroker(BrokerService.java:722)[185:org.apache.activemq.activemq-osgi:5.11.0.redhat-621084]
      at org.apache.activemq.broker.BrokerService.startBroker(BrokerService.java:682)[185:org.apache.activemq.activemq-osgi:5.11.0.redhat-621084]
      at org.apache.activemq.broker.BrokerService.start(BrokerService.java:606)[185:org.apache.activemq.activemq-osgi:5.11.0.redhat-621084]
      at io.fabric8.mq.fabric.ActiveMQServiceFactory$ClusteredConfiguration.doStart(ActiveMQServiceFactory.java:506)[197:io.fabric8.mq.mq-fabric:1.2.0.redhat-621084]
      at io.fabric8.mq.fabric.ActiveMQServiceFactory$ClusteredConfiguration.access$400(ActiveMQServiceFactory.java:318)[197:io.fabric8.mq.mq-fabric:1.2.0.redhat-621084]
      at io.fabric8.mq.fabric.ActiveMQServiceFactory$ClusteredConfiguration$1.run(ActiveMQServiceFactory.java:449)[197:io.fabric8.mq.mq-fabric:1.2.0.redhat-621084]
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_91]
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_91]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_91]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_91]
      at java.lang.Thread.run(Thread.java:745)[:1.7.0_91]
      Caused by: java.lang.IllegalArgumentException: Port value out of range: -1
      at java.net.ServerSocket.<init>(ServerSocket.java:232)[:1.7.0_91]
      at javax.net.DefaultServerSocketFactory.createServerSocket(ServerSocketFactory.java:231)[:1.7.0_91]
      at org.apache.activemq.transport.tcp.TcpTransportServer.bind(TcpTransportServer.java:136)[185:org.apache.activemq.activemq-osgi:5.11.0.redhat-621084]
      at org.apache.activemq.transport.tcp.TcpTransportFactory.doBind(TcpTransportFactory.java:56)[185:org.apache.activemq.activemq-osgi:5.11.0.redhat-621084]
      at org.apache.activemq.transport.TransportFactorySupport.bind(TransportFactorySupport.java:40)[185:org.apache.activemq.activemq-osgi:5.11.0.redhat-621084]
      at org.apache.activemq.broker.TransportConnector.createTransportServer(TransportConnector.java:315)[185:org.apache.activemq.activemq-osgi:5.11.0.redhat-621084]
      at org.apache.activemq.broker.TransportConnector.getServer(TransportConnector.java:141)[185:org.apache.activemq.activemq-osgi:5.11.0.redhat-621084]
      at org.apache.activemq.broker.TransportConnector.asManagedConnector(TransportConnector.java:107)[185:org.apache.activemq.activemq-osgi:5.11.0.redhat-621084]
      at org.apache.activemq.broker.BrokerService.registerConnectorMBean(BrokerService.java:2105)[185:org.apache.activemq.activemq-osgi:5.11.0.redhat-621084]
      ... 13 more

            Unassigned Unassigned
            rhn-support-rkieley Roderick Kieley
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: