Multithread with tcp

Socket conn = serverSocket.accept();
// Process in another thread
ServerThread srvT= new ServerThread(args ,conn, i);
srvT.start();
my problem is when the thread started conn become null
i checked the program and the class varient become null only when the thread run
is anyone knows what is my problem

tanks for your help
(clientSocket is m_conn)
this is the constructor code and the first lines of the run() function u can see
that i did nothing else
and in the first line of the run() function clientSocket become null
how can i solve this problemm
tanks
public class ServerThread extends Thread
public String sPicturesPath;
public String sPresPath;
public String sLink;
public String sLinkMainPath;
public char slash;
public int iPort;
public int number;
public Socket clientSocket;
public ServerThread(String args[], Socket sck, int i)
super(Integer.toString(i));
sPicturesPath= new String(args[0]);
sPresPath= new String(args[1]);
sLink= new String(args[2]);
sLinkMainPath= new String(args[3]);
slash= args[4].charAt(0);
iPort= Integer.parseInt(args[5]);
clientSocket= sck;
number= i;
public void run()
PrintWriter out; //
BufferedReader in;
String sSlash= new String();
Socket clientSocket= null;
String sInputPacket= new String();
PacketServer packetServer= new PacketServer();
sSlash+= slash;
System.out.println("thread client no "+number);
System.out.println(slash+" "+sLink+" "+sPresPath);
try
System.out.println("setting the io client no "+number);
if (clientSocket==null)
System.out.println("sffgfgfgf");
else
System.out.println("11111111111111111111111111");

