How to test if a port number is already in use ?

Hi,
How can I know if a given port is already is use by another program ? I have wrote a TFTP Server in Java that is working on (of course) port 69. The problem, is that I have to start the server with admin rights, because it uses port 69. I then have to start another program (with user rights) and I have to be sure that the TFTP server is running. So how can I test if the port number 69 is already in use, i.e my TFTP Server is already running ?
Thanks
Chris

I should add a few things, because it would actually be simple to test this with a simple
Socket s = new Socket("localhost",69);
If I had a IOException, it is almost sure that the server is not running on port 69. Now even if I start the server, i.e the thread to listen on 69, if I do a port scan or use the above code, I have as reponse that there is nothing on port 69. Why this ? It is because I use DatagramSocket ? Or because the port becomes active only after the first exchange of data ?
Thanks
Chris

Similar Messages

  • How to get rid of port number when you want use SJSAS as your production we

    Hi my question is rather simple. If I want use my computer as the web server backed by Sun Java System Application Server suite installed on the same machine, how can other internet users access my set domain without knowing my host port # (not typing :8080 after IP address)?
    thanks

    Tomcat is a webserver/servlet container combination. In that case, you make me wonder what you need the app server for.
    Anyway, the answer remains the same: read the manual or ask the support. There's a Sun App Server forum here.
    http://forum.sun.com/jive/category.jspa?categoryID=10 - but you''ll have to configure Tomcat.

  • How can I find out what port number my DB is using

    How would one find out what port number a database is using? Is there a SQL command that will allow us to do this?
    Thanks,
    oracle_newbie

    newbie
    Oracle databse assigns a dynamic port number for each established session. Usually, the common port is 1521 which is defined in you tnsnames.ora, however, this is used for requesting a dynamic port. Dynamic ports are within a ragne of 1000+. That's why it is hard to tell which port you are using at a certain time. You should have a network monitoring tool to check this accurately.
    Regards
    null

  • How do i find the port number for oracle10g

    Hi,
    I have installed oracle10g on my pc running windows XP. I need to get the port number for JDBC drivers used by Java Application when defining a JDBC source.
    Java is running on the same machine.
    When I installed oracle I was given the links (with port numbers) for EM, ULTRA SEARCH and iSQLPLUS, what I need is the ORACLE10g database port number. Anybody know where I get from ?
    Cheers

    thanks for the reply the portlist does not contain the port of oracle. The file is below.
    [i]Ultra Search HTTP port number =5620
    Enterprise Manager Agent Port =
    iSQL*Plus HTTP port number =5560
    Enterprise Manager Console HTTP Port (oracle10) = 5500
    Enterprise Manager Agent Port (oracle10) = 1830
    However searching through some other threads found the port to be 1521, which
    oracle must set during installation and tell anybody, unless this infor is in the log.
    so configured the oracle JDBC driver as below (PE8.2 --> ConnectionPools)
    Datasource Classname = oracle.jdbc.pool.OracleDataSource
    URL = jdbc:oracle:thin:@localhost:1521:oracle10
    User = abc
    Password = abc
    Now able to ping. Cheers

  • I won Lightroom 1.0 a few years ago at an Adobe clinic in Fremont. I have since misplaced the original disk and cannot get the program to open. It wants a serial number and I don't have one. How can I get the serial number so I can use the software?

    I won Lightroom 1.0 as a door prize a few years ago at an Adobe clinic in Fremont. I have since misplaced the original disk and cannot get the program to open. It wants a serial number and I don't have one. How can I get the serial number so I can use the software?

    Thanks for replying, Jim. I wasn't planning to use it for raw images. I shoot film, black and white, and have many negatives I want to print. I am unfamiliar with the upgrades in Lightroom. I wasn't unhappy with the version I have. It was useful for my purposes.
    Because it was a few years ago, I don't remember if I registered the product. I was able to login to my account. But could not find a path to communicate with Adobe. I will keep trying.
    Ken

  • How do I get the red number of already read e-mails NOT to show up in the iMail icon on the dock? I only want the number of "unread" e-mails to display in red on the iMail icon.

    How do I get the red number of already read e-mails NOT to show up in the iMail icon on the dock? I only want the number of "unread" e-mails to display in red on the iMail icon.

    Your last post is blank, which happens a lot to users who try accessing the forum through email rather than its web interface.
    You are also in the wrong forum here.  We don't do Ps Elements here.

  • How do you increase the maximum number of migration batches using EAC?

    When I try to run a new batch, I'm getting the following error message:
    The maximum number of migration batches is already running. Please remove a batch before you add another one.
    How do I increase the maximum number of migration batches using EAC? Thanks for your help.

    Hi WinndowsGuy,
    Is there any update on this thread?
    Thanks,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Simon Wu
    TechNet Community Support

  • New computer: How do I find the serial number so I can use final cut?

    New computer: How do I find the serial number so I can use final cut?

    On the assumption you want to install Final Cut Express (and not something from the app store), you find the serial number on on the documentation that came with the FCE disks. If you do not have the documentation, you are out of luck.
    x

  • What port number for Desktop Sharing using in Lync Server 2013 and Lync Online

    Dear All,
          My environment using Lync Server 2013 and Lync online on Office 365. I don't want my user using Desktop Sharing feature. then I need to know what port number for Desktop Sharing using in Lync Server 2013 and Lync Online.
    I will deny this port on personal firewall each client.
          Thank you for your advise.

    Hi,
    I'm not sure you'd be able to do this with ports without impacting other application sharing features such as Q&A, Whiteboard, Poll etc - I'm pretty sure they all come under the same umbrella of ClientAppSharing.
    Ordinarily you would create or modify your conferencing policy to restrict sharing to single programs only using a cmdlet similar to below;
    Set-CsConferencingPolicy -Identity "Global" -EnableAppDesktopSharing SingleApplication
    This would disable desktop sharing but enable users to continue sharing other single programs. If you want to remove that functionality too, then replace the 'SingleApplication' parameter with 'None'. Then users won't be able to share any programs either.
    This is the correct way to do it as the icons will be greyed out for the users. Doing it your way, they would still be able to click them, and it would throw an error - this will lead to a lot more support calls and people assuming a service is broken.
    I hope that helps some.
    Kind regards
    Ben

  • Port '22' is already in use (px2-300d)

    I used to be able to ssh to my px2-300d, using ssh -l root root px2-300s.local password: sohorootpassword
    Suddenly, today, trying to 'Allow remote access for support (SSH and SFTP)' on the Support Diagnostocs page of my NA (http://px2-300d.local./manage/diagnostics.html) I am unable to set the 'Root Password', because when I hit 'Apply', it comes back with a pop-up window saying 'Port '22' is already in use'.
    I tried to restart the NAS (and my home computer), but the problem remains, and I ran out of ideas how to get back to being able to ssh to my NAS.
    The reason I need this is a) occasionally I must fix some files in a way that would be a chore by using sftp, which somewhat surprisingly works, as I assume sftp is using port 22!, b) I can't stand having a computer (and the NAS is one of them) and not be able to login to it.
    Peter
    px2-300d Firnware 4.0.6.19294 BIOS R00T12
    ssh from a MacBook Pro running Snow Leopard
    Port scan:
    Port Scan has started…
    Port Scanning host: 10.0.1.15
    Open TCP Port: 21     ftp
    Open TCP Port: 22     ssh
    Open TCP Port: 80     http
    Open TCP Port: 111    sunrpc
    Open TCP Port: 139    netbios-ssn
    Open TCP Port: 443    https
    Open TCP Port: 445    microsoft-ds
    Open TCP Port: 548    afpovertcp
    Open TCP Port: 873    rsync
    Open TCP Port: 34309
    Port Scan has completed…
    Solved!
    Go to Solution.

    Hi pbernus,
    Is SFTP enabled on the protocols page? You may need to disable it to enable SSH since they use the same port number.
    Have questions and need answers?
    Search the database for answers to FAQ's, software/driver downloads, tutorials, news, features and more!
    LenovoEMC Support & Downloads
    LenovoEMC North America Support Contact Page

  • My new Skype Number is already in use!

    I have purchased a skype number, but that number is already in use.  HELP!!
    This post was transferred from its previous location to create its own new topic here; its subject and/or title has been edited to differentiate the post from other inquiries and to reflect the post's content.

    Hi, Skypephone1, and welcome to the Community,
    Please contact Skype customer service to report this problem and to request that the number be tested.  You can then request a refund  for the number, and start a new Skype Number  subscription.
    Regards,
    Elaine
    Was your question answered? Please click on the Accept as a Solution link so everyone can quickly find what works! Like a post or want to say, "Thank You" - ?? Click on the Kudos button!
    Trustworthy information: Brian Krebs: 3 Basic Rules for Online Safety and Consumer Reports: Guide to Internet Security Online Safety Tip: Change your passwords often!

  • Sapinst.exe giving error while starting  'port 21213 is already in use'

    Hi
    when we start the sapinst.exe through remote desktop connection to the window 2003 server machine  getting following error
    SAPinst is getting started.
    Please be patient ...
    guiengine: call to listen() for socket 1812 failed. No such file or directory
    ERROR      2008-03-21 01:16:40 [iaxxgenimp.cpp:532]
               init()
    FGE-00006  Attempt to open a communication port connection failed. Check whether the port 21213 is already in use.
    ERROR      2008-03-21 01:16:40
    FCO-00034  An error occurred during the installation. Problem: error in GUI server subsystem.
    Exit status of child: 1
    I check the all the threads posted and did the following
    1. check the another instance is running - no instance running
    2. check port with security team , i come to know that they blocked  this ports security reason.
    so i try with other open ports , even through its giving  the same error.
    so i have one question
    1.is it mandatory to use the same ports 21212 or 21213 etc..
    or can we use any other free ports if so what port numbers we can use?
    becasue i try with different open ports, no use
    as follows"
    c:\sapinst.exe SAPINST_DIALOG_PORT=4238
    Please give any suggestions...
    thnaks in advance
    Gopal

    You reconnect with the GUI to SAPinst and enter the path to the software package or file manually. Then you can continue with the installation.
    You can also change the port nos. 21212 and 21213 to 41212 and 41214
    SAPinst uses the port 21212 during the installation for communication with the SAPinst GUI. If one of these ports is already used by another service you must start SAPinst as follows:
    sapinst SAPINST_DIALOG_PORT=<free_port_number>
    use command  : netstat -s      - > to check the ports being used
    Cheers
    Shaji
    Edited by: Shaji Jacob on Mar 21, 2008 10:53 PM

  • Online Number is already being used by some other ...

    Hi,
    I have bought an online number yesterday 19th June, and after the subscription got activated, I got to know that this number is already in use with some other company. When I dial the same skype online number it rings in some other company's call center.
    Kindly help.
    Regards,
    Deepanshu Dhawan

    it seems that skype messed up numbers somehow. i have online UK number and I'm getting 5-10 call everyday from different german numbers who have missed calls from me. of course i've never called them

  • Check whether the port  21212 is already in use.

    hello ,I am facing the following error "check whether the port  21212 is already in use." i tried to logon using local hostcomputer name and port21212.
    could anybody help me in installing NW04 SR1.
    Thanks & Regards,
    Gopi

    Hello Arun, your solution worked in that aspect and now after that i have got new error in next step by name
    "connection to SAPinst broken.Reason:Network I/O exception:No buffer space available(maximum connections reached):recv failed java.net.SocketException:No buffer space available. Plese correct the error condition and restart the installation".
    Is there any solution for this error?I am using Oracle.
    Thanks & Regards,
    Gopi.

  • Status Agent Not Reachable - How to set a fix port number?

    My EM 10g was working fine http://localhost:5500/em
    Now when I tried, it was not working. I looked into portlist and found out it there was additional port of 5502
    But when I logged into port 5502, Status Agent Not Reachable. Other links were working fine.
    I had even installed another DB called REPOS other than the default ORCL.
    All the services were up and running and I was just bouncing services back and forth and luckly I got the original port 5500 to work and then I did not got the error "Status Agent Not Reachable".
    So I just wanted to know how to set a dedicated port in case the port number changes back to 5502 and if I get the error again.
    Thanks in advance.

    Yes I installed multipe databases for eg ORCL was the default but I installed REPOS.
    I did not uninstall the db.
    Why does it show two different ports for ORCL 5500 and 5502 and for Repos it shows two ports but they are the same 5501.
    Everything is on my local machine.
    Following is from the portlist
    Ultra Search HTTP port number =5620
    Enterprise Manager Agent Port =
    iSQL*Plus HTTP port number =5560
    Enterprise Manager Console HTTP Port (orcl) = 5500
    Enterprise Manager Agent Port (orcl) = 1830
    Enterprise Manager Console HTTP Port (repos) = 5501
    Enterprise Manager Agent Port (repos) = 1831
    Enterprise Manager Console HTTP Port (ORCL) = 5502
    Enterprise Manager Agent Port (ORCL) = 1830
    Enterprise Manager Console HTTP Port (repos) = 5501
    Enterprise Manager Agent Port (repos) = 1831

Maybe you are looking for

  • Problem with Leopard on a Macbook pro

    I'm posting this for my fiance as it's his computer that's acting up and he can't get here himself. The problem goes as this: He went to boot up his macbook pro, which is running leopard and also has windows installed. When he tried to boot up into t

  • Can't get 2 GBs on my 2GB MicroSD

    This may have less to do with my 5300 than my memory card and Mac but I just bought an AData 2GB MicroSD card to squeeze more music onto my phone. The problem is, after I get about 300 MBs on it, the card can't fit anymore music on it. But here's the

  • PO with return to vendor

    Dear Experts Here is the scenario: 1. inbound delivery is created from a PO with a 101 movement and item is received into warehouse. 2. item needs to be returned to vendor 3. Return delivery created using migo with movement code 122. 4. Vendor is goi

  • Multiple Forms need to be generated

    Hi Friends, I have a requirement to issue the Smartfrom for each material in the delivery(I will display some characterstics of each material as a form). This would be called from VL02N through configuration. I have written a driver program and i am

  • Blackberry z 10 Ghost Vpn

    Hello ı have  problem , I have cyber ghost vpn, Cyber ghost vpn is working every model phone (I-Phone and Android) but my blackberry is not worked  I have username and passworrd how can ı setup this application I need to help