LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP Error 61

Hi Everyone,

I am running two executables that are communicating with different bits of hardware over TCP Connections.

I am having problems with one of the executables TCP Connection to a printer.

I will be able to send commands to the printer to print labels for hours on end and then suddenly I get an error saying that the label failed to print. (I don't log that specific TCP error at the moment.)

At this point usually several other printers will all experience the same problem and stop printing.

If I close down and then restart the executable that deals with those printers, I get a TCP Error 61 (Serial port parity error or The System could not allocate the necessary memory) when I do an initial startup connection to a MySQL Database that I am using. (I'm not sure whether to believe this error or not since the PC should have plenty enough memory.)

But this means that my executable will not startup successfully.

If I stop both the executables that are communicating over TCP and restart them, I get no errors and my printers start printing labels again.

So, great labview gurus, do you think that this problem is

1. more likely to be caused by my software (and if so why)

2. a strange memory error or

3. some other funny thing happening to the network when my printer first reports an error that I have no visibility of or

4. Something completely different

Many thanks in advance for any help or advice!

Sam

Labview 7.1.1
MySQL DB 4.1.16
5 years Labview experience
0 Kudos
Message 1 of 10
(4,990 Views)
Hi Sam,

Does the intial TCP error occur after roughly the same amout of time has elapsed or is it more intermittant?

Regards

Jon B
Applications Engineer
NIUK
0 Kudos
Message 2 of 10
(4,972 Views)
Hi Jon,

Unfortunately it is quite intermittant which is why I've been having so much trouble working out what exactly is going on.

Sometimes it can be a few hours and then we encounter an error or (as last time) the programs had been running with no problems for over 5 days when they crashed.

Thanks for your help,

Sam 🙂
0 Kudos
Message 3 of 10
(4,968 Views)
Hi Sam,

What actual network configuration do you have? Are you using a server and what type of router? How much data are you actually sending accross these TCP connections?

Regards

Jon B
Applications Engineer
NIUK
0 Kudos
Message 4 of 10
(4,951 Views)
Hi Jon,
Apologies for not replying sooner, I've been trying to find out the information you've asked for but I'm waiting on someone else for all the network configuration details and they should be back to me by middle of next week.

In the meantime I have another question. Today we had another outage, giving error 61.

We have several applications running all at the same time and it appeared that once one application had reported Error 61 we could no longer access the same port on any of the other applications (hence within a few minutes all the applications were displaying error 61) but also we could not even telnet into this port until we had shutdown all the labview applications.

Is it possible that Labview was 'holding onto' this port for some reason once it had encountered Error 61?? and if it is, why would it do it and how can we make labview 'let go' sensibly?

Many Thanks for all your help.

Sam
0 Kudos
Message 5 of 10
(4,935 Views)
Hi again Sam,

Are all the applications running on the same computer? When you said:

"but also we could not even telnet into this port until we had shutdown all the labview applications"

Do you mean the local port or the remote port the applications were talking too? Are the applications trying to comunicate with the same port?

Regards

Jon B
Applications Engineer
NIUK and Ireland

Message Edited by JonBowers on 08-11-2006 05:06 AM

0 Kudos
Message 6 of 10
(4,927 Views)
Hi Jon,

Yes, all the applications are running on the same computer and the port they are trying to talk to is a local port on that computer.

To give a bit more information, the applications are all running on the Server PC which is hosting a MySQL database. The applications are all trying to talk to the same local port (127.0.0.1:3306) to gain access to the MySQL Database to run separate queries.

When I say i tried to telnet into this port, it is a diagnostic I use to try to determine if the port is open to connections. In this case instead of allowing me in, it threw back an error saying that the connection could not be opened. The connection was only allowed after I had shutdown all the labview applications that were running.

Please let me know if you need any more information, I do very much appreciate the help 🙂

Sam
0 Kudos
Message 7 of 10
(4,922 Views)
Hi Sam,

Do the applications you are running close the connections when errors occur? If they are not closing down these connections properly this could be why you are getting these problems.

Is it possible to post some of the code for these applications?

Regards


Jon B
Applications Engineer
NIUK
0 Kudos
Message 8 of 10
(4,914 Views)

Hi Jon,

I am having the same problem as in this thread, you are saying to close the connection, but its already error, I can't close the connection. Here, I can share the how I'm handling the error. The Error 61 occur at Init Connect.

Download All
0 Kudos
Message 9 of 10
(2,209 Views)

Do you think you could diagnose an error in my car if I post you an image of the indicator lamp in the dashboard?

 

Stop posting little snippets of the code that causes some errors and hope anyone could help you with that. If you can't be bothered to help the people on this forum to help you, by posting the actual code, or even better yet a small test application made to reproduce the error without all of the rest of the business logic of your application, you can't expect much of a concise help here.

 

There could be lots of possible errors. For one why are you sure the error case with the Close function is even called? Even if it is, are you sure the function that generated the error is actually passing the handle correctly back out in the error case? What function was that in the first place and what error did it generate? Lots and lots of questions that you do not even show the picture of the code for but even if you did, debugging pictures is pretty much impossible. Even if others can't run your code (as they hardly have your database setup), they can go into the code and check various things about the questions above, something nobody can do in a picture.

 

Still you will need to do more debugging yourself and provide information about the results even if you post the code too. We don't have magic crystal balls that allow us to see in your machine and discover things that you don't tell us.

Rolf Kalbermatter
My Blog
0 Kudos
Message 10 of 10
(2,202 Views)