Announcement

Collapse
No announcement yet.

LLP Sender "Connection refused" error.

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

  • LLP Sender "Connection refused" error.

    I have set up a simple channel with source as "File Reader" and destination as "LLP Sender" sending messages on port 6660. I have received the following error.
    Code:
    java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    at java.net.Socket.connect(Socket.java:516)
    at java.net.Socket.connect(Socket.java:466)
    at java.net.Socket.<init>(Socket.java:366)
    at java.net.Socket.<init>(Socket.java:208)
    at org.mule.providers.tcp.TcpMessageDispatcher.createSocket(TcpMessageDispatcher.java:103)
    at org.mule.providers.tcp.TcpMessageDispatcher.initSocket(TcpMessageDispatcher.java:76)
    at org.mule.providers.tcp.TcpMessageDispatcher.doDispatch(TcpMessageDispatcher.java:91)
    at org.mule.providers.AbstractMessageDispatcher$Worker.run(AbstractMessageDispatcher.java:257)
    at org.mule.impl.work.WorkerContext.run(WorkerContext.java:290)
    at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
    at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
    at java.lang.Thread.run(Thread.java:595)
    Following XML is my channel configuration. I am assuming that the contents of the file will be treated as the message that needs to be sent over port 6660.

    Code:
    <com.webreach.mirth.model.Channel>
      <id>fa323c0e-0025-4257-9c66-53210bc9290d</id>
      <name>Drugs_Local_PreStep</name>
      <description></description>
      <enabled>true</enabled>
      <version>1.2.0</version>
      <revision>0</revision>
      <direction>INBOUND</direction>
      <protocol>HL7</protocol>
      <mode>ROUTER</mode>
      <sourceConnector>
        <name>sourceConnector</name>
        <properties>
          <property name="sortAttribute">date</property>
          <property name="pollingFrequency">1000</property>
          <property name="DataType">File Reader</property>
          <property name="fileAge">0</property>
          <property name="moveToPattern">${ORIGINALNAME}-${UUID}</property>
          <property name="checkFileAge">0</property>
          <property name="autoDelete">1</property>
          <property name="host">D:/Mirth-1.2.0/src</property>
          <property name="moveToDirectory">D:/Mirth-1.2.0/completed</property>
        </properties>
        <transformer>
          <steps/>
        </transformer>
        <filter>
          <rules/>
        </filter>
        <transportName>File Reader</transportName>
      </sourceConnector>
      <destinationConnectors>
        <com.webreach.mirth.model.Connector>
          <name>Destination 1</name>
          <properties>
            <property name="tcpProtocolClassName">org.mule.providers.tcp.protocols.LlpProtocol</property>
            <property name="segmentEnd">0x0D</property>
            <property name="messageEnd">0x1C</property>
            <property name="keepSendSocketOpen">1</property>
            <property name="bufferSize">65536</property>
            <property name="port">6660</property>
            <property name="sendTimeout">5000</property>
            <property name="messageStart">0x0B</property>
            <property name="maxRetryCount">10</property>
            <property name="charEncoding">ascii</property>
            <property name="DataType">LLP Sender</property>
            <property name="recordSeparator">0x0D</property>
            <property name="host">127.0.0.1</property>
          </properties>
          <transformer>
            <steps/>
            <template></template>
          </transformer>
          <filter>
            <rules/>
          </filter>
          <transportName>LLP Sender</transportName>
        </com.webreach.mirth.model.Connector>
      </destinationConnectors>
      <properties>
        <property name="initialState">stopped</property>
        <property name="store_messages">true</property>
        <property name="recv_xml_encoded">false</property>
        <property name="encryptData">false</property>
        <property name="transactional">false</property>
        <property name="max_message_age">-1</property>
        <property name="error_messages_only">false</property>
      </properties>
      <preprocessingScript>// Modify the message variable below to pre process data
    
    return message;</preprocessingScript>
    </com.webreach.mirth.model.Channel>
    Any help is appreciated. Thanks.

  • #2
    Re: LLP Sender &quot;Connection refused&quot; error.

    "Connection refused" means that the endpoint can&#039;t stablish any connection: It seems that there is no receiver &#039;waiting&#039; for a message

    Comment


    • #3
      Re: LLP Sender &quot;Connection refused&quot; error.

      When I ran the
      Code:
      netstat -an
      command, I was able to see port 6661 in "listening" state for TCP protocol messages. I still don&#039;t understand what is causing the error.

      Comment


      • #4
        Re: LLP Sender &quot;Connection refused&quot; error.

        Your channel is configured for 6660, not 6661. What program do you have setup listening?

        -Chris
        Chris Lang

        Comment


        • #5
          Re: LLP Sender &quot;Connection refused&quot; error.

          I have setup another channel in Mirth for listening. That is correct, I had wrong port number. Now, I was able to send the messages from channel one to channel two through LLP.

          Thanks.

          Comment


          • #6
            Re: LLP Sender &quot;Connection refused&quot; error.

            Excellent, glad it&#039;s working!

            -Chris
            Chris Lang

            Comment

            Working...
            X