TNS-12533: TNS:illegal ADDRESS parameters

  • 1,834 views
  • Read

Several days ago I got this error when I wanted to start a Listener:

TNSLSNR for Linux: Version 11.2.0.4.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/cncldg1/listener/alert/log.xml
Trace information written to /u01/app/oracle/diag/tnslsnr/cncldg1/listener/trace/ora_13916_140673552033600.trc
TNS-12533: TNS:illegal ADDRESS parameters
 TNS-12560: TNS:protocol adapter error
  TNS-00503: Illegal ADDRESS parameters

It was very weird and I could not find the reason at that time. I made sure the listener.ora file was correct and when I created a test VM to verify this issue, I found I could not duplicate it.

I tried to find the root cause of this issue as I did not want to leave any uncertain things on the production server, so I enabled the Listener trace and also traced the progress using strace command. I found a little difference and I knew when the Listener tried to get host address information through getaddrinfo call, the returned value was different.

With the dig output, I got a more clear information:

[oracle@cncldg1 ~]$ dig @172.16.1.3 noexistt

; <<>> DiG 9.9.4-RedHat-9.9.4-51.el7 <<>> @172.16.1.3 noexistt
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 41808
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;noexistt.                      IN      A

;; Query time: 1 msec
;; SERVER: 172.16.1.3#53(172.16.1.3)
;; WHEN: Tue Nov 07 18:52:49 CST 2017
;; MSG SIZE  rcvd: 37

I do not know why the DNS server returns the SERVFAIL for not exist host, and normally the returned value should be NXDOMAIN:

[oracle@cncldg1 ~]$ dig @8.8.8.8 noexistt

; <<>> DiG 9.9.4-RedHat-9.9.4-51.el7 <<>> @8.8.8.8 noexistt
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 56644
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;noexistt.                      IN      A

;; AUTHORITY SECTION:
.                       86398   IN      SOA     a.root-servers.net. nstld.verisign-grs.com. 2017110601 1800 900 604800 86400

;; Query time: 53 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Tue Nov 07 18:54:10 CST 2017
;; MSG SIZE  rcvd: 112

I confirmed this result as changing the DNS server only.

In fact we had set hostname lookup with files first, why the DNS server affected the Listener?

In a word: because of the ipv6.

When ipv6 is enabled, the getaddrinfo call will try to get the address info through the ipv6 protocol first, and will fail as usually we do not place ipv6 mapping in the /etc/hosts file, then will check the DNS server. So the result of DNS lookup will affect the Listener. For ipv4, mostly we place the ip address mapping in the /etc/hosts file, so we could get the correct ipv4 address.

we could not change the DNS server, so below methods could be taken into account:

  1. Add the ipv6 ip address to the /etc/hosts file, easy and suggested.
  2. Using (IP=FIRST) in the listener.ora file
  3. Replace the hostname with ip address

  • by Published on 09/11/2017 01:13:34
  • Repost please keep this link: https://www.dbcloudsvc.com/blogs/oracle/tns-12533-tnsillegal-address-parameters/
Comments  2  Guest  1  Author  1
    • Suzanne
      Suzanne 0

      So is my ip address is illigal ? I dont fully understand

        • NeilZhang
          NeilZhang

          @ Suzanne Dear, this issue was caused by the DNS server. Usually if the host name does not exist, the response should be ‘NXDOMAIN’, while at that time I got ‘SERVFAIL’.

      匿名

      Comment

      Anonymous Write

      :?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

      Decide