Filtering TCP connections on Solaris 9 and 10

I need to develop a driver to filter TCP packets on Solaris 9 and 10. My understanding is that I need to develop a STREAMS module to do this. Searching the forums and reading the docs it does NOT look like a STREAMS module can be inserted between IP and TCP in the stack. Instead it looks like I have to insert my module between the NIC driver and the IP stack. Is that correct? Is there an alternative interface (hook) in the IP stack that would allow me access to TCP packets?
Assuming STREAMS is the way to go, can anyone point me to some example code to get a jump start on this project?
Thanks in advance for your time and feedback
Tom Fortmann
Xcape Solutions

Hello Aerosmith,
On Solaris 9, do you see any window with a progress bar at Adobe Reader startup saying "Adding font folders to cache"? I assume you're launching Adobe Reader without any document from commandline -- approx how many seconds does it take for Adobe Reader to launch?
Thanks,
Gaurav

Similar Messages

  • Tcp data b/w labview and c++

    Hi
     i am trying to establish TCP connection b/w LABVIEW and C++ program. Server is established in C++ while client is implemented in labview.Although connection is successfully establish b/w server and client, both are unable to correctly understand data send/receive among them. Forexample if i want to send an int type send_array from server, i use standard WINSOCK function "send" like that:
    send(AcceptSocket,(char*)send_array,129*4,0);
    but when client in labview receive this array, it shows unexpected values.As a client, I used "simple data client.vi"  with one modification i.e. as sent data size(129*4 bytes) was fixed, only one TCP read was used . 
    Same problem exists if i send data from client to server.
    Kindly help me
    Best Regards
    Solved!
    Go to Solution.

    It's probably an big/little edian problem. If you are using the Flatten/Unflatten from String functions, you can specify which to use.

  • TCP connection error when sending MODBUS commands to WAGO 750-881 controller after 113655 bytes of data have been sent

    Hi all,
    I am new to the world of labview and am attempting to build a VI which sends commands to a 750-881 WAGO controller at periodic intervals of 10ms. 
    To set each of the DO's of the WAGO at once I therefore attempt to send the Modbus fc15 command every 10ms using the standard Labview TCP write module. 
    When I run the VI it works for about a minute before I recieve an Error 56 message telling me the TCP connection has timed out. Thinking this strange, I decided to record the number of bytes sent via the TCP connection whilst running the program. In doing so I noticed that the connection broke after exactly 113655 Bytes of data had been sent each time. 
    Thinking that I may have been sending too many messages I increased the While-loop delay from 10ms to 20, 100 and 200 ms but the error remained. I also tried playing with the TCP connection timeout and the TCP write timeout but neither of these had any effect on the problem. 
    I cannot see why this error is occuring, as the program works perfectly up untill the 113655 Bytes mark. 
    I have attached a screenshot of the basic VI (simply showing a MODBUS command being sent every second) and of a more advanced VI (where I am able to control each DO of the WAGO manually by setting a frequency at which the DO should switch between ON and OFF). 
    If anybody has any ideas on where the problems lie, or what I could do to further debug the program this would be greatly appreciated. 
    Solved!
    Go to Solution.
    Attachments:
    Basic_VI.png ‏84 KB
    Expanded_VI.png ‏89 KB

    AvdLinden wrote:
    Hi ThiCop,
    Yes the error occurs after exactly 113655 bytes every time. The timeout control I would like to use is 10ms, however even increasing this to 1s or 10s does not remove the error, which leads me to believe that this is not the issue (furthermore, not adding any delay to the while loop, thus letting it run at maximum speed, has shown that the TCP connection is able to send all 113655 bytes in under 3 seconds again pointing towards the timeout control not being the issue here). 
    I attempted Marco's suggestion but an having difficulty translating the string returned into a readable string, (rightnow the response given is "      -#   +   ").
    As to your second suggestion, I implemented something similar where I created a sub VI to build a TCP connection, send a message and then close the connection. I now build each message and then send the string to this subVI which successfully sends the command to my application. Whilst not being the most elegant method of solving the issue, it has resolved the timeout problem meaning I am able to send as many commands as I want. So in that sense the problem has been solved. 
    If you still have tips on how to correctly read the TCP read output, I would however like to see if I could not get my first program to work as it is slightly more robust in terms of timing. 
    Modbus TCP RTU is a binary protocol, as you show in your Basic VI, where you format the data stream using byte values. So you have to interprete the returned answer accordingly with the Modbus RTU spec in hand. Now what is most likely happening is that the connection gets hung after a while since you do NOT read the data the device sends as response to your commands. The TCP/IP stack buffers those bytes and at some point the internal buffers overflow and the connection is blocked by the stack. So adding the TCP Read at strategic places (usually after each write) is the proper solution for this. Is there any reason that you didn't use the NI provided Modbus TCP library?
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • SbRIO-9612 unable to close a TCP connection without causing TCP failure

    Hello,
    I'm working on a multi-server (sbRIO-9612's), multi-client (Windows PCs) application which uses the STM 2.0 libraries and LV2009 SP1.  The server listens on a UDP port for the client to send a message - once sent, the server opens the TCP connection to the client and all is well . . .
    . . . until I added a "hearbeat" message to monitor for down connections.  Once the TCP connection has been extablished, the client PC sends a TCP message (a request for the number of clients connected) to the server sbRIO-9612 every 5 seconds - both the client and server are coded to close the connection if a message is not received within 10 seconds.  The client-side app works fine - if the TCP message is not returned in 10 seconds, the connection is closed and a new UDP message is sent to re-establish it.
    The server-side is the problem - if no message is received in 10 seconds, the TCP connection is closed o.k. (no errors), but the server will no longer allow new TCP connections to be established unless it's rebooted.  It seems to work fine if I leave the non-communicating TCP connections open on the server-side, but I can see this leading to problems after several clients have disconnected without notifying the server properly.
    Interestingly, if the client closes the TCP connection properly (via TCP Close in LV), the server detects it fine and there is no problem.
    I'm allowing the operating system on both sides to select the TCP port to use.
    Any help is greatly appriciated - thank you!
    Al

    Hi Al,
    Thanks for the update -- I'm glad that you were able to find that the issue wasn't actually with the TCP VIs, and moreover that LabVIEW 2010 SP1 seems to have resolved the issue. I would still recommend combing through the code on the RT end to ensure that the LabVIEW 2010 SP1 upgrade really did 'fix' the underlying issue. It's somewhat strange that a version upgrade resolved TCP communication issues that you were having. I just want to be sure that the solution is a truly stable one.
    Sanjay C.
    Embedded Software Product Manager| National Instruments

  • Java Application Server 9 - TCP connections

    I have installed Sun Java Application Server 9 and I see that the java process that is started has a lot (more than 30) of TCP connections with a local and a remote address that are both the hostname of the machine that run JAS.
    Can someone tell me what are these connections and if there is a way to decrease the amount of these connections?
    Thank you

    I have installed Sun Java Application Server 9 and I see that the java process that is started has a lot (more than 30) of TCP connections with a local and a remote address that are both the hostname of the machine that run JAS.
    Can someone tell me what are these connections and if there is a way to decrease the amount of these connections?
    Thank you

  • Monitor/capture tcp data between a server and client

    Hi
    I am doing a server/client TCP connection between my laptop and another computer running the server program. With my client program I am able to send commands to the server to which it reacts. However I do not know what the commands are (I just press a button in the client GUI and the command is sent), so my initial thought was that, maybe I was able to monitor/capture the strings/bytes/integers commands, which is send over the TCP/IP. There are only these two computers on the network, so no problem in other traffic there. FYI, they are connected with a wireless peer-to-peer connection.
    My problem comes from the manufature of the software making a crabby manual, so really the commands in the manual, which I was supposed to send with my own TCP vi, are just impossible to understand, and don't get me started with their support :-)
    SO, any suggestions if it is possible to capture what is sent over the TCP when I press a button in my client GUI?
    LabVIEW 8.6 / 2009 / 2010
    Vision Development Module 8.6 / 2009 / 2010
    VBAI 3.6 / 2010

    Matthew Williams wrote:
    Wireshark, http://www.wireshark.org , will capture data off the network and sort/display/categorize.
    I don't know how well it will work in a wireless environment, we usually use a wired hub (not switch).
    Matt
    Hi Matt
    I have just tried Wireshark, I get a lot of data, so I just have to use a bit of time figuring out what is what, but good program to monitor the LAN connection also wireless. I can monitor all the packages between the client and server. It looks like there is a bunch of data just from keeping the connection active, but again I have to dig a bit deeper before I can say anymore:-)
    MikeS81 wrote:
    Hi SCMAJA,
    another way is to build your own TCP/IP Server with LabView and receive with it the commands send with your client program.
    Mike
    Hi Mike
    Yeah I tried that right now using the TCP Communicator - Passive example, unfortunately the connection between the client and server is kept alive using some commands, so the only command I can get to read is the connect command, because the client then refuses the connection because there is no "right" answer/repsonse from the server :-(
    edit:
    I just got in touch with the support, and got some of the commands to work. I had to make some crazy command with a header first, then size and last my command, all converted from DEC to HEX.. Not easy to figure out :-)
    Message Edited by SCMAJA on 02-08-2008 04:29 PM
    LabVIEW 8.6 / 2009 / 2010
    Vision Development Module 8.6 / 2009 / 2010
    VBAI 3.6 / 2010

  • Sharing a TCP Connection

    I have an embedded processor that opens a TCP socket to a program running on a web server and dumps real time measurements on to the server. I am trying to design an applet that opens a TCP connection to this program and thus gain access to the information dumped by the embedded system. This works fine for a single applet. But when I try doing it with several applets at a time, I run into trouble since all these applets try to read from the socket to the processor.
    My question is how do you share a single open TCP connection for reading?
    Thanks in advance.
    Prathap

    There is absolutely nothing that stops one from connecting to a single server using multiple sockets from a single application.
    So you doing something wrong in your socket code.

  • TCP IP connection From Solaris to Window?

    Hello Friends,
                           I have SCM installed on Solaris OS,and SCM optimizer installed on WIndow OS.I need to Connect SCM Solaris to SCM window, Thought RFC type TCP/ip Connection.
    For Example  In Solaris SCM for TCP/IP-Program name is d:\apo\opt\ctm\bin\ctmsvr.exe and Host is Window SCM host name.
    i need to know whether this Connection will work or If does not work Please Give the any Solution Friends.

    Thank you all. I found an example in the internet http://documentation.softwareag.com/Crossvision/sap231/pages/drfc2rpc.htm. The situation force me to overpass my laziness and to use RFC
    Yours sincerely,
    Nguyen Hai Long

  • How to set TCP connection timeout in solaris 9

    Hello All,
    I am new to solaris. While using oracle, sometimes I face tcp connection timeout.
    The timeout happens after a long delay like more than 8 min. I want to reduce the tcp connection timeout to 2 min in solaris.
    Please help me to change this setting.
    My current configuration is
    SunOS testmachine 5.9 Generic_122300-13 sun4u sparc SUNW,Sun-Fire-V440
    Thanks
    Purushoth

    There's a fair amount of tunables. Without known what is timing out (dns, lost packet...), it's hard to say what you want to tweak. The list of parameters can be seen by using ndd:
    ndd /dev/tcp \?
    or
    ndd /dev/ip \?
    and can be set by using ndd -set (see ndd(1M) ). Note that anything you set has to be reset on reboot, so you have to stick this in a script somewhere, or know what the variable translates to to stick it into /etc/system.
    -r

  • TCP connection for DHCP failover frequently are broken in Solaris 10

    Hi
    We have two dhcp servers which are installed in Solaris 10 and set to a failover pair. Currently, we can find that tcp connection for dhcp failover protocol are frequently broken. It looks like that primary dhcp server initiatively send FIN message to secondary one but in general, this tcp connection should always keep alive. On the other hand, the tcp connection can not completely be closed right now which FIN_WAIT_2 status in Primary one and CLOSE_WAIT status in secondary would last for a long time.
    Will Solaris 10 cause this fault? Is it a known bug in OS?
    OS info:
    -bash-3.00$ cat /etc/release
    Solaris 10 5/08 s10s_u5wos_10 SPARC
    Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
    Use is subject to license terms.
    Assembled 24 March 2008
    -bash-3.00$
    -bash-3.00$
    -bash-3.00$ uname -a
    SunOS edns1 5.10 Generic_142900-03 sun4v sparc SUNW,Netra-T5220
    TCP connection info:
    Primary DHCP Server:
    2012 08 29 03:41:43
    PING 172.25.6.137: 56 data bytes 64 bytes from edns2 (172.25.6.137): icmp_seq=0. time=0.678 ms
    remote refid st t when poll reach delay offset disp
    ==============================================================================
    *idns1           195.26.151.151   3 u   45 1024  377     0.75   -0.071    0.05
    +idns2           195.26.151.151   3 u  162 1024  377     0.93    0.169    0.08
    clusternode1-pr 0.0.0.0 16 - - 1024 0 0.00 0.000 16000.0
    +clusternode2-pr idns1            4 u  406 1024  376     0.49   -0.154   15.12
    172.25.6.133.647 172.25.6.137.58107 49640 0 49640 0 ESTABLISHED
    172.25.6.133.647 *.* 0 0 49152 0 LISTEN
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    2012 08 29 03:41:47
    PING 172.25.6.137: 56 data bytes 64 bytes from edns2 (172.25.6.137): icmp_seq=0. time=0.535 ms
    remote refid st t when poll reach delay offset disp
    ==============================================================================
    *idns1           195.26.151.151   3 u   49 1024  377     0.75   -0.071    0.05
    +idns2           195.26.151.151   3 u  166 1024  377     0.93    0.169    0.08
    clusternode1-pr 0.0.0.0 16 - - 1024 0 0.00 0.000 16000.0
    +clusternode2-pr idns1            4 u  410 1024  376     0.49   -0.154   15.12
    172.25.6.133.647 172.25.6.137.58107 49640 0 49640 0 FIN_WAIT_2
    172.25.6.133.647 *.* 0 0 49152 0 LISTEN
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Secondary DHCP Server:
    2012 08 29 03:41:41
    PING 172.25.6.133: 56 data bytes 64 bytes from edns1 (172.25.6.133): icmp_seq=0. time=1.26 ms
    remote refid st t when poll reach delay offset disp
    ==============================================================================
    *idns1           195.26.151.151   3 u  450 1024  377     0.92   -0.067    0.06
    +idns2           195.26.151.151   3 u  552 1024  377     0.96    0.237    0.08
    +clusternode1-pr idns1            4 u  360 1024  377     1.85   -0.528    1.51
    clusternode2-pr 0.0.0.0 16 - - 1024 0 0.00 0.000 16000.0
    172.25.6.137.647 *.* 0 0 49152 0 LISTEN
    172.25.6.137.58107 172.25.6.133.647 49640 0 49640 0 ESTABLISHED
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    2012 08 29 03:41:45
    PING 172.25.6.133: 56 data bytes 64 bytes from edns1 (172.25.6.133): icmp_seq=0. time=1.36 ms
    remote refid st t when poll reach delay offset disp
    ==============================================================================
    *idns1           195.26.151.151   3 u  454 1024  377     0.92   -0.067    0.06
    +idns2           195.26.151.151   3 u  556 1024  377     0.96    0.237    0.08
    +clusternode1-pr idns1            4 u  364 1024  377     1.85   -0.528    1.51
    clusternode2-pr 0.0.0.0 16 - - 1024 0 0.00 0.000 16000.0
    172.25.6.137.647 *.* 0 0 49152 0 LISTEN
    172.25.6.137.58107 172.25.6.133.647 49640 0 49640 0 CLOSE_WAIT
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Thanks!

    Thanks, but had found a previous discussion with this hint and applied it.
    svccfg -s sendmail listprop shows config /local_only = false
    Yes, I would really love to fix the fault, but what I would really like is some hints as to how to debug ports under svc control.

  • Solaris Kernel and TCP/IP Tuning Parameters (Continued)

    This page describes some configuration optimizations for Solaris hosts running ATG Page Serving instances (application servers) that will increase server efficiency.
    Note that these changes are specific to Solaris systems running ATG application servers (+page serving+ instances). Do not use these on a web server or database server. Those systems require entirely different settings.
    h3. Solaris 10 Kernel
    Adjust /etc/system (parameters below) and reboot the system.
    set rlim_fd_cur=4096
    set rlim_fd_max=4096
    set tcp:tcp_conn_hash_size=32768
    set shmsys:shminfo_shmmax=4294967295
    set autoup=900
    set tune_t_fsflushr=1h4. Set limits on file descriptors
    {color:blue}set rlim_fd_max = 4096{color}
    {color:blue}set rlim_fd_cur = 4096{color}
    Raise the file-descriptor limits to a maximum of 4096. Note that this tuning option was not mentioned in the "Sun Performance And Tuning" book.
    [http://download.oracle.com/docs/cd/E19082-01/819-2724/chapter2-32/index.html]
    h4. Increase the connection hash table size
    {color:blue}set tcp:tcp_conn_hash_size=8192{color}
    Increase the connection hash table size to make look-up's more efficient. The connection hash table size can be set only once, at boot time.
    [http://download.oracle.com/docs/cd/E19455-01/816-0607/chapter4-63/index.html]
    h4. Increase maximum shared memory segment size
    {color:blue}set shmsys:shminfo_shmmax=4294967295{color}
    Increase the maximum size of a system V shared memory segment that can be created from roughly 8MB to 4GB.
    This provides an adequate ceiling; it does not imply that shared memory segments of this size will be created.
    [http://download.oracle.com/docs/cd/E19683-01/816-7137/chapter2-74/index.html]
    h4. Increase memory allocated for dirty pages
    {color:blue}set autoup=900{color}
    Increase the amount of memory examined for dirty pages in each invocation and frequency of file system synchronizing operations.
    The value of autoup is also used to control whether a buffer is written out from the free list. Buffers marked with the B_DELWRI flag (which identifies file content pages that have changed) are written out whenever the buffer has been on the list for longer than autoup seconds. Increasing the value of autoup keeps the buffers in memory for a longer time.
    [http://download.oracle.com/docs/cd/E19082-01/819-2724/chapter2-16/index.html]
    h4. Specify the time between fsflush invocations
    Specifies the number of seconds between fsflush invocations.
    {color:blue}set tune_t_fsflushr=1{color}
    [http://download.oracle.com/docs/cd/E19082-01/819-2724/chapter2-105/index.html]
    Again, note that after adjusting any of the preceding kernel parameters you will need to reboot the Solaris server.
    h3. TCP
    ndd -set /dev/tcp tcp_time_wait_interval 60000
    ndd -set /dev/tcp tcp_conn_req_max_q 16384
    ndd -set /dev/tcp tcp_conn_req_max_q0 16384
    ndd -set /dev/tcp tcp_ip_abort_interval 60000
    ndd -set /dev/tcp tcp_keepalive_interval 7200000
    ndd -set /dev/tcp tcp_rexmit_interval_initial 4000
    ndd -set /dev/tcp tcp_rexmit_interval_max 10000
    ndd -set /dev/tcp tcp_rexmit_interval_min 3000
    ndd -set /dev/tcp tcp_smallest_anon_port 32768
    ndd -set /dev/tcp tcp_xmit_hiwat 131072
    ndd -set /dev/tcp tcp_recv_hiwat 131072
    ndd -set /dev/tcp tcp_naglim_def 1h4. Tuning the Time Wait Interval and TCP Connection Hash Table Size
    {color:blue}/usr/sbin/ndd -set /dev/tcp tcp_time_wait_interval 60000{color}
    The tcp_time_wait_interval is how long a connection stays in the TIME_WAIT state after it has been closed (default value 240000 ms or 4 minutes). With the default setting, this socket will remain for 4 minutes after you have closed the FTP connection. This is normal operating behavior. It is done to ensure that any slow packets on the network will arrive before the socket is completely shutdown. As a result, a future program that uses the same socket number won't get confused upon receipt of packets that were intended for the previous program.
    On a busy Web server a large backlog of connections waiting to close could build up and the kernel can become inefficient in locating an available TCP data structure. Therefore it is recommended to change this value to 60000 ms or 1 minute.
    h4. Tuning the maximum number of requests per IP address per port
    {color:blue}ndd -set /dev/tcp tcp_conn_req_max_q 16384{color}
    {color:blue}ndd -set /dev/tcp tcp_conn_req_max_q0 16384{color}
    The {color:blue}tcp_conn_req_max_q{color} and {color:blue}tcp_conn_req_max_q0{color} parameters are associated with the maximum number of requests that can be accepted per IP address per port. tcp_conn_req_max_q is the maximum number of incoming connections that can be accepted on a port. tcp_conn_req_max_q0 is the maximum number of “half-open” TCP connections that can exist for a port. The parameters are separated in order to allow the administrator to have a mechanism to block SYN segment denial of service attacks on Solaris.
    The default values are be too low for a non-trivial web server, messaging server or directory server installation or any server that expects more than 128 concurrent accepts or 4096 concurrent half-opens. Since the ATG application servers are behind a DMZ firewall, we needn't starve these values to ensure against DOS attack.
    h4. Tuning the total retransmission timeout value
    {color:blue}ndd -set /dev/tcp tcp_ip_abort_interval 60000{color}
    {color:blue}tcp_ip_abort_interval{color} specifies the default total retransmission timeout value for a TCP connection. For a given TCP connection, if TCP has been retransmitting for tcp_ip_abort_interval period of time and it has not received any acknowledgment from the other endpoint during this period, TCP closes this connection.
    h4. Tuning the Keep Alive interval value
    {color:blue}ndd -set /dev/tcp tcp_keepalive_interval 7200000{color}
    {color:blue}tcp_keepalive_interval{color} sets a probe interval that is first sent out after a TCP connection is idle on a system-wide basis.
    If SO_KEEPALIVE is enabled for a socket, the first keep-alive probe is sent out after a TCP connection is idle for two hours, the default value of the {color:blue}tcp_keepalive_interval{color} parameter. If the peer does not respond to the probe after eight minutes, the TCP connection is aborted.
    The {color:blue}tcp_rexmit_interval_*{color} values set the initial, minimum, and maximum retransmission timeout (RTO) values for a TCP connections, in milliseconds.
    h4. Tuning the TCP Window Size
    {color:blue}/usr/sbin/ndd -set /dev/tcp tcp_xmit_hiwat 65535{color}
    {color:blue}/usr/sbin/ndd -set /dev/tcp tcp_recv_hiwat 65535{color}
    Setting these two parameters controls the transmit buffer and receive window. We are tuning the kernel to set each window to 65535 bytes. If you set it to 65536 bytes (64K bytes) or more with Solaris 2.6, you trigger the TCP window scale option (RFC1323).
    h4. Tuning TCP Slow Start
    {color:blue}/usr/sinb/ndd -set /dev/tcp tcp_slow_start_initial 4{color}
    tcp_slow_start_initial is the number of packets initially sent until acknowledgment, the congestion window limit.
    h4. Tuning the default bytes to buffer
    {color:blue}ndd -set /dev/tcp tcp_naglim_def 1{color}
    {color:blue}tcp_naglim_def{color} is the default number of bytes to buffer. Each connection has its own copy of this value, which is set to the minimum of the MSS for the connection and the default value. When the application sets the TCP_NODELAY socket option, it changes the connection's copy of this value to 1. The idea behind this algorithm is to reduce the number of small packets transmitted across the wire by introducing a short (100ms) delay for packets smaller than some minimum.
    Changing the value of tcp_naglim_def to 1 will have the same effect (on connections established after the change) as if each application set the TCP_NODELAY option.
    {note}
    The current value of any of the TCP parameters can be displayed with the command ndd get. So to retrieve the current setting of the {color:blue}tcp_naglim_def parameter{color}, simply execute the command:\\
    {color:blue}ndd -get /dev/tcp tcp_naglim_def{color}
    {note}
    h3. References
    Solaris Tunable Parameters Reference Manual
    [http://download.oracle.com/docs/cd/E19455-01/816-0607/index.html]
    WebLogic Server Performance and Tuning
    [http://download.oracle.com/docs/cd/E11035_01/wls100/perform/OSTuning.html]

    For example,
    Socket.setSoTimeout() sets SO_TIMEOUT option and I
    want to what TCP parameter this option corresponds in
    the underlying TCP connection.This doesn't correspond to anything in the connection, it is an attribute of the API.
    The same questions
    arises fro other options from SocketOptions class.setTcpNoDelay() controls the Nagle algorithm. set{Send,Receive}BufferSize() controls the local socket buffers.
    Most of this is quite adequately described in the javadoc actually.

  • ASA 5505:Static Routing and Deny TCP connection because of bad flag

    Hi Everybody,
    I have a problem. I made a VPN site-2-site with 2 ASA 5505. The VPN works great. And I create a redondant link if the VPN failed.
    In fact, I use Dual ISP with route tracking. If the VPN fails, the default route change to an ISDN router, situated on the inside interface.
    When I simulated a VPN fail, the ASAs routes switch automatically on backup ISDN routers. If I ping elements, it works great. But when i try TCP connection like telnet, the ASAs deny connections:
    %PIX|ASA-6-106015: Deny TCP (no connection) from 172.16.10.57/35066 to 172.16.18.1/23 flags tcp_flags on interface interface_name.
    the security appliance discarded a TCP packet that has no associated connection in the security appliance connection table. The security appliance looks for a SYN flag in the packet, which indicates a request to establish a new connection. If the SYN flag is not set, and there is not an existing connection, the security appliance discards the packet.
    thanks!
    EDIT: On the schema, The interface of the main asa is 172.16.18.148...

    Check if the xlate timer is set greater than or equal to what the conn timer, so as not to have connections waiting on xlates that no longer exist. To minimize the number of attempts, enable "service resetinbound" . The PIX will reset the connection and make it go away. Without service resetinbound, the PIX Firewall drops packets that are denied and generates a syslog message stating that the SYN was a denied connection.

  • Opening and closing Multiple TCP connection​s issues

    Hi all I am having an issue with the TCP VI’s and wondering if anyone has experienced this issue.
    My application is required to scan 50-100 IP addresses (statically assigned) and discover if an Ethernet device is connect at that IP address. Currently I am able to achieve this by opening a TCP connection and testing the error cluster to determine if a timeout has occurred (no timeout error  means Ethernet device available at the IP address). I then ensure that the TCP connections are closed.
    The issue I am have is that I require a 1 second delay between the  TCP open and the TCP close which significantly slows down the process. Without the 1 second delay the vi successfully connects to the device once then fails to make any TCP connect regardless of the time delay until the PC is reset.  
    If anyone has any advice I would be very grateful
    David Barr
    P.S. I have attached a simplified section of code showing this issue
    Attachments:
    TCP Open close issue.vi ‏15 KB

    smercurio_fc wrote:
    If I understand you correctly you want the time delay to be 1 second if there's a successful connection....
    While I don't have a specific answer for this problem. I want to clarify for him. I believe the issue is, what if all connections ARE there? That means you keep returning a wait of 1 second 50-100 times so It takes 50-100 seconds just to initialize. I think the user is looking for a way to check for valid connections, but do so in such a way that eliminates the need for a wait which is greatly slowing things down.
    CLA, LabVIEW Versions 2010-2013

  • TCP Socket connection in CLOSE_WAIT status and not getting closed

    I am facing an issue with the TCP socket connections not getting closed and they are in CLOSE_WAIT status for ever.
    As a part of batch process in our application, emails are sent with 4 embedded images. These images are downloaded from 3rd party site with IP say "UUU.XXX.YYY.ZZZ"
    The images are embedded to email as follows
    1. An URL object is created with the site url.
    URL urlPhoto = new
    URL("http://UUU.XXX.YYY.ZZZ/email/photos.jpg");
    2.     The image cid is created with the URL object and the image name
    HtmlEmail htmlEmail = new HtmlEmail();
    String cid1 = htmlEmail.embed(urlPhoto,
    "photo.jpg");
    3.     The image cid is added to the email template by replacing the ${cid1} and the email is sent.
    <td valign="top">
                   <img src="cid:${cid1}" width="279" height="274">
              </td>
    When a mail is sent, 4 new TCP connections are opened and are put in CLOSE_WAIT status for ever. For every mail sent 4 new connections are opened. In UNIX there is an upper limit on the number of open file handles (defaults to 1024) at any point of time. The open TCP connection has the underlying socket in CLOSE_WAIT status and is not getting closed at all. When the upper limit (1024) is reached the batch process is throwing the following exception and terminates.
    Caused by: com.inet.tds.ap: java.net.SocketExceptionjava.net.SocketException: Too many open files
    at com.inet.tds.am.a(Unknown Source)
    at com.inet.tds.TdsDriver.a(Unknown Source)
    at com.inet.tds.TdsDriver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(DriverManager.java:525)
    at java.sql.DriverManager.getConnection(DriverManager.java:171)
    at com.hcomemea.batchprocess.dataaccess.database.BaseJdbcDao.openConnection(BaseJdbcDao.java:106)
    ... 12 more
    When I run the command lsof in UNIX which list the open file handles in the system
    $ /usr/sbin/lsof -p 22933 -i | grep CLOSE_WAIT
    java 22933 build_master 297u IPv6 129841943 TCP integration.com:47929->UUU.XXX.YYY.ZZZ:http (CLOSE_WAIT)
    java 22933 build_master 298u IPv6 129841947 TCP integration.com:47933->UUU.XXX.YYY.ZZZ:http (CLOSE_WAIT)
    java 22933 build_master 299u IPv6 129841950 TCP integration.com:47936->UUU.XXX.YYY.ZZZ:http (CLOSE_WAIT)
    java 22933 build_master 300u IPv6 129841970 TCP integration.com:47952->UUU.XXX.YYY.ZZZ:http (CLOSE_WAIT)
    ���list of 935 connections similarly�
    I tried 2 solutions
    1. Got the HttpURLConnection from the URL object and invoked disconnect method on the same. But it doesn�t work.
    2. Ran the batch process java program with the parameter �Dhttp.keepAlive=false to close the underlying connection but didn�t help.
    I need the underlying sockets to be closed and not put in CLOSE_WAIT status after sending the mail.
    Is it the problem with the embed method of HtmlEmail object not closing the underlying socket connection.
    If anyone has faced this issue before, kindly let me know the possible solutions for the same ASAP.
    Thank you,
    Ramesh G

    This sounds more like a problem due to connection pooling at middle tier/application server.
    If that has been ruled out, then you might to enable DCD or set expiry time on the server.

  • TCP connection in labview and C program

    Hi there,
    I have a server program written in C and running under linux, it
    accept connection from client and send series of data to client
    through TCP socket. I was using the "simple data client.vi" as the
    client.
    I tried to send integer number 1, 2,3.. , but the client failed to
    correctly decode the data since it read everything as string. I was
    wondering if there is a solution to read binary data in labview TCP
    connection? I really don't want to encode the double into string and
    send it to client through TCP socket in my server program, since it's
    not efficient.
    thanks !

    > I have a server program written in C and running under linux, it
    > accept connection from client and send series of data to client
    > through TCP socket. I was using the "simple data client.vi" as the
    > client.
    > I tried to send integer number 1, 2,3.. , but the client failed to
    > correctly decode the data since it read everything as string. I was
    > wondering if there is a solution to read binary data in labview TCP
    > connection? I really don't want to encode the double into string and
    > send it to client through TCP socket in my server program, since it's
    > not efficient.
    > thanks !
    >
    The string is often used in LV as a general buffer. Type Cast the
    string as the appropriate integer and it should be fine. If the integer
    has been transmitted in litt
    le endian byte order, you will need to use
    the Advanced byte and word swapping functions in LV in order to reorder
    the integer contents -- LV always assumes big-endian binary format.
    Greg McKaskle

Maybe you are looking for

  • Cant update to Ios 4.3

    Why? I get an error (forget) but its began with a '3'. So i cant update. During the update i was called by a people. But i dont think that can be the problem. Plz anyone help me i want new IOS!

  • Imessage crashes upon enabling

    Hello, My iMessages on my Mac opens but when it asks to be enabled into a conversation, it crashes and gives me this error report Process:         Messages [51493] Path:            /Applications/Messages.app/Contents/MacOS/Messages Identifier:      c

  • If I buy a new iMac...

    ...will I have to buy all new software? I publish several magazines and produce movies (HD with a Panasonic HPX170). I am now using a seven-year-old G5 (PowerMac) with Adobe CS4 InDesign, Photoshop, Illustrator, Premier, GoLive, etc.; MS Office X; Fi

  • AG IN Partner Determination

    How to get back the deleted  standerd AG in IDES system

  • I have suspended my phones in the past for 90 days. I try now and it will only let me suspend the phones for 1 day.  Why?

    I have been able to suspend my phones for up to 90 days at a time.  Now when I suspend the phones it will only suspend the phones for 1 day.  Why????