8 Replies Latest reply on Jun 6, 2019 1:16 PM by EdStevens

    Cannot connect to the database

    4005014

      Greetings,

       

      I downloaded the virtual machine from the following link  https://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html  and when I try to access the database or the APEX page I can not do it.

      Connecting through sqlplus system / oracle @ orcl shows me the following error.

          

           ERROR: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

       

      I've been investigating but I can not solve it, does anyone have any idea how to do it?

        • 1. Re: Cannot connect to the database
          EdStevens

          4005014 wrote:

           

          Greetings,

           

          I downloaded the virtual machine from the following link https://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html and when I try to access the database or the APEX page I can not do it.

          Connecting through sqlplus system / oracle @ orcl shows me the following error.

           

          ERROR: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

           

          I've been investigating but I can not solve it, does anyone have any idea how to do it?

          Well, if what you posted as a command ls exactly what you entered, you'd have gotten a different error, due to spaces where they don't belong.  Always, always copy the entire text of the entire command and response, and paste it into your message.

           

          You say you investigated but could not solve it.  But you don't show what you tried.  Since the error says the listener doesn't know of the requested service, we need to see what the listener does know.  Show us the result of  the following command:

           

          lsnrctl status

           

          Also, show the result of

           

          tnsping orcl

           

          And like I said, don't tell us what you think you did and your interpretation of what you got. Show us exactly, by copying the full text from your command session and pasting  into your response.

          • 2. Re: Cannot connect to the database
            4005014

            The connection was made without the blank spaces, they were added when copying and pasting

             

             

            Result of lsnrctl status:

             

            LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 05-JUN-2019 11:24:15

             

            Copyright (c) 1991, 2018, Oracle.  All rights reserved.

             

            Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))

            STATUS of the LISTENER

            ------------------------

            Alias                     LISTENER

            Version                   TNSLSNR for Linux: Version 18.0.0.0.0 - Production

            Start Date                30-MAY-2019 13:20:47

            Uptime                    5 days 22 hr. 3 min. 27 sec

            Trace Level               off

            Security                  ON: Local OS Authentication

            SNMP                      OFF

            Default Service           orclcdb

            Listener Parameter File   /u01/app/oracle/product/version/db_1/network/admin/listener.ora

            Listener Log File         /u01/app/oracle/diag/tnslsnr/mad-5hzckc2/listener/alert/log.xml

            Listening Endpoints Summary...

              (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))

              (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))

            Services Summary...

            Service "64a52f53a7683286e053cda9e80aed76" has 1 instance(s).

              Instance "orclcdb", status READY, has 1 handler(s) for this service...

            Service "784ac9d638bb5f59e0530100007f6047" has 1 instance(s).

              Instance "orclcdb", status READY, has 1 handler(s) for this service...

            Service "orcl" has 1 instance(s).

              Instance "orclcdb", status READY, has 1 handler(s) for this service...

            Service "orclcdb" has 2 instance(s).

              Instance "orclcdb", status UNKNOWN, has 1 handler(s) for this service...

              Instance "orclcdb", status READY, has 1 handler(s) for this service...

            Service "orclcdbXDB" has 1 instance(s).

              Instance "orclcdb", status READY, has 1 handler(s) for this service...

            The command completed successfully

             

             

            Resut of tnsping orcl:

             

            TNS Ping Utility for Linux: Version 18.0.0.0.0 - Production on 05-JUN-2019 11:26:04

             

            Copyright (c) 1997, 2018, Oracle.  All rights reserved.

             

            Used parameter files:

            /u01/app/oracle/product/version/db_1/network/admin/sqlnet.ora

             

             

            Used TNSNAMES adapter to resolve the alias

            Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))

            OK (20 msec)

            • 3. Re: Cannot connect to the database
              EdStevens

              4005014 wrote:

               

              The connection was made without the blank spaces, they were added when copying and pasting

               

               

              Result of lsnrctl status:

               

              LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 05-JUN-2019 11:24:15

               

              Copyright (c) 1991, 2018, Oracle. All rights reserved.

               

              Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))

              STATUS of the LISTENER

              ------------------------

              Alias LISTENER

              Version TNSLSNR for Linux: Version 18.0.0.0.0 - Production

              Start Date 30-MAY-2019 13:20:47

              Uptime 5 days 22 hr. 3 min. 27 sec

              Trace Level off

              Security ON: Local OS Authentication

              SNMP OFF

              Default Service orclcdb

              Listener Parameter File /u01/app/oracle/product/version/db_1/network/admin/listener.ora

              Listener Log File /u01/app/oracle/diag/tnslsnr/mad-5hzckc2/listener/alert/log.xml

              Listening Endpoints Summary...

              (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))

              (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))

              Services Summary...

              Service "64a52f53a7683286e053cda9e80aed76" has 1 instance(s).

              Instance "orclcdb", status READY, has 1 handler(s) for this service...

              Service "784ac9d638bb5f59e0530100007f6047" has 1 instance(s).

              Instance "orclcdb", status READY, has 1 handler(s) for this service...

              Service "orcl" has 1 instance(s).

              Instance "orclcdb", status READY, has 1 handler(s) for this service...

              Service "orclcdb" has 2 instance(s).

              Instance "orclcdb", status UNKNOWN, has 1 handler(s) for this service...

              Instance "orclcdb", status READY, has 1 handler(s) for this service...

              Service "orclcdbXDB" has 1 instance(s).

              Instance "orclcdb", status READY, has 1 handler(s) for this service...

              The command completed successfully

               

               

              Resut of tnsping orcl:

               

              TNS Ping Utility for Linux: Version 18.0.0.0.0 - Production on 05-JUN-2019 11:26:04

               

              Copyright (c) 1997, 2018, Oracle. All rights reserved.

               

              Used parameter files:

              /u01/app/oracle/product/version/db_1/network/admin/sqlnet.ora

               

               

              Used TNSNAMES adapter to resolve the alias

              Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))

              OK (20 msec)

              ok, so your tnsnames.ora is specifying to connect to 'SERVICE_NAME = orcl', and your listener says he has a service 'orcl' registered.  All that looks good, so offhand I'd question if the db was started when you had your failure.  Or you are not looking at the listener on the correct server.  That IP address bothers me.  I know there is something 'special' about 0.0.0.0, but I'm not enough of a network guy to understand that part.  I give all of my vm's their own unique IP, just like we do for the servers in the data center.

              • 4. Re: Cannot connect to the database
                4005014

                The problem is that I can not connect to the pluggable database (orcl) only to the container (orclcdb), when I try to connect is when I fail in the listener. I am new in this world and I do not know how to force the connection with the pdb since without it I can not access from the sqldeveloper to configure a RESTful Services, I appreciate the mere fact that you bother to read all this.

                • 5. Re: Cannot connect to the database
                  4005014

                  The one that can not be accessed is not my fault since the only thing I have done is to import the virtual machine offered by Oracle, I have not touched anything in the configuration and in the download page it does not indicate that anything has to be modified.

                  • 6. Re: Cannot connect to the database
                    EdStevens

                    4005014 wrote:

                     

                    The problem is that I can not connect to the pluggable database (orcl) only to the container (orclcdb), when I try to connect is when I fail in the listener. I am new in this world and I do not know how to force the connection with the pdb since without it I can not access from the sqldeveloper to configure a RESTful Services, I appreciate the mere fact that you bother to read all this.

                    I'm out of ideas at this point.  Perhaps someone else will weigh in.

                    The fact that you can connect to the container proves that your basic networking configuration for the vm is working.

                    • 7. Re: Cannot connect to the database
                      4005014

                      It must be a problem of whoever uploads the virtual machine that came up with a bug or it could be that I downloaded it wrong. Could you try it and see the database? already to rule out that the problem is not where I downloaded. This is the machine https://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html

                      • 8. Re: Cannot connect to the database
                        EdStevens

                        4005014 wrote:

                         

                        It must be a problem of whoever uploads the virtual machine that came up with a bug or it could be that I downloaded it wrong. Could you try it and see the database? already to rule out that the problem is not where I downloaded. This is the machine https://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html

                        Sorry, I don't have the time for that.  I do have my own job that my employer expects me to do.