TNS-12533: TNS:illegal ADDRESS parameters

  • 2
  • 552 views
  • A+
Categories:Oracle

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

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:

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

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

Comment

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

Replies to:2   Visitors  1   Admin  1

    • Suzanne Suzanne 0

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

        • NeilZhang NeilZhang Admin

          @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’.