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

Similar Messages

  • Error 11 with TCP Listen.vi and named service

    I am using TCP Listen.vi with a named service so my Real-Time application can act as a TCP server without the clients needing to know the specific port.  I am using LabVIEW 8.5.
    I am getting Error 11 from TCP Listen.vi if no client has connected within a certain amount of time.  I have traced the problem down to the TCP Listen Internal List.vi inside Internecine Avoider.vi in TCP Listen.vi.  I think I have found a bug in this vi.
    What is happening is that the Search function of TCP Listen Internal List.vi is not finding the named service, so new listeners continue to be created until there are too many open.  See the attached picture.  I think the circled function should be "not equal" instead of "equal".
    Has anyone run across this problem before?
    Thanks,
    Cherie
    Attachments:
    TCP Listen.PNG ‏39 KB

    Cherie,
    Let us assume that al listener for your port number and name is not yet created and you have put the TCP Listen in a loop.
    1st Iteration:
    Searching the internal list will not find a name or port and hence it will create a connection and if successful will insert the port number and name to  Internal List.
    2nd Iteration onwards:
    It will find the previous connection, provided you are still passing the  same port number. If in the second iteration the port number changes, then what you say may happen
    Will it be possible for you to post the TCP VI you have in RT?
    That said...I don't get why that compare with zero is required? If port number was 0 in the first iteration then anyway after creating the listener, the new port number will be updated to the list along with the service name, isn't it?
    Message Edited by kikiduu on 09-06-2008 08:50 AM
    "A VI inside a Class is worth hundreds in the bush"
    യവന്‍ പുലിയാണു കേട്ടാ!!!

  • Cisco ASA, skipping real source port number with PAT.

    Hi Experts,
    Cisco ASA configuration guide says:
    "PAT translates multiple real addresses to a single mapped IP address by translating the real address and source port to the mapped address and a unique port. If available, the real source port number is used for the mapped port. "
    Is it possible to skip this ? I do not want to use real source port number. The issue is, when I have a PAT entry with real source port (port 5060), - SIP session doesn't work. With all the other ports numbers,- everything works.

    Hi,
    Notice that the configuration you try does not modify the real source port at all.
    Since you are using the same "object" for the real/mapped service then the configuration above matches traffic where the connections destination is "any" and the destination is "udp 6000 65535" and only when the source is "udp sip" and in that event it keeps the exact same "udp sip" source port as you are using the same "object".
    I am not sure if its a software or configuration related issue but I have not gotten this to work reliably on my ASA. I might have to try some other software level.
    I guess you would want to match the SIP source port in the Dynamic PAT and avoid using the SIP port as the mapped port?. With that in mind I was thinking something like this
    object service UDP-SIP
     service udp source eq sip
    object service UDP-SIP-MAPPED
     service udp source range 30000 31000
    nat (VoiP,outside) source dynamic <source network object> interface service UDP-SIP UDP-SIP-MAPPED
    Though it seems the above configuration seems to be bypassed by the ASA completely and it seems to use the identical source port as the mapped port even though it matches the configuration.
    If I were to change the above configuration from "dynamic" to "static" then the configuration matches but it uses only the first mapped "source" port of "30000". I guess it would only use a different mapped port if you used multiple real source ports also instead of the current single source port "sip".
    nat (VoiP,outside) source static <source network object> interface service UDP-SIP UDP-SIP-MAPPED unidirectional
    Example from my own ASA.
    DYNAMIC
    - Matches the configuration but doesnt map the port at all
    Phase: 5
    Type: NAT
    Subtype:
    Result: ALLOW
    Config:
    nat (LAN,WAN) source dynamic LAN-NETWORK interface service SIP SIP-MAPPED
    Additional Information:
    Dynamic translate 10.0.0.123/5060 to <my pat ip>/5060
    STATIC
    - Matches the configuration and maps the source port but only uses the first mapped port from the range
    Phase: 4
    Type: NAT
    Subtype:
    Result: ALLOW
    Config:
    nat (LAN,WAN) source static LAN-NETWORK interface service SIP SIP-MAPPED unidirectional
    Additional Information:
    Static translate 10.0.0.123/5060 to <my pat ip>/30000
    I am not really sure if this configuration is reliable at all but its the only thing I can think of at the moment.
    Hope this helps :)
    - Jouni

  • How do you change the port number for Apex Listener V2?

    I'm running Apex listener V2 in standalone mode on Linux.  I want to change the port number of the apex listener V2 (e.g 80 to 8080).  How do I do that without re-installing the whole listener again?
    thanks in advance
    PaulP

    Hi PPlatt,
    You can modify your_listener_home_directory/apex/apex.properties
    http.port=8080
    Stop & restart listener.
    HTH
    Zack

  • ODBC with TCPS listener

    Hi, I am using an Oracle 9i server with a TCPS (SSL-encrypted TCP/IP) listener. I can't seem to get ODBC clients working with this listener.
    I can successfully use this TCPS listener with all of the regular Oracle clients (SQLplus, Enterprise Mgr, etc.)
    I can successfully use ODBC with the TCP (non-encrypted) listener.
    When I try to connect with ODBC over TCPS (e.g. to import data into Excel), the connection freezes. Has anybody else ever successfully used the encrypted listener in this way?
    Here are my particulars:
    Database server: 9.2.0.4 on Linux
    Database client: 9.2.0.4 (both Oracle Client and ODBC driver) on Windows XP
    Any help appreciated!!
    --Andy Stevens
    New York, NY

    yes the TCPS listener is part of Oracle Advanced Security.
    --andy                                                                                                                                                                                           

  • Wrong Com Port order with PXI - 8422 in a Win2k system

    While using my PXI-8422 on WinNT4.0 and NI serial driver ver 1.44 Ports were assigned com numbers top to down. ie Port1-COM1 , Port2-COM2 , ...
    However on win2k and NI serial driver ver 1.45 ports were assigned com numbers in the reverse order. ie Port1-COM4 , Port2-Com3 ,...
    And when i try to change com assignments the sytem hangs while trying to access the ports.
    Any idea how to solve it?

    Topcu,
    We have seen the reverse order behavior before for serial devices in Windows 2000.
    The first thing is to make sure that you tried to change the com assignments properly. If you only tried to change them in Measurement and Automation Explorer, it may not work. Here is the proper way:
    1. Select Start>Settings>Control Panel and double-click on the
    System icon.
    2. Click on the Hardware tab and click on the Device Manager button.
    3. Double-click on the Ports (COM & LPT) icon.
    4. Double-click on the port you want to configure.
    5. Click on the Port Settings tab.
    6. Click on the Advanced button. The Advanced Settings dialog box
    should pop up.
    7. Change the COM number in the COM Port Number field. (You can
    use a COM number that is designated as in
    use, as long as no hardware
    is actually using that COM number.)
    If this is how you tried to reassign your ports and your system still hangs, please go to www.ni.com/support and click on Request Support in the black panel to let us know.
    Sarah Fenney
    Applications Engineer

  • How to use WAN IP with port number in TCP Open Connection ?

    I have a code to write / read a WiFi device server that gets DIO / AI data through a serial port. See attachment.
    The device driver has a static IP of 192.168.1.10 and port 30704 for data stream. I have a router which links my laptop and this device driver in a LAN and all is fine.
    But now I want to access my device driver through the internet. For this I already have done a port forwarding in my router to direct incoming requests on 30704 port to my device driver.
    The issue : I cannot reach my device driver when I enter the WAN side IP of my router like 52.23.45.131 and the Port as 30704  in the TCP Open connection.
    Any suggestions ?
    Thanks 
    Raghunathan
    LV2012 to Automate Hydraulic Test rigs.
    Attachments:
    Remote_Logger.vi ‏32 KB

    Hello,
    without looking at your vi:
    Did you try to reach your device from an external Computer?
    Because NAT Translation cant be done (by most routers) if you try to reach yourself from the inside.
    I am correct that the device created a virtual Networkcard on your computer at which you can communicate locally, right?
    Did you try to use another computer in your Network, to reach your computer and the attached device?
    If it is not possible, try to enable Routing at your computer.
    If it is possible, your router is not forwarding (or you answered at with "no" at the first question or both).
    If you are using an external computer and the networkinternal connection from another PC is working and you are 100% sure the router is set up correctly, try to disable all local firewalls and test again. (if it works you need to setup a proper fwrule).
    Regards
    Rene

  • Compact Fieldpoint TCP/IP remote port

    i am working on cFP 2120 / cFP 2020 and for TCP/IP connection i have to use remote port number. so can all you guide me that what remote port nu. or service name i have to use.
    waiting for your reply
    Prashant Soni
    LabVIEW Engineer

    The port number can be whatever you want it to be, as long as the server and the client have the same one specified. Generally, you have a server publishing data to a port and some client reading data on that port. I believe there is a TCP communication example in the Example Finder, just search for TCP and look for TCP Communication.lvproj. It's actually set up with a real-time target as well.
    Good luck!
    Misha

  • Get TCP Service Name Port Number

    The TCP Listen and TCP Create Listener VIs have an input terminal named 'Service Name', once a listener is created in the LabVIEW application is it possible to query which named service is running and on what port in an external application? The external application may or may not be developed in LabVIEW.
    The TCP Create Listener VI outputs the port number used, this is useful for information purposes but I can see no automatic method for an external application to get this information?
    The C++ function getservbyname does not return any information given the known, created and listening LabVIEW TCP listener.
    Solved!
    Go to Solution.

    From the LabVIEW help:
    service name creates a known reference for the port number. If you specify a service name, LabVIEW registers the service name and the port number with the NI Service Locator.
    NI Service Locator:
    http://digital.ni.com/public.nsf/allkb/227453F884CE035386256E55007A303D
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • Changing the listener port number in a cluster environment

    Hello,
    I have an Oracle 10g database on a Windows cluster environment with Oracle Fail safe. I am trying to change the default listener port number - these are the steps I have done to change the port number:
    1) Take the listener offline via Oracle Fail safe
    2) stop the original listener from the command line
    3) change the port number in the listener.ora file & save
    4) start the original listener
    5) bring the listener online in Fail safe
    6) register the listener in the database with ALTER SYSTEM SET LOCAL_LISTENER....
    After all this, when i check the status of the listener via lsnrctl, i see that the new port number is used, however in the Fail safe administrator, I still see the default port 1521. How do I go about changing the port number so that Fail safe also registers the change?

    I did troubleshooting to verify the group, but this just changed the port number back to the default in the listener.ora & tnsnames.ora.
    So I did all the steps again to change the port number from the default to another - via lsnrctl status, i see that the new port number is being used, I can also log in to the database via Toad using the new port number, in v$parameter i see that the local_listener is registered on the new port number....only under the Fail Safe manager, the port number (under listener parameter) has not changed....it still shows the default port number. Anyone know how to change this???

  • Forms Listener port number as a service!!!

    How can you specify the port number of the listener when it
    is installed as a service? I tried port=???? but it ignores it
    and default back to 9999...
    null

    Hi Patrick
    Try this on your command prompt
    ff50srv32 port=5555
    You can assign any port. If you don't then it will take the
    default port.
    Hope this will help you.
    Arun
    Patrick Shea (guest) wrote:
    : How can you specify the port number of the listener when it
    : is installed as a service? I tried port=???? but it ignores it
    : and default back to 9999...
    null

  • Get port number,host name,service name from database

    Is there any way to know the host name,port number, sid and the service name of a particular instance from the database.

    > Is there any way to know the host name,port number, sid and the service name
    of a particular instance from the database.
    Why?
    The host name in the HOST_NAME column of V$INSTANCE for example, may not be the hostname/IP address that the local Listener listens for connections on. Or the Listener can listen on that host name/IP and several other local IP addresses.
    The port number used for listening for connections by clients, are determined by the Listener's configuration.
    Thus if you can explain the requirement for this info, maybe the forum can provide better and more specific answers.

  • TCP Listener returned error on accept = AFP blows up. Need help

    Environment: 10.6.7 Server. Xserver. All Mac clients. It's a school. Problem: AFP refusing connections or not loading the Home Directory Symptoms: Library/Logs/AppleFileService/AppleFileServiceError.log blown out with "TCP Listener returned error on accept" happening every second.
    I cannot figure this out. The server has not been updated recently. -checkhostname returns no error. There have been some new iMacs (10.6.8) connected recently. I have read this might be MaxThreads; or corrupt .DS files, but I am really struggling. Please - any clues at all? I can't keep rebooting every day. Any ideas at all please.

    hi pkmusic, we are having the same problem. do you have phone over IP? we are using 5 servers (10.6.7 and 10.6.8) for user home directories. network goes through Siemens IP-Phones. Each server has max. 40 - 50 users but the error occures even if there are only 15 - 20 users connected. have to check the MaxThread-Settings next week ...

  • ITS HTTP Port Number issue

    Hi,
    We are having ECC 6.0. The ITS service (SAP GUI for HTML) is not working. It is re-directing to Port Number : 0.
    Please see below the detailed steps to analyze the problem from your end.
    1) Login to ECC
    2) Use TOCDE:   SICF
    3) Give the Service Name as "WEBGUI"
    4) Run - Press F8
    5) U will be Navigated directly to ,  webgui -  SAP GUI for HTML
    6) Select the SAP GUI for HTML, right click, then you will get list of options.
    7) Select "Test Service"
    8) Then it will open a new window and will display the SAP Easy Access. The URL of the new window will display something like,  http://SERVER:8000/sap/bc/gui/sap/its/webgui?sap-system-login-basic_auth=X&sap-client=800&sap-language=EN
    But in our case the Port Number is showing as 0, instead of as shown in above uRL like 8000 / 8080,etc.. Due to this, we are not getting the SAP Easy Access screen. We are getting something like "Page can't be displayed".
    We were able to change the HTTP port number in SMICM TCODE, But we are not sure of the exact Port Number.
    Please help us how to findout the actual  ITS HTTP Port Number to resolve the issue. We are not sure what Port number was given in the initial configuration/installation.
    Thanks & Regards||
    Ashok Kumar M.

    >
    Ashok Kumar Munugoti wrote:
    > Hi,
    >
    > Thanks for your reply.
    >
    > The Problem here is we don't know the Port number like U have given 8000. We are not sure of the Port Number.
    >
    > Kindly give me some idea how to findout the HTTP Port Number given in the Initial Configurations/ Installations.
    >
    >
    >
    > Thanks & Regards||
    > Ashok M.
    Hey Ashok,
    you can specify the port number with this parameter.
    Normaly it should be 80<sysnr>
    so if your systemnumber is 05 it would be 8005 for the http port.
    you can also set the parameter like this PROT=HTTP,PORT=80$$
    that will set it automatically to your system number
    regards
    Peter

  • Finding the port number oc4j is running on

    Hi guys,
    I was wondering if anyone could tell me how to find what port number my oc4j listener is running off.
    Thanks In Advance
    Frank

    Ask the person who set it up to run.

Maybe you are looking for