TCP Client Plugin Connection Failed

Dylan Gormley

Posted on 18.10.2017 19:11

Hello:

I am using the TCP Client Plugin to communicate with a server I have developed. When I use the "test" button in the client, my server receives and accepts the connection and immediately sends the welcome message and protocol. One the client side however, I receive the message "connection failed: failed to connect to server." The only data I'm reading that my server is receiving from the client is "disconnect."

My issue appears to be exactly like the issue described in this thread:
https://www.dewesoft.com/forum/posts/395

The issue in that thread was resolved via email, which is of no help to me. So, how was this issue solved?

Thank you

DEWESoft Support
Technical support
Posted on 19.10.2017 12:26

Hi,

I've talked with Martin who handled the issue in the original forum post and he told me that there was an issue in the customer's code that he was able to find and fix, but he did not receive the exact information as to what was wrong.

Anyway, he's prepared some special programs to help you debug. The attachment contains version 1.1.5 of the plugin and the documentation.

There is a sub-folder "Debug" which contains:

- TcpIpBinaryEmulator.exe: a small internal test-tool that is used to emulate a server (for testing the plugin),

- TcpIpBinaryClient.dll: a special debug version of the plugin which writes more logs and shows the debug controls in channel setup,

- TcpIpEmulator.pdf: a short doc that shows how to use the emulator and the debug version of the plugin

I hope this will help you to find the problem. If you'll still experience issues, you can send us some screenshots & the log-files.


Attached files:
Dylan Gormley

Posted on 23.10.2017 16:34
I have attached two screenshots.

  • In the screenshot "timeout.txt" I attempt to connect to my server using the DeweSoft TCP/IP client plugin. My accepts the connection and sends the welcome message. However, it reads "disconnect" and the returned message instead of "getProtocolVersion". The log says there's a timeout issue. I have tried timeout values of up to 5000ms, and still the same error.
  • In the screenshot "putty.jpg" I use telnet to connect to my server. PuTTY displays displays the welcome message and protocol version. So I know the correct data is being sent both ways.

I performed a tcpdump and data is successfully communicating each way. I also had a senior engineer where I work look at the problem, but even after a few hours of troubleshooting we are still unsure what the problem is. Thank you for your time.


Attached files:
Dylan Gormley

Posted on 23.10.2017 21:05

Here is wireshark captures of the data. "myserver" is my linux server. "test server" is the debug server you gave me.


Attached files:
DEWESoft Support
Technical support
Posted on 25.10.2017 09:56

Hi,

is it possible that you're not sending the correct newline suffix? I've attached an image from the manual which refers to this section.

If this is not the issue, then I have a couple of follow up questions:

  • Does it work with the simple emulator program that we have shared with you?
  • If it does, then you can use Wireshark to see the working communication between this simple emulator and the plugin.
  • If it doesn't work then please send us the log-files.

Attached files:
Dylan Gormley

Posted on 25.10.2017 17:02

Wow. That was it. I thought it was "/r" or "/n", but it's "/r/n". Geez. Thank you.

Login to reply to this topic. If you don't have account yet, you can signup for free account .