Cannot connect to database hosted at CentOS VM through SQL Developer on Windows





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















I've installed Oracle 12c smoothly today and was able to start lsnrctl and database.
SQL*Plus connection is okay inside VM.
I've set the IP address to be static @ 192.168.0.20 (CentOS VM).



I am able to ping the VM address from Windows but I cannot connect to the database through SQL Developer inside Windows. This is the error I got:




The network adapter is unable to establish the connection




I suspect it may be a firewall problem? But I have opened port 1521 using firewall-cmd.










share|improve this question
















bumped to the homepage by Community 12 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • did you add your VM info to DNS? if not you need to add VM information to windows hosts file under C:WindowsSystem32driversetc and make sure port is opened on Windows

    – Ahmad Abuhasna
    Dec 5 '16 at 8:27








  • 1





    edit your question with the output of lsnrctl status, and netstat -an | grep 1521

    – Philᵀᴹ
    Dec 5 '16 at 8:36











  • Are you sure its port 1521? Are you using Grid Infrastructure? If so you might have created separate listener for Oracle Database.

    – JSapkota
    Dec 5 '16 at 8:49


















0















I've installed Oracle 12c smoothly today and was able to start lsnrctl and database.
SQL*Plus connection is okay inside VM.
I've set the IP address to be static @ 192.168.0.20 (CentOS VM).



I am able to ping the VM address from Windows but I cannot connect to the database through SQL Developer inside Windows. This is the error I got:




The network adapter is unable to establish the connection




I suspect it may be a firewall problem? But I have opened port 1521 using firewall-cmd.










share|improve this question
















bumped to the homepage by Community 12 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • did you add your VM info to DNS? if not you need to add VM information to windows hosts file under C:WindowsSystem32driversetc and make sure port is opened on Windows

    – Ahmad Abuhasna
    Dec 5 '16 at 8:27








  • 1





    edit your question with the output of lsnrctl status, and netstat -an | grep 1521

    – Philᵀᴹ
    Dec 5 '16 at 8:36











  • Are you sure its port 1521? Are you using Grid Infrastructure? If so you might have created separate listener for Oracle Database.

    – JSapkota
    Dec 5 '16 at 8:49














0












0








0








I've installed Oracle 12c smoothly today and was able to start lsnrctl and database.
SQL*Plus connection is okay inside VM.
I've set the IP address to be static @ 192.168.0.20 (CentOS VM).



I am able to ping the VM address from Windows but I cannot connect to the database through SQL Developer inside Windows. This is the error I got:




The network adapter is unable to establish the connection




I suspect it may be a firewall problem? But I have opened port 1521 using firewall-cmd.










share|improve this question
















I've installed Oracle 12c smoothly today and was able to start lsnrctl and database.
SQL*Plus connection is okay inside VM.
I've set the IP address to be static @ 192.168.0.20 (CentOS VM).



I am able to ping the VM address from Windows but I cannot connect to the database through SQL Developer inside Windows. This is the error I got:




The network adapter is unable to establish the connection




I suspect it may be a firewall problem? But I have opened port 1521 using firewall-cmd.







oracle oracle-12c centos vmware






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 6 '16 at 12:27









Andriy M

16.3k63473




16.3k63473










asked Dec 5 '16 at 8:08









Alan ChiangAlan Chiang

1




1





bumped to the homepage by Community 12 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 12 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • did you add your VM info to DNS? if not you need to add VM information to windows hosts file under C:WindowsSystem32driversetc and make sure port is opened on Windows

    – Ahmad Abuhasna
    Dec 5 '16 at 8:27








  • 1





    edit your question with the output of lsnrctl status, and netstat -an | grep 1521

    – Philᵀᴹ
    Dec 5 '16 at 8:36











  • Are you sure its port 1521? Are you using Grid Infrastructure? If so you might have created separate listener for Oracle Database.

    – JSapkota
    Dec 5 '16 at 8:49



















  • did you add your VM info to DNS? if not you need to add VM information to windows hosts file under C:WindowsSystem32driversetc and make sure port is opened on Windows

    – Ahmad Abuhasna
    Dec 5 '16 at 8:27








  • 1





    edit your question with the output of lsnrctl status, and netstat -an | grep 1521

    – Philᵀᴹ
    Dec 5 '16 at 8:36











  • Are you sure its port 1521? Are you using Grid Infrastructure? If so you might have created separate listener for Oracle Database.

    – JSapkota
    Dec 5 '16 at 8:49

















did you add your VM info to DNS? if not you need to add VM information to windows hosts file under C:WindowsSystem32driversetc and make sure port is opened on Windows

– Ahmad Abuhasna
Dec 5 '16 at 8:27







did you add your VM info to DNS? if not you need to add VM information to windows hosts file under C:WindowsSystem32driversetc and make sure port is opened on Windows

– Ahmad Abuhasna
Dec 5 '16 at 8:27






1




1





edit your question with the output of lsnrctl status, and netstat -an | grep 1521

– Philᵀᴹ
Dec 5 '16 at 8:36





edit your question with the output of lsnrctl status, and netstat -an | grep 1521

– Philᵀᴹ
Dec 5 '16 at 8:36













Are you sure its port 1521? Are you using Grid Infrastructure? If so you might have created separate listener for Oracle Database.

– JSapkota
Dec 5 '16 at 8:49





Are you sure its port 1521? Are you using Grid Infrastructure? If so you might have created separate listener for Oracle Database.

– JSapkota
Dec 5 '16 at 8:49










1 Answer
1






active

oldest

votes


















0














try to setting listener, for example



LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.20)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)


tnsname



DBORACLE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.20)(PORT = 2001))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = dboracle)
)
)





share|improve this answer
























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "182"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f157185%2fcannot-connect-to-database-hosted-at-centos-vm-through-sql-developer-on-windows%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    try to setting listener, for example



    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.20)(PORT = 1521))
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    )


    tnsname



    DBORACLE =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.20)(PORT = 2001))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = dboracle)
    )
    )





    share|improve this answer




























      0














      try to setting listener, for example



      LISTENER =
      (DESCRIPTION_LIST =
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      )
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.20)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      )
      )


      tnsname



      DBORACLE =
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.20)(PORT = 2001))
      (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = dboracle)
      )
      )





      share|improve this answer


























        0












        0








        0







        try to setting listener, for example



        LISTENER =
        (DESCRIPTION_LIST =
        (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
        )
        (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.20)(PORT = 1521))
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
        )
        )


        tnsname



        DBORACLE =
        (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.20)(PORT = 2001))
        (CONNECT_DATA =
        (SERVER = DEDICATED)
        (SERVICE_NAME = dboracle)
        )
        )





        share|improve this answer













        try to setting listener, for example



        LISTENER =
        (DESCRIPTION_LIST =
        (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
        )
        (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.20)(PORT = 1521))
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
        )
        )


        tnsname



        DBORACLE =
        (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.20)(PORT = 2001))
        (CONNECT_DATA =
        (SERVER = DEDICATED)
        (SERVICE_NAME = dboracle)
        )
        )






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 5 '16 at 11:57









        Nikolay BaranenkoNikolay Baranenko

        1248




        1248






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Database Administrators Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f157185%2fcannot-connect-to-database-hosted-at-centos-vm-through-sql-developer-on-windows%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Liste der Baudenkmale in Friedland (Mecklenburg)

            Single-Malt-Whisky

            Czorneboh