in reply to Re: Re: Re: Problem Keeping Socket Alive
in thread Problem Keeping Socket Alive

Unfortunatly, I do not have control over the remote device. The socket is connected to a remote device server called a UDS-10 by Lantronix, this device is like an Ethernet to Serial brige, buffering output from a connected serial device (in this case a phone switch) and allowing me to collect the output over TCP/IP from port 10001 - but if I send it any data, it will disable logging on the phone switch, and I will have to turn it on again in their software. The phone switch itself is supposed to be connected to a serial printer, but I just connect it to this device, parse the data, and drop it into an Informix database.

Do you think maybe the problem is in the $line = $socket->getline; statement? Should I be using $line = <$socket>; instead?
  • Comment on Re: Re: Re: Re: Problem Keeping Socket Alive

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Problem Keeping Socket Alive
by waswas-fng (Curate) on Dec 23, 2002 at 19:11 UTC
    Just two more questions and I think I can narrow it down, 1, is there any firewall device between the UDS-10 and the logging server? (if yes brand) 2, could you get me a output of netstat for the port when it is in error state? Thanks.

    -Waswas
      Well - there is no firewall between the UDS-10 and the server. I will try to get you the netstat output by tomorrow, because it takes a while before it stops logging. Thanks in advance for all your help - I almost re-wrote the code in C++ to see if I had more luck. Here is the netstat output when it's working:
      tcp 0 0 localhost:36903 uds-10#1:10001 ESTABLISHED tcp 0 0 localhost:36939 uds-10#2:10001 ESTABLISHED
      If you want to see more detailed netstat info in my next post, let me know.
      In the meantime - what do you think the state would be after the process stops working, and how would you resolve the problem, given the netstat data?
        I don't know that I am expecting anything from netstat -- If the output has something other than ESTABLISHED than that may point to other problems, Can you check the config on the Serial->Net plug and tell me what you have set for: Inactivity Timeout: and Inactivity Timer: under the Additl settings? Default is enabled This can cause the plug to drop connections after a timeout period -- and if it does not handle this properly can leave the port on the logging server side in one of the WAIT states that can make the port apear to be used but really is just partally connected.

        -Waswas