Mirth Connect 3.12.0 Released!

Mirth Connect 3.12.0 is now available as an appliance update and on our GitHub page. This release includes database performance improvements, improves visual HL7 representation, message pruning, keystore handling, PDF generation, community contributions, and fixes several security vulnerabilities. This release also contains many improvements to commercial extensions. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

TCP Sender: port out of range:-1

  • Filter
  • Time
  • Show
Clear All
new posts

  • TCP Sender: port out of range:-1


    Created a new channel with a single TCP sender destination. Host Port is set to 6660 and I've tried both a symbolic and static IP address for Host Address (see image).

    This always gives the following errors:

    WARN 2008-02-05 16:12:05,751 [0d481a87-962e-4b2d-a644-4c32d5dbf6f7_source_connector._fileEndpoint#-2022726760.receiver.1] com.webreach.mirth.connectors.tcp.TcpMessageDispat cher: Can't connect to the endopint,waiting5.0seconds for reconnecting
    (java.lang.IllegalArgumentException: port out of range:-1)
    Error log after stopping the channel:
    ERROR-411: TCP Connector error
    ERROR MESSAGE: Unable to send message. Too many retries
    java.lang.IllegalArgumentException: port out of range:-1
    at<init>(Unknown Source)
    at com.webreach.mirth.connectors.tcp.TcpMessageDispat cher.initSocket(
    at com.webreach.mirth.connectors.tcp.TcpMessageDispat cher.doDispatch(
    at com.webreach.mirth.connectors.tcp.TcpMessageDispat cher.doSend(
    at org.mule.providers.AbstractMessageDispatcher.send(
    at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:191)
    at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:130)
    at org.mule.routing.outbound.AbstractOutboundRouter.s end(
    at org.mule.routing.outbound.FilteringMulticastingRou ter.route(
    at org.mule.routing.outbound.OutboundMessageRouter$1. doInTransaction(
    at org.mule.transaction.TransactionTemplate.execute(T
    at ute(
    at org.mule.impl.model.DefaultMuleProxy.onCall(Defaul
    at org.mule.impl.model.seda.SedaComponent.doSend(Seda
    at org.mule.impl.model.AbstractComponent.sendEvent(Ab
    at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:201)
    at org.mule.routing.inbound.InboundMessageRouter.send (
    at org.mule.routing.inbound.InboundMessageRouter.rout e(
    at org.mule.providers.AbstractMessageReceiver$Default InternalMessageListener.onMessage(AbstractMessageR
    at org.mule.providers.AbstractMessageReceiver.routeMe ssage(
    at org.mule.providers.AbstractMessageReceiver.routeMe ssage(
    at com.webreach.mirth.connectors.file.FileMessageRece iver.processFile(
    at com.webreach.mirth.connectors.file.FileMessageRece iver.poll(
    at .java:290)
    at eadPoolExecutor$Worker.runTask(ThreadPoolExecutor. java:650)
    at eadPoolExecutor$ :675)
    at Source)

  • #2
    Re:TCP Sender: port out of range:-1

    Didn't see the image size limitations.


    • #3
      Re:TCP Sender: port out of range:-1

      That is weird! Attach your mule-config.xml from /conf please.
      Chris Lang


      • #4
        Re:TCP Sender: port out of range:-1

        Here you go. Thanks.
        mule_config-da825f135492dc09b18072b1a6626595.xml (3069 bytes)


        • #5
          Re:TCP Sender: port out of range:-1

          This error occurred on a Vista/Business system. I thought that Vista might be the cause of the problem so I did a fresh install of on XP-SP2. I received the same 'port out of range:-1' errors on XP.

          Are there restrictions on the ports that can be used with TCP Sender? Is there some other configuration issue I'm missing? Please advise.



          • #6
            Re:TCP Sender: port out of range:-1

            Do u have any firewall/virus scanner running? They might be blocking ports.


            • #7
              Re:TCP Sender: port out of range:-1

              The config you posted doesn't have a channel deployed in it...are you getting any other errors when saving, deploying, etc.?
              Jacob Brauer
              Director, Software Development
              NextGen Healthcare



              • #8
                Re:TCP Sender: port out of range:-1

                jacobb wrote:
                The config you posted doesn't have a channel deployed in it...are you getting any other errors when saving, deploying, etc.?
                Saving and deployment work fine. The error occurs when a message is processed. The source channel transformer (which converts XML to HL7) works, but there are two destination TCP Sender channels that both fail with the same 'port out of range:-1' error.

                It does not appear to be a firewall or virus protection problem. It's like the port value in the configuration is not being read correctly. Here's one of the destination connectors:

                      <name>Lab Out</name>
                        <property name="replyChannelId">sink</property>
                        <property name="keepSendSocketOpen">0</property>
                        <property name="bufferSize">65536</property>
                        <property name="port">6660</property>
                        <property name="binary">0</property>
                        <property name="sendTimeout">5000</property>
                        <property name="maxRetryCount">5</property>
                        <property name="DataType">TCP Sender</property>
                        <property name="usePersistentQueues">0</property>
                        <property name="ackTimeout">5000</property>
                        <property name="reconnectMillisecs">1000</property>
                        <property name="channelName">None</property>
                        <property name="charsetEncoding">DEFAULT_ENCODING</property>
                        <property name="template">${message.rawData}</property>
                        <property name="host"></property>
                          <property name="useStrictParser">false</property>
                          <property name="convertLFtoCR">false</property>
                          <property name="encodeEntities">true</property>
                          <property name="handleRepetitions">false</property>
                          <property name="useStrictValidation">false</property>
                      <transportName>TCP Sender</transportName>


                • #9
                  Re:TCP Sender: port out of range:-1

                  Your channels are not deploying correctly if the config you posted is accurate. That config has no channels deployed, from what I can see...

                  Post edited by: jacobb, at: 03/12/2008 16:13
                  Jacob Brauer
                  Director, Software Development
                  NextGen Healthcare



                  • #10
                    Re:TCP Sender: port out of range:-1

                    Problem solved. I thought I had tested this before, but I guess not... You can not use symbol names for the Host Address in a TCP Sender. This

                    <endpoint address="tcp://DTS_147:6001" ...
                    is not parsed correctly -- thus the -1 for the port number, whereas this is OK:

                    <endpoint address="tcp://" ...


                    • #11
                      Re:TCP Sender: port out of range:-1

                      I wanted set the endpoint address dynamically , since my endpoint IP and Port changes every time the request comes on tcp reader, is it possible to change the tcp endpoint port dynamically, actaually we have to implement the synchronization i am trying to get channelMap.get('receiverSocket') and from it i am getting the IP and Port of client sending the request, now i want to use this IP and Port for the destination of my another channel. i am getting the values in destination mapping ${IpVal},${portval}. but Host Address: ${IpVal} and Host Port ${portval} got saved in conf/mule-config.xml , and not picking the dynamic values,

                      Post edited by: arunjassiar, at: 01/01/2009 23:21