9 Replies Latest reply on Jun 8, 2019 4:45 PM by Alain

    netca cannot parse listener.ora

    Alain

      Hi,

       

      I would like to add a listener to a database on a new NIC in an oracle RAC (oracle linux 6, db 12.2 RAC EE, 2 nic's on each server).

      After filling netca creation screens, I get the error "TNS-04414: File error" .

      According to MOS, netca has problems to parse the listener.ora or listener_endpoints.ora (doc id 457573.1, 333467.1) (Exception occurs also when clicking Listeners in netmgr).

      Problem: they cannot say what's wrong with these files. These are syntactically correct and working (there are several databases on this system), and their solution is to recreate them, things I cannot do as it is a running production system.

      It seems I'm not the first one to encounter this problem.

       

      Does anybody have a hint to know what their parser doesn't like/support?

       

      I checked the following:

      * no special characters

      * every comment (#) is followed by a space

      * all parentheses are correctly closed

      * there is an empty line before each new "tag ="

      * there is an indentation on parentheses (no line begins with a '(' )

       

      Anything else?????

        • 1. Re: netca cannot parse listener.ora
          Dude!

          No one here as access to your support call to determine what has been done already.

           

          Have you checked if there are any strange characters or gremlins in the file. For example, hard space, mixed CR/LF, etc. You can use "cat -vet tnsnames.ora" to check.

           

          Why can you not recrate the listener files? You can reload and restart the listener any time - it will not disconnect running sessions.

          • 2. Re: netca cannot parse listener.ora
            Alain

            I will not recreate all listeners because I have 4 databases and 4 db listeners + 1 asm listener + 1 rac-scan listener + a standby listener. Config is quite complex. So recreate each listener manually: no way.

            There is no special character in it, I checked using cat -vet, files have been uploaded to oracle support that also didn't find any special character. Their answer is the same than you: there is "probably" a wrong char in *listener*.ora. I sent them the files (binary), and they couldn't find any problem in it.

             

            It is according to me one (more) bug in netca (and in netmgr). The new listener could actually be added without any problem using srvctl.

             

            There is one special thing: there is a special listener for ASM because we didn't want ASM to be reachable using the same port than databases. For this listener there is just an IP, no service nor database. Perhaps this is what netca & netmgr don't understand, although files are correct.

            LISTENER_ASM1 =

              (DESCRIPTION_LIST =

                (DESCRIPTION =

                  (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))

                  (ADDRESS = (PROTOCOL = TCP)(HOST = oravmrac01.cards.be.zetes.com.local)(PORT = 1529))

                )

              )

            • 3. Re: netca cannot parse listener.ora
              Dude!

              Considering the time and effort and people involved trying to solve the problem it might have been quicker just to recreate the listener files. I don't know your setup or why it was chosen, but if you are running special listeners and ports to improve security, then sorry, it's just laughable.

               

              I suggest to keep in mind that the default listener names for a database is LISTENER. If I recall correctly, prior to 12c with all the flex stuff, ASM would dynamically register with the LISTENER listener. Since 12c I think it's LISTENER_ASM. If you use other listener names, dynamic registration won't work.

               

              I would normally configure the listener on the ASM (GI) side, since it needs to be up first. The create an TNS_ADMIN environment variable to make sure all tools point in the right direction - and to avoid confusions.

               

              Have you seen https://support.oracle.com/knowledge/Oracle%20Database%20Products/333467_1.html ?

               

              Anyway, if Oracle support can't fix your problem, who can? Do you have a backup of the files?

              • 4. Re: netca cannot parse listener.ora
                M.Fazlollahi

                In which editor you edit listener.ora file?

                is it in ansi?

                can you edit it with vi and save it?

                • 5. Re: netca cannot parse listener.ora
                  Alain

                  listener.ora is ascii, editable with vi and perfectly correct..

                   

                  Confirmations:

                  * netca is bugged and cannot parse some listener.ora files in some configurations.

                  * listeners could be created and updated correctly using srvctl commands, without changing manually listener.ora and endpoints files.

                  • 6. Re: netca cannot parse listener.ora
                    Dude!

                    listener.ora is ascii, editable with vi and perfectly correct..

                    ASCII consists of 255 characters. What you mean is text-only, which is something different. The vi editor is capable of editing text as well as control sequences and other non-printable characters. Hence, there is a potential that files may contain content you do not see.

                     

                    Your issue may stem from combine vi and netca. I suggest to use either netca or vi. It is generally recommended to rely on netca only.

                    • 7. Re: netca cannot parse listener.ora
                      Alain

                      doc id 457573.1, 333467.1 shows netca has bugs. If file was wrong, srvctl would't be able to update it.

                      .ora files have been uploaded to oracle support that couldn't find any error in it.

                      • 8. Re: netca cannot parse listener.ora
                        Dude!

                        What is the purpose of your message? Is it that people should not use netca because of bugs?

                        • 9. Re: netca cannot parse listener.ora
                          Alain

                          Yes. People should be aware that netca has bugs, and that if it fails they should use srvctl commands.