Announcement

Collapse

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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • TCP Sender: port out of range:-1

    mirth-1.7.0.3285

    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:

    mirth.log:
    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 java.net.InetSocketAddress.<init>(Unknown Source)
    at com.webreach.mirth.connectors.tcp.TcpMessageDispat cher.initSocket(TcpMessageDispatcher.java:118)
    at com.webreach.mirth.connectors.tcp.TcpMessageDispat cher.doDispatch(TcpMessageDispatcher.java:187)
    at com.webreach.mirth.connectors.tcp.TcpMessageDispat cher.doSend(TcpMessageDispatcher.java:276)
    at org.mule.providers.AbstractMessageDispatcher.send( AbstractMessageDispatcher.java:166)
    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(AbstractOutboundRouter.java:85)
    at org.mule.routing.outbound.FilteringMulticastingRou ter.route(FilteringMulticastingRouter.java:89)
    at org.mule.routing.outbound.OutboundMessageRouter$1. doInTransaction(OutboundMessageRouter.java:78)
    at org.mule.transaction.TransactionTemplate.execute(T ransactionTemplate.java:48)
    at org.mule.routing.outbound.OutboundMessageRouter.ro ute(OutboundMessageRouter.java:82)
    at org.mule.impl.model.DefaultMuleProxy.onCall(Defaul tMuleProxy.java:247)
    at org.mule.impl.model.seda.SedaComponent.doSend(Seda Component.java:209)
    at org.mule.impl.model.AbstractComponent.sendEvent(Ab stractComponent.java:277)
    at org.mule.impl.MuleSession.sendEvent(MuleSession.ja va:201)
    at org.mule.routing.inbound.InboundMessageRouter.send (InboundMessageRouter.java:161)
    at org.mule.routing.inbound.InboundMessageRouter.rout e(InboundMessageRouter.java:128)
    at org.mule.providers.AbstractMessageReceiver$Default InternalMessageListener.onMessage(AbstractMessageR eceiver.java:493)
    at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:272)
    at org.mule.providers.AbstractMessageReceiver.routeMe ssage(AbstractMessageReceiver.java:231)
    at com.webreach.mirth.connectors.file.FileMessageRece iver.processFile(FileMessageReceiver.java:236)
    at com.webreach.mirth.connectors.file.FileMessageRece iver.poll(FileMessageReceiver.java:138)
    at org.mule.providers.PollingMessageReceiver.run(Poll ingMessageReceiver.java:118)
    at org.mule.impl.work.WorkerContext.run(WorkerContext .java:290)
    at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.runTask(ThreadPoolExecutor. java:650)
    at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.run(ThreadPoolExecutor.java :675)
    at java.lang.Thread.run(Unknown Source)

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

    Didn't see the image size limitations.

    Comment


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

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

      Comment


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

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

        Comment


        • #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 1.7.0.3285 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.

          Thanks.

          Comment


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

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

            Comment


            • #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

              sigpic

              Comment


              • #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:

                Code:
                <com.webreach.mirth.model.Connector>
                      <name>Lab Out</name>
                      <properties>
                        <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">192.168.0.147</property>
                      </properties>
                      <transformer>
                        <steps/>
                        <inboundTemplate></inboundTemplate>
                        <outboundTemplate></outboundTemplate>
                        <inboundProtocol>HL7V2</inboundProtocol>
                        <outboundProtocol>HL7V2</outboundProtocol>
                        <inboundProperties>
                          <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>
                        </inboundProperties>
                        <outboundProperties/>
                      </transformer>
                      <filter>
                        <rules/>
                      </filter>
                      <transportName>TCP Sender</transportName>
                      <mode>DESTINATION</mode>
                      <enabled>true</enabled>
                    </com.webreach.mirth.model.Connector>

                Comment


                • #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

                  sigpic

                  Comment


                  • #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://192.168.0.147:6001" ...

                    Comment


                    • #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

                      Comment

                      Working...
                      X