<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: how to find a free port to use in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-find-a-free-port-to-use/m-p/3438001#M850409</link>
    <description>Thank you all!&lt;BR /&gt;&lt;BR /&gt;For your explanation, its more clear to me now!</description>
    <pubDate>Wed, 08 Dec 2004 09:03:22 GMT</pubDate>
    <dc:creator>Anders Gullberg</dc:creator>
    <dc:date>2004-12-08T09:03:22Z</dc:date>
    <item>
      <title>how to find a free port to use</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-find-a-free-port-to-use/m-p/3437992#M850400</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;Im trying to help a customer to use an application that want to use port 10000.&lt;BR /&gt;I looked in /etc/services and find that the port is busy. How should i find a port that are free to use for an application?</description>
      <pubDate>Tue, 07 Dec 2004 07:47:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-find-a-free-port-to-use/m-p/3437992#M850400</guid>
      <dc:creator>Anders Gullberg</dc:creator>
      <dc:date>2004-12-07T07:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: how to find a free port to use</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-find-a-free-port-to-use/m-p/3437993#M850401</link>
      <description>Hi,&lt;BR /&gt;Use &lt;BR /&gt;# netstat -a&lt;BR /&gt;To see which port are in use.&lt;BR /&gt;Regards,</description>
      <pubDate>Tue, 07 Dec 2004 07:51:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-find-a-free-port-to-use/m-p/3437993#M850401</guid>
      <dc:creator>Bharat Katkar</dc:creator>
      <dc:date>2004-12-07T07:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to find a free port to use</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-find-a-free-port-to-use/m-p/3437994#M850402</link>
      <description>Hi Bharat,&lt;BR /&gt;&lt;BR /&gt;Maybe a dumb question but is it free to use any port that are not in netstat -a?&lt;BR /&gt;How do i lock that port to the application?</description>
      <pubDate>Tue, 07 Dec 2004 07:55:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-find-a-free-port-to-use/m-p/3437994#M850402</guid>
      <dc:creator>Anders Gullberg</dc:creator>
      <dc:date>2004-12-07T07:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: how to find a free port to use</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-find-a-free-port-to-use/m-p/3437995#M850403</link>
      <description>A port that is listed in /etc/services is not necessarly used. It is just a Database referencing which process is commonly using this port.&lt;BR /&gt;&lt;BR /&gt;netstat -a will give you used ports.&lt;BR /&gt;&lt;BR /&gt;Once your program is launched, it opens the port. No other program will then be able to open the port. It is a kind of lock.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Fred&lt;BR /&gt;</description>
      <pubDate>Tue, 07 Dec 2004 09:06:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-find-a-free-port-to-use/m-p/3437995#M850403</guid>
      <dc:creator>Fred Ruffet</dc:creator>
      <dc:date>2004-12-07T09:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to find a free port to use</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-find-a-free-port-to-use/m-p/3437996#M850404</link>
      <description>Hi Fred,&lt;BR /&gt;and thanks for your explanation.&lt;BR /&gt;The application wanted port 10000 and its not in use when i look in netstat -a.&lt;BR /&gt;But still its give a error message.&lt;BR /&gt;I tried to telnet to port 10000 and 10001 and it gives connection refused. Shouldnt that work?&lt;BR /&gt;&lt;BR /&gt;//Anders</description>
      <pubDate>Tue, 07 Dec 2004 09:56:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-find-a-free-port-to-use/m-p/3437996#M850404</guid>
      <dc:creator>Anders Gullberg</dc:creator>
      <dc:date>2004-12-07T09:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to find a free port to use</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-find-a-free-port-to-use/m-p/3437997#M850405</link>
      <description>If you attempt to telnet using ports 10000 and 10001 and get a connection refused, that means that there is no currently operating listener on that port. You should note that both ports 10000 and 10001 are registered ports and therefore should not be used. Your vendor should have made a wiser choice because he is asking for collision with other applications. Having said this, as long as the port is not being used, it can be used for your servive but the question is "should it be used?".&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.iana.org/assignments/port-numbers" target="_blank"&gt;http://www.iana.org/assignments/port-numbers&lt;/A&gt;</description>
      <pubDate>Tue, 07 Dec 2004 10:12:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-find-a-free-port-to-use/m-p/3437997#M850405</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-12-07T10:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: how to find a free port to use</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-find-a-free-port-to-use/m-p/3437998#M850406</link>
      <description>From Clay's post, we can see that 1521 port does not belong to Oracle... :) they should use 66 or 1525 port.&lt;BR /&gt;&lt;BR /&gt;Don't your application offers you a way to configure which port it is listening to ?&lt;BR /&gt;&lt;BR /&gt;Isn't there a log to see why it does not listen on 10000 once launched ?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Fred&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 07 Dec 2004 10:33:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-find-a-free-port-to-use/m-p/3437998#M850406</guid>
      <dc:creator>Fred Ruffet</dc:creator>
      <dc:date>2004-12-07T10:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: how to find a free port to use</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-find-a-free-port-to-use/m-p/3437999#M850407</link>
      <description>As stated above, /etc/services is only a "map" to who uses what ports.  &lt;BR /&gt;&lt;BR /&gt;"lsof" will also show ports used, if you have it.  You can get it from one of the "porting centers" (I could look it up for you...)&lt;BR /&gt;&lt;BR /&gt;You should use "netstat -a" to identify the "generally used" ports on your system, then pick a port that is:&lt;BR /&gt;a.  Not used in netstat -a&lt;BR /&gt;b.  Not listed in /etc/services.&lt;BR /&gt;&lt;BR /&gt;Then, after testing, you should edit /etc/services to put your new port in it, so the next SA will know what is going on.&lt;BR /&gt;&lt;BR /&gt;Ports below 1024 are reserved for hp-ux.&lt;BR /&gt;&lt;BR /&gt;Many programs, such as ftp and nfs, pick random unused ports to use for short periods, and then release them.  They may have ranges within which they pick.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 07 Dec 2004 11:00:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-find-a-free-port-to-use/m-p/3437999#M850407</guid>
      <dc:creator>Stuart Abramson</dc:creator>
      <dc:date>2004-12-07T11:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to find a free port to use</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-find-a-free-port-to-use/m-p/3438000#M850408</link>
      <description>The port numbers are divided into three ranges: &lt;BR /&gt;The Well Known Ports are those from 0 through 1023.&lt;BR /&gt;The Registered Ports are those from 1024 through 49151&lt;BR /&gt;The Dynamic and/or Private Ports are those from 49152 through 65535&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Your vendor should make use of an open port on your system above 49151.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;mark</description>
      <pubDate>Tue, 07 Dec 2004 15:36:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-find-a-free-port-to-use/m-p/3438000#M850408</guid>
      <dc:creator>Mark Greene_1</dc:creator>
      <dc:date>2004-12-07T15:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to find a free port to use</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-find-a-free-port-to-use/m-p/3438001#M850409</link>
      <description>Thank you all!&lt;BR /&gt;&lt;BR /&gt;For your explanation, its more clear to me now!</description>
      <pubDate>Wed, 08 Dec 2004 09:03:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-find-a-free-port-to-use/m-p/3438001#M850409</guid>
      <dc:creator>Anders Gullberg</dc:creator>
      <dc:date>2004-12-08T09:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to find a free port to use</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-find-a-free-port-to-use/m-p/3438002#M850410</link>
      <description>You should avoid ports listed on &lt;BR /&gt;&lt;A href="http://www.iana.org/assignments/port-numbers" target="_blank"&gt;http://www.iana.org/assignments/port-numbers&lt;/A&gt;&lt;BR /&gt;for uses other than listed.&lt;BR /&gt;&lt;BR /&gt;That being said webmin uses 10000 by default&lt;BR /&gt;but it is now registered for other uses.&lt;BR /&gt;Oracle traditionally uses port 1521, which&lt;BR /&gt;is registered otherwise. &lt;BR /&gt;&lt;BR /&gt;If you are sure the registered service won't&lt;BR /&gt;be installed on the server.  Then there is&lt;BR /&gt;no strong reason not to use that port.  &lt;BR /&gt;&lt;BR /&gt;However, it is good practice to avoid using &lt;BR /&gt;ports assigned to well-known services such&lt;BR /&gt;as WWW, HTTPS, SMTP, and other services &lt;BR /&gt;covered by the RFCs for services other than&lt;BR /&gt;intended.  Likewise, these services should&lt;BR /&gt;be run on their assigned ports.&lt;BR /&gt;&lt;BR /&gt;On unix ports 0-1024 are restricted to use by&lt;BR /&gt;programs started by root.  This are generally&lt;BR /&gt;trusted ports.  Windows and other OSs don't&lt;BR /&gt;follow this restriction, so you can no longer&lt;BR /&gt;count on connections on these ports being &lt;BR /&gt;blessed by a sys admin.&lt;BR /&gt;&lt;BR /&gt;As noted add the port usage to your &lt;BR /&gt;/etc/services file.  You may also want to &lt;BR /&gt;have an extra .local or .patch file to retain&lt;BR /&gt;the changes if the file gets upgraded.&lt;BR /&gt;Comment out the original assignment if reusing the port.&lt;BR /&gt;</description>
      <pubDate>Wed, 08 Dec 2004 09:28:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-find-a-free-port-to-use/m-p/3438002#M850410</guid>
      <dc:creator>Bill Thorsteinson</dc:creator>
      <dc:date>2004-12-08T09:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to find a free port to use</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-find-a-free-port-to-use/m-p/3438003#M850411</link>
      <description>Once your application claims to have started, make sure it is running with ps -ef | grep app binary and make sure it has created its listen endpoints on ports 10000 and 10001 with netstat -a | grep tcp | grep LISTEN  or netstat -a | grep 1000&lt;BR /&gt;&lt;BR /&gt;If you get a connection refused when you try to telnet to those port numbers on the server, it suggests one or more of:&lt;BR /&gt;&lt;BR /&gt;*) application is not actually running&lt;BR /&gt;*) application's attempt to create the listen endpoint failed&lt;BR /&gt;*) inetd.sec isn't allowing the connection&lt;BR /&gt;*) someother nasty firewall hasn't had those ports opened&lt;BR /&gt;*) whatever else I've forgotten&lt;BR /&gt;&lt;BR /&gt;The official port ranges have been given - some of the historical was that the anonymous/ephemperal ports started at 5000 (or was it 5001).  Either way, your app vendor should have a mechanism for you to choose the port, and they should obtain a registered port number.</description>
      <pubDate>Wed, 08 Dec 2004 11:27:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-find-a-free-port-to-use/m-p/3438003#M850411</guid>
      <dc:creator>rick jones</dc:creator>
      <dc:date>2004-12-08T11:27:16Z</dc:date>
    </item>
  </channel>
</rss>