Similar Messages

  • RFC Server with TCP / IP destination "Start"

    Hi all,
    I have a great problem, I have tried to look in the forum for the solution but I have not succeeded there.
    I repropose an user's very such to mine problems unfortunatelly without solution.
    I would to install a RFC Server on the client. From an ABAP Program i would send some parameters to my RFC .NET Server (on the users's computer) by the command 'Calling function x Destination y' (There is no problem as long as I use a TCP-IP destination of type "Registration").
    The information is processed by the RFC Server and afterwards used to start another client application.
    Of course I do not want to maintain a RFC destination for every client to keep it unique. So it would be nice to have a RFC destination of type "Start".
    But when I look at the samples I have no idea how to pass the parameters to my RFC Server if it is a "Start" destination.
    Has anyone an idea? Any help would be really appreciated!
    There are the link on which this problem was discussed:
    RFC Server with TCP / IP destination "Start"?
    SAP .NET Connector: How To implement RFC Server destination type Start
    Sorry for my bad English.
    Thanks in advance
    Luca

    Hi Alok,
    if you are sending  message to tibco then tibco guys need to register on the SAP gateway and you need to do nothing, just give them the details of your system and verify via transaction <i>SMGW</i>, menu <i>goto->logged on clients</i> if tibco is registered.
    if you are receiving  message then you only need to create a user on SAP and give it to them so that they can authenticate on the system before sending.
    Regards.
    Sergio

  • LAN with TCP/IP doesn't work

    Hello,
      I have a problem with my laptop IdeaPad S10e 4187-5PG: LAN with TCP/IP doesn't work, after I have updated all the drivers to the latest ones form the Lenovo site (except BIOS update). I tried to check if LAN worksby sending a ping to the IP address and that is OK, but when Isend a ping to the default gateway it failes. A ping to the DNS server also fails.Could you please help me because I tried everythinh and I can't getthe LAN to work.
    Thank you very much

    Perhaps you could describe you network in a little more detail.
    Is this a Workgroup home network or are you connected to a Domain server?
    If this is a workgroup are you connecting to the internet via a cable or DSL router?
    Do other computers on your network connect OK?
    Has your S10e ever worked properly on the network?
    Are you connecting via a wireless access point or LAN cable? 
    What do you Ping on and from where?
    Can you Ping OK on another networked computer?
    Open up a DOS Prompt (aka command prompt, DOS Box). and type IPCONFIG  /ALL <enter>. Do you get a compatible IP address and subnet mask? You should also get the gateway IP address.

  • Send file with TCP/IP

    I would like to transfer a complete file with TCP/IP form a client to a server. I have a working example of using the TCP protocol to transmit data (as a string). I attached this Client-VI to this posting. The server program does nothing more than send the received data back to the client. Is it possible to send complete files with TCP/IP instead of sending strings? If so, would you be so kind and change my VI into a new one and send it back to me?
    If somebody has another idea to solve this problem, feel free to contact me!
    I use LabVIEW 7.0Express and WindowsXP.
    Thnaks, Dennis
    Attachments:
    ipc@chip_1.vi ‏38 KB

    Hi,
    I have a set of Vis that do the job. It's a LV5 Vi and I haven't translated it yet to LV7. It's two SubVis and two Vis that show you how to run the SubVis. The client asks a file that is in the server and the server sends it back. I'm attaching the two libraries llb, the client library and the server library. Please contact me if you have questions.
    Marce
    Attachments:
    TestTCPServerGetFile.llb ‏205 KB

  • Wrong remote port number with TCP listener

    Hi
    I am sending data from a dsp with a network card over TCP/IP to my pc running labview7express. The data is received correctly, I use a 'TCP create listener' followed by a 'TCP wait on listener' to establish the connection, followed by a while loop with 'TCP read' in it.
    The port returned by 'TCP create listener' is correct (1001), but somehow 'TCP wait on listener' returns 57345 as remote port!?
    Also when using another port eg 1003 it still returns 57345..
    Anyone knows how this erroneous portnumber is achieved?

    stino wrote:
    > Hi
    > I am sending data from a dsp with a network card over TCP/IP to my pc
    > running labview7express. The data is received correctly, I use a 'TCP
    > create listener' followed by a 'TCP wait on listener' to establish the
    > connection, followed by a while loop with 'TCP read' in it.
    > The port returned by 'TCP create listener' is correct (1001), but
    > somehow 'TCP wait on listener' returns 57345 as remote port!?
    > Also when using another port eg 1003 it still returns 57345..
    > Anyone knows how this erroneous portnumber is achieved?
    Nothing wrong with that. A TCP/IP connection has ALWAYS two connection
    ends with each of them using a port number. 1001 is the port of the
    local listen socket (which needs to be fixed so that clients can connect
    to a know
    n server) in your LabVIEW application. 57345 is the port number
    used by your software running on your DSP board. A client usually has no
    fixed port number but allocates any port number not already in use. When
    the listen socket receives a connection request it connects and passes
    the connection with the local port 1001 and the remote port 57345
    through TCP Wait On Listener to your application. Since you set up the
    Listen Socket in Create Listener you already know its port number so TCP
    Wait on Listener does only return the port number of the remote
    connection end of your connection.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Client-Server receive/send with TCP (high data rates)

    hello ,
    i want to test client -server one way throughput with TCP , any one can give me more hint about it ??

    Don't start a new thread if it's still about the same question.
    Especially when you add no new information.
    Show us the code you're currently using [in your original thread|http://forums.sun.com/thread.jspa?threadID=5434178&start=25].

  • Cisco ASA 5505 Reset-I Problem with TCP State Bypass

    Hello,
    I have a Cisco ASA 5505 that functions as my primary firewall and a Mitel 5000 controller behind it. I have two external phone users that have been connecting through the firewall with no issues for six months until about two weeks ago. I am now seeing the following log entry on the phone trying to connect to the Mitel Controller.
    6
    May 16 2014
    14:52:52
    302014
    72.135.115.37
    6915
    192.168.20.2
    6801
    Teardown TCP connection 1203584 for outside:72.135.115.37/6915 to inside:192.168.20.2/6801 duration 0:00:00 bytes 0 TCP Reset-I
    My phones are designed to work with the Mitel 5000 and Mitel 3300 phone controllers. The 5000 will only use port 6800 for call control, while the 3300 will use 6801 (Secured Minet), 6802 (Minet SSH), and if those fail, port 6800 (Minet Unsecured). When the phones initiate a connection, they try 6801 first. If 6801 is unavailable, the phone controller adds the RST flag to the ACK packet. When the phone sees the RST flag, it is supposed to reset and use the next port (6802). The same process happens again for port 6802, then the phone knows to try 6800. The problem is that the ASA sees the RST flag now and terminates the connection at the firewall. Therefore, the phones never see the RST flag, and continue to try the connection with port 6801.
    I have tried to use the TCP State Bypass feature to correct the situation, but the log shows that the connection is still being terminated immediately by the firewall. I am a novice when it comes to configuring the ASA. Any help would be greatly appreciated, as the company that I bought the phone system from is out of troubleshooting options. I do not think that I have made any changes to the firewall around this time. I have packet captures and logs from my ASA and I have wireshark data on the inside of my network. I need to figure out how to configure the ASA so that it ignores the RST flag and sends the packet back to the source.
    Any help would be greatly appreciated!

    Thanks Rizwan,
    Still no luck.  I can't even ping the otherside (office)..  I am not sure if i'm running the debug rightway.   Here are my results...
    homeasa(config)# ping inside 10.10.5.254............. (Office CIsco ASA5505 IP on local side.  I also tried pinging the server on other side (office) whic is @10.10.5.10 and got the same result)
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 10.10.5.254, timeout is 2 seconds:
    Success rate is 0
    homeasa(config)# debug crypto isakmp 7
    homeasa(config)# debug crypto ipsec 7
    homeasa(config)# sho crypto isakmp 7
                                       ^
    ERROR: % Invalid input detected at '^' marker.
    homeasa(config)# sho crypto isakmp
    There are no isakmp sas
    Global IKE Statistics
    Active Tunnels: 0
    Previous Tunnels: 0
    In Octets: 0
    In Packets: 0
    In Drop Packets: 0
    In Notifys: 0
    In P2 Exchanges: 0
    In P2 Exchange Invalids: 0
    In P2 Exchange Rejects: 0
    In P2 Sa Delete Requests: 0
    Out Octets: 0
    Out Packets: 0
    Out Drop Packets: 0
    Out Notifys: 0
    Out P2 Exchanges: 0
    Out P2 Exchange Invalids: 0
    Out P2 Exchange Rejects: 0
    Out P2 Sa Delete Requests: 0
    Initiator Tunnels: 0
    Initiator Fails: 0
    Responder Fails: 0
    System Capacity Fails: 0
    Auth Fails: 0
    Decrypt Fails: 0
    Hash Valid Fails: 0
    No Sa Fails: 0
    Global IPSec over TCP Statistics
    Embryonic connections: 0
    Active connections: 0
    Previous connections: 0
    Inbound packets: 0
    Inbound dropped packets: 0
    Outbound packets: 0
    Outbound dropped packets: 0
    RST packets: 0
    Recevied ACK heart-beat packets: 0
    Bad headers: 0
    Bad trailers: 0
    Timer failures: 0
    Checksum errors: 0
    Internal errors: 0
    hjnavasa(config)# sh crypto ipsec sa peer 96.xxx.xxx.118
    There are no ipsec sas
    homeasa(config)#

  • Anyone else having an issue with TCP connections using iCloud for Windows?

    Hi,
    Before I asked this question, I did wait to see if any related questions came up, but none did, so I submit it now.
    On my admittedly older laptop running Windows 7 64b Home, I've run into difficulties with the iCloud for Windows app to the extent that I had to uninstall it.
    It would that, as my laptop was running, in the background, iCloudServices.exe would endlessly iterate TCP connections, which, while not actively sending or receiving any data, after some hours would number over 100 instances, taking up resources, and grinding my laptop's WiFi connection to a grindingly slow pace. I ended up, within the app, turning off everything, iCloud Drive and Photos, (I never used bookmarks), but still this would continue to occur.
    I contacted Apple Support, explaining what was going on, and they stated they only dealt with IOS and gave me a Microsoft Support number. When I called Microsoft support, I came more and more to the realization that the issue was specifically with the iCloud for Windows app, as that was the only software that was endlessly creating and not closing TCP connections as it was. How was Microsoft supposed to solve an issue with Apple code?
    So I called Apple back, whereupon they insisted it was a Microsoft issue. I explained other cloud services installed on the same computer were not having the same issue, it was unique to ICloudServices.exe. They stated they only dealt with IOS. I stated I purchased an iPad Air less than 7 months ago, and was trying to run iCloud in support of that.  They again stated they only dealt with IOS, and suggested I again try Microsoft. I asked them if it was reasonable to expect Microsoft to solve issues with Apple code? They said regardless, there was zero support offered for anything having to do with Windows, and all I could do was uninstall the app, which I did, though that did not feel very satisfactory to me. My thinking is, if Apple writes a Windows app in support of their hardware, they should offer support for it.
    Anyway, I was just wondering, is this an issue unique to me? or have others experienced a similar issue? I found this issue by opening the Windows Resource Monitor, looking under the Networking tab, and scrolling through the TCP Connections section to find 100+ concurrent iCloudServices.exe instances listed, whereas even Chrome, with multiple tabs and extensions, topped out at around 20.
    My one month old Desktop, DYI, sports a solid Asus 1150 MoBo, i7-4790k cpu, 16GB Ram, and an EVGA GTX 970 video card. I list some specs only to illustrate this computer has no hardware issues in comparison to my long in tooth laptop. On this desktop, running Win 8.1 Pro 64b,  at least as many, identifiably Apple, background service TCP connections are created even compared to Chrome, regardless of many tabs being open, many extensions, and even some related apps. Adobe does not even come close, though I run the full CC subscription. On this new computer, running Windows 8.1 Pro 64b, there are currently over 50 TCP connections and loopbacks that do not identify themselves, with just a - for the Image, and PID. With the experience on my laptop, I wonder how many of these are generated by Apple software, if not specifically iCloud software?
    The frustrating aspect of these connections is they seem in no way active, While the Chrome and Adobe connections can be seen to be transferring data, as long as I am not running iTunes, or so have my iPad actually plugged in, it seems 99% of the time these iCloudServices.exe connections are just taking up ports, neither sending nor receiving any data discernable to me under the Processes with Network Activity, or Network Activity lists, both displayed in the same window as the TCP Connections in the Windows Resource Monitor.
    Though I am fairly ignorant as regards coding, it seems as if there is no call to close a connection, very specifically, iCloudServices.exe, when it is no longer needed, and the next time a connection is needed, a new one is opened, rather than accessing the one previously opened. The only other reason I could imagine this might be occurring is if my Norton Internet Security software might mask and/or block the port after a certain time of inactivity.
    Anyone out there have any ideas or advice about this? Thanks in advance.

    Thanks jared,
    I'm still dealing with this issue through Apple. Some time after I posted this, I contacted Apple again. They did start a case up for me, as I was experiencing the same behavior on two different machines, with two different versions of Windows.
    So far it remains unsolved. I've logged iClouds for Windows on my desktop, which is brand new, then logged for awhile after completely uninstalling Norton Security Suite, depending on the Microsoft security for some time, and finally logged after I uninstalled iCloud for Windows, restarted, installed a clean download, and connected using a completely different test account, which Apple set up for me. None of this made any difference. Looking at the logs, it seems every 10 minutes, iCloudServices.exe creates a new TCP connection to confirm I'm using less than 5GB on iCloud, (which I am by a good margin, using less than 2GB), it seems this connection is not closed, and when the next iteration rolls around 10 minutes later, a new TCP connection is created. I come very close to having 6 TCP connections created per hour, until I restart my computer. This works out to... 6 x 24 = 144/day.
    Perhaps the article you posted will shed some further light on this. I'm thinking seeing the state of the connection through netstats, at the least, could help.
    For the last week, I've been putting a hold on further logging, as Apple wants me to create a new user account on one of my computers, install iCloud for Windows there, and log it running in the other account. This however basically means I cannot use my computer for a fair number of hours, and I've been busy enough with work the past week that I haven't the time or energy to afford to set this up and run it. I've had need of my computers too much for the past week.

  • Help with TCP/IP communication via Teststand and Labview

    Hello,
    I am trying to create a sequence of tests and need to communicate between LabView vi's and another program over a TCP connection. When I have the sequence hard coded in LabView everything works fine, but my goal is to break up the sequence into steps and execute it in Teststand. Currently, the working LabView code sets up a listener, and the other program establishes the connection. Once the connection is established, I use the Read/Write to TCP blocks for the programs to send messages back and forth.
    What I first tried in Teststand is to create a simple vi under Setup, that creates the listener, then the user is prompted to run the script on the other program to establish the connection. On the vi, I clicked on "create -> indicator" for the connection ID, then wired it as an output intending to use it in other vi's in the main part of the sequence.
    The main (and very strange) problem is that TestStand will crash before I even get a chance to execute the sequence. Starting with a blank sequence, I open up an "Action," then "Browse for vi" on the Module tab and once I select that simple vi mentioned above, Teststand crashes before it's even loaded properly. A screenshot of the error, the error report (which mentions that the problem is with seqedit.exe), as well as the vi in question is attached.
    This crash happens every single time I try to load the vi into the sequence. It seems to load ok on our NI machine running Windows XP, but it keeps on crashing on my pc (also running XP, i5 processor 1.85Gb RAM).
    Is the problem with the LabView code, Teststand or my pc? I've tried re-installing Teststand but to no avail.
    Any help is appreciated, and thank you in advance,
    Sorin
    Attachments:
    error.JPG ‏194 KB
    error report.txt.txt ‏111 KB
    open_connection.vi ‏12 KB

    Sorin,
    It looks like you are using TS 4.2.1 with LV 2010. Can you please check if you have the following patchs installed on your machine
    - http://digital.ni.com/public.nsf/allkb/7D728B70F167CE088625776E00582C7B?OpenDocument
    You will need to install both the TS 4.2.1 and LV 2010 F2 patch.
    Regards
    Anand Jain
    National Instruments

  • Problem:100 % cpu usage with tcp server dll

    Hello,
     I am trying to write a dll with labwindows/cvi that allows me to create a TCP Server. This dll is integrated in labview.I created this Dll with example provides by Labwindows/cvi(rtserver.dll).
    Description of my problem: when i execute this dll in a "While Loop" in labview,the TCp server wait a connection and 100% cpu usage occurs. However when a client is connect to the server,the CPU is normaly used because the program stop when he meets the timeout of the tcpread() function. I would like to know how i could limit CPU usage  when the server is awaiting a client in the labview "While loop".
    I know I could use a DELAY() to limit Cpu usage ,but I would like to know if there are any others solutions.
    thank you.

    i dont know your exact application, but i generally use Q to transfer data to TCP loop in my prgram it helps me in two ways.
    1. it automatically restricts the iteration when ther is no data (Less CPU Usage, Less Unnecessary Trafic)
    2. Q can eliminate problems arising due to non synchronization of loop
    Tushar Jambhekar
    [email protected]
    Jambhekar Automation Solutions
    LabVIEW Consultancy, LabVIEW Training
    Rent a LabVIEW Developer, My Blog

  • Need help with TCP/IP example?

    Hi,
    I'm still new to labView 7.1. I'm trying to understand the TCP/IP
    On TCP/IP Server/Client example, does the server generate the data and than send that to the client? After client receives the data, it processes the data and it displays the data on the client side? If yes, than how would just display the data on client side by 1st process it on server side? Or can you do that way?
    Thanks,

    As any other "server" on the internet (web server, mail server), the server passively waits for connection requests on a certain port. The client initiates a connection to the server to get the data.
    It is up to the server program to decide what to serve, so you you can process the data any way you like before it is sent out.
    The only important issue: You must ensure that server and client agree on the type of data being exchanged, the rest is up to you.
    LabVIEW Champion . Do more with less code and in less time .

  • Setup Database mail that connect with tcp/ip to the instance

    I want to setup database mail that connect to the named instance via a fixed TCP/IP port.
    This is a named instance that works with a fixed TCP/IP port
    Database mail works fine if shared memory is enabled.
    If it is disable I get the following log entry in the application log.
    Log Name:      Application
    Source:        DatabaseMail
    Date:          18/11/2014 20:56:05
    Event ID:      0
    Task Category: None
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      Server.dom.be
    Description:
    1) Exception Information
    ===================
    Exception Type: Microsoft.SqlServer.Management.SqlIMail.Server.Common.BaseException
    Message: There was an error on the connection. Reason: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL
    Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified), connection parameters: Server Name: server\instance, Database Name: msdb
    Data: System.Collections.ListDictionaryInternal
    TargetSite: Void OpenConnection(Microsoft.SqlServer.Management.Common.SqlConnectionInfo)
    HelpLink: NULL
    Source: DatabaseMailEngine
    StackTrace Information
    ===================
       at Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.ConnectionManager.OpenConnection(SqlConnectionInfo connectionInfo)
       at Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.DataAccessAdapter.OpenConnection(String dbServerName, String dbName, String userName, String password, String appName, Int32 connectionTimeout)
       at Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.DataAccessAdapter.OpenConnection(String dbServerName, String dbName, String userName, String password, Int32 connectionTimeout)
       at Microsoft.SqlServer.Management.SqlIMail.IMailProcess.QueueItemProcesser.ProcessQueueItems(String dbName, String dbServerName, Int32 lifetimeMinimumSec, LogLevel loggingLevel, Byte[] encryptionKey, Int32 connectionTimeout)
    Is there a way to change the connection parameters?
    PS the Browser Service is not running

    Hello,
    If the instance is a named instance, then SQL Server Browser service should be started to be able to connect to the instance
    using TCP/IP.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Observer pattern with TCP

    Hello java friends!
    I have implemented an auction application over a TCP communication. The client's using a basis Socket and the server is multi threaded with a ServerSocket returning a Socket which is processed in a separate thread. The connection between server and client is closed automatic after each request, so another request from the client would need to be connected over a new connection. It's implemented like this for the sake of performance.
    But however, I now want to implement the Observer pattern(which I'm also comfortable with). This would let the client be notified by the server if someone else overbids him in a auction. And I wonder how this could be completed?
    I had a thought and it went like this. If the client would also have a ServerSocket then the server would be able to connect to it when ever he would like to notifying the client. What I like by this implementation is that the notification is done without any delay! This is obviously one way to implement it, but I wonder if someone else in here had a better idea,or if someone knew the standard implementation for a situation like this.
    Thanks in regards!

    superdeportivo wrote:
    The sever creates a new thread for every request that the client makes. If performance is important you may want to use a thread pool.
    For example the client makes a bid on an auction item. [deleted]This is simplest way to do what you require. I am generally in favour of keeping things simple.
    if the Client would like to make another bid then the client would need to go through all the steps again from 1 to 4. Why the fourth step is implemented is because otherwise the client would held a thread live at the server as long as he is connected (using the application) and eventually the server would run out of threads!How many clients do you have at once? You should be able to support 1,000 on a typical PC and 10,000 on a decent server. You can keep the connection/thread for a period of time and drop the connection if the client disconnects or doesn't do anything for a period of time (from a few seconds to a few hours)
    Another approach is to use non-blocking IO (see the samples which come with the JDK) In this way a small number of threads can manage a large number of connections.
    So lets say if we're using a thread pool with maximum 20 threads, then only 20 clients would be able to connect to the server at the same time (use the application). If the maximum is 2,000 then you can have up to 2,000 clients.
    I hope I made my self clear if not please tell me which part wasn't.I think you have made a few assumptions about what performs best or what is possible could have a rethink.
    And about the delay, of course the connection delay is what's acceptable for my program.The simplest approach using your current model is for the client to poll the server.
    Edited by: Peter__Lawrey on 30-Jan-2009 22:56

  • Securing RPC services with TCP Wrappers

    Hello All,
    I have two node cluster running solaris 10. Since SVM needs few rpc services like metad,metamedd and metamhd, I dont want to disable them. But at the same time, wants to block them from outside world.
    But readme page of TCP Wrappers (http://www.sunfreeware.com/README.tcpwrappers) says "The wrappers do not work with RPC services over TCP. These services are registered as rpc/tcp in the inetd configuration file". And other internet sources says same. So my question is this valid still?. Or it is possible to filter RPC services using TCP Wrappers.
    When I tested this with following entries in /etc/hosts.allow and /etc/hosts.deny, my two nodes did not give any trouble after couple of reboots. SVM is working fine. So I wonder whether RPC services area really blocked (other than the local host) or not.
    Content of /etc/hosts.deny
    ===========================
    rpcbind: ALL : severity debug
    rpc.metad: ALL : severity debug
    rpc.metamhd: ALL : severity debug
    rpc.metamedd: ALL : severity debug
    rpc.metacld: ALL : severity debug
    Content of /etc/hosts.allow
    =======================================
    rpcbind: KNOWN : severity debug
    rpc.metad: localhost : severity debug
    rpc.metamhd: localhost : severity debug
    rpc.metamedd: localhost : severity debug
    rpc.metacld: localhost : severity debug
    Any hints/information regarding this will be really appreciated.

    Hello Mark,
    Sorry that I missed to thank you in your last post.
    If I get it right, The RPC bind program is used to maintain a table of dynamically allocated ports for RPC-based services.
    From internet, "The file /etc/rpc contains a list of network services. Typically, when a remote machine wants to connect to one of those services on your machine, it first issues a query to the rpcbind program running on your computer. It knows the name of the services it wants to connect with, but doesn't know what port number to use. Your rpcbind will respond with a port number. The remote host will then attempt a connection to the specified port."
    Also, Note that blocking rpcbind doesn't block access to the/etc/rpc services altogether. It does block access for those programs which do an rpcinfo query in order to reach those services. So other possible ways also exist to make remote connection without querying. Here lies the problem. I wanted to secure RPC services completely.
    Coming to metad, it is true that ldd will result nothing related to libwrap*. But inetadm tells different story
    inetadm -l /network/rpc/meta | grep -i wrap
    default tcp_wrappers=TRUE
    So encapsulating with tcpd should work for metad and other RPC services, I believe.
    What is your opinion on this?.

  • Teststand best practices architecture for communicating with TCP instruments

    Hi,
    I am using Teststand 2014 and LabVIEW 2013 SP1 as the module adapter.
    My Teststand sequence file includes communication with 3-5 different instruments via TCP/IP.
    Such as Spectrum analyzer, generator and other RF measurement devices.
    There are many steps located in subsequences that implement code to communicated with these devices whether to fetch , query or write.
    What is the best architecture to implement this program ?
    As I can see it there are many possibilities, such as :
    1. Launching a subsequence as a new thread in the Sequence Setup. This subsequence calls a VI that dynamically register for events/queue that can be launched from any step. (in this case there is a VI running in the background that can perform Write/Read/Qurey to the instrument and he is triggered from any step using an event or dequeue element)
    This option can be duplicated for any instrument or only once for all of the instrument with prioritizing the event queue.
    2. Creating a communication reference in the Setup of the Main Sequence. And passing it to any step that need it. (there is also the question how to pass this reference… in Teststand globals or in LabVIEW queue).    
    another 2 small questions that I encountered -
    Is using LabVIEW queues and notifiers in TS steps and obtaining their reference (in the LabVIEW code) by name is considered best practices ?
    If I would like to run only one VI in a new thread, should I use a new subsequnce and set it as a new thread or use the Run VI Asynchronously ? what are the differences ?

    I use Action Engines to hold my VISA Sessions and just write my LabVIEW VIs to use those to send commands and read data.  Any returned data can be analyzed in the VI or passed on to TestStand as a step result.  You just need a sequence to run at start up to initialize your Action Engines and another one to close them.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

Maybe you are looking for