Re: troubleshooting ssl to port 2484 using tnsping

From: Rodrigo Mufalani <>
Date: Thu, 17 Aug 2017 16:54:02 +0000
Message-ID: <>


   Sometime ago I need to check a specific port and had no telnet installed on machine. So, decided to use curl:

Mufalani03:~ mufalani$ curl -v telnet://
* Rebuilt URL to: telnet://

  • Trying
  • Connected to ( port 1521 (#0)

All the best,
[RED] Rodrigo Mufalani - Dir. T├ęcnico
+55 21 988 994 817

+55 21 3193 0326
Rua Almirante Grenfall, 405, Bloco 3, Sala 310 Centro Empresarial Washington Luiz
Duque de Caxias - RJ
CEP 25085-009<>


De: <> em nome de Mladen Gogala <> Responder para: "" <> Data: quinta-feira, 17 de agosto de 2017 12:33 Para: "" <> Assunto: Re: troubleshooting ssl to port 2484 using tnsping

Actually, "nc" is much better than "telnet". The "netcat" utility, also known as "nc" is a veritable Swiss army knife of networking. The command to verify whether the port is responding would be

nc -v -z -w 3 myhost 2484

That would send out a verbose output (-v) for using zero size messages (-z) and waiting for 3 seconds for a reply (-w 3). Here is an example:

mgogala_at_umajor:~$ nc -v -z -w 3 umajor 80 Connection to umajor 80 port [tcp/http] succeeded! mgogala_at_umajor:~$

Before the SQLcl command interpreter that has tnsping built in, I was using a nc-based Perl script called "tnsping" to do that. And it worked just fine, parsing the relevant part of tnsnames.ora was not a problem. For all those Python lovers,there is even a CPAN module for netcat:

And some comments about the eternal Perl vs. Python debate: Python is consistently object oriented. Perl is not. Given that the most of the application software is written using the OO paradigm, Python is probably better for the application writing. However, quick one-off scripts, so frequently written by system and database administrators are usually not object oriented and do not have well defined set of objects to operate on. For such tasks Perl, with its unsurpassed ability to parse strings and the myriad of readily available CPAN modules, is still the best tool for the job. That is why Perl so stubbornly refuses to die, despite the fact that so many "programming gurus" have declared it obsolete. Perl has users, droves of them. Lastly, the idea that indentation matters reminds me of Completely Oudated and Badly Overused Language, or COBOL, for short.

OO languages also tend to be very verbose. Both Java and Python are good examples. Perl can be very short and concise. Snippet like this:

while (<>) {


    next if /^\s*#/;

    if (/..../) {




is definitely not following the OO canon, but is very useful and frequently used in Perl scripts. I have yet to find language which can cram more operations in such a small amount of code.

Finally, to end on the Trumpian note: we should use things made in America, by a guy named Larry, not some suspicious foreign stuff, invented by a guy named Guido. And we can build beautiful scripts, the best scripts in the world and Guido will pay for them....

On 08/16/2017 03:01 PM, MacGregor, Ian A. wrote: Do you have access to telnet? What happens when you run

telnet myhost 2484

on the client. I suspect it is because the connection does not hang. Have you looked at;action=print;num=1128363187

Ian MacGregor
SLAC National Accelerator Laboratory.

On Aug 16, 2017, at 10:19 AM, Jared Still <<>> wrote:

Hi Michael,

What is the output from 'adapters' ?

Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist Principal Consultant at Pythian
Pythian Blog Github:
Oracle Blog:<> Home Page:<>

On Mon, Aug 14, 2017 at 11:01 AM, Michael McMullen <<>> wrote: Oracle (Oracle restart ie. +ASM but single host) OEL 6.5 I'm troubleshooting tcps setup with Oracle. At this point I'm really trying to just narrow my troubleshooting if port 2484 is listening for tcps. No server certs at this time.

Can I just add to the listener.ora file the following (if I've made a typo below assume I have it ok on my server)

(ADDRESS = (PROTOCOL = TCPS)(HOST = myhost)(PORT = 2484))

restart the listener, see that it's listening on port 2484 and then

tnsping "(DECRIPTION=(ADDRESS = (PROTOCOL = TCPS)(HOST = myhost)(PORT = 2484))"

when I do the above tnsping I get TNS-12560: TNS:protocol adapter error while it returns OK (0 msec) when I use tcp and 1521 which is expected.

Just looking for the minimum I need to do to get the tnsping to return ok so I can limit my troubleshooting.




Mladen Gogala

Oracle DBA

Tel: (347) 321-1217


Received on Thu Aug 17 2017 - 18:54:02 CEST

Original text of this message