Unable to access MongoDB installed on a GCE VM from client desktop Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Come Celebrate our 10 Year Anniversary!mongoDB won't connect remotelyiptables blocking local connection to mongodbCommunication errors while trying to replicate mongodbSomething is filtering 27017 port even then firewall is not workingEnabling WiredTiger engine in MongoDB 3Unable to connect to MongoDB running on AWS EC2 instance via SSHerror while connecting to mongo dbCan not connect to MongoDB with Mongo Compass CEMongoDB, Windows Server, SSL Certificate, Compass Connection Not WorkingMongodb doesn't start on reboot

Generate an RGB colour grid

What does "lightly crushed" mean for cardamon pods?

Wu formula for manifolds with boundary

What do you call the main part of a joke?

Is there any way for the UK Prime Minister to make a motion directly dependent on Government confidence?

Withdrew £2800, but only £2000 shows as withdrawn on online banking; what are my obligations?

For a new assistant professor in CS, how to build/manage a publication pipeline

Is it fair for a professor to grade us on the possession of past papers?

What is homebrew?

Fantasy story; one type of magic grows in power with use, but the more powerful they are, they more they are drawn to travel to their source

Significance of Cersei's obsession with elephants?

Dating a Former Employee

How to Make a Beautiful Stacked 3D Plot

Can melee weapons be used to deliver Contact Poisons?

Did MS DOS itself ever use blinking text?

When was Kai Tak permanently closed to cargo service?

How to tell that you are a giant?

Compare a given version number in the form major.minor.build.patch and see if one is less than the other

What is the longest distance a player character can jump in one leap?

How would a mousetrap for use in space work?

How come Sam didn't become Lord of Horn Hill?

Denied boarding although I have proper visa and documentation. To whom should I make a complaint?

Trademark violation for app?

How to convince students of the implication truth values?



Unable to access MongoDB installed on a GCE VM from client desktop



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Come Celebrate our 10 Year Anniversary!mongoDB won't connect remotelyiptables blocking local connection to mongodbCommunication errors while trying to replicate mongodbSomething is filtering 27017 port even then firewall is not workingEnabling WiredTiger engine in MongoDB 3Unable to connect to MongoDB running on AWS EC2 instance via SSHerror while connecting to mongo dbCan not connect to MongoDB with Mongo Compass CEMongoDB, Windows Server, SSL Certificate, Compass Connection Not WorkingMongodb doesn't start on reboot



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















So I installed MongoDB v4.0 on an Ubuntu 18.10 VM running on Google Compute Engine. Installed successfully, working well with the mongo shell via SSH. Now I wanted to access the database remotely from my desktop.



Following this guide, I edited my /etc/mongod.conf file and commented out the bind_ip line in the following code:



net:



port: 27017



# bindIp: 127.0.0.1



Restarted the service service mongod restart



Also opened the TCP port 27017 on the Google Cloud Platform Firewall.



However, the database is still inaccessible via all means, i.e. the mongo shell installed on my local machine, MongoDB Compass, the server_ip:27017 format on Google Chrome, all fail to connect.



I ran sudo netstat -tlnp via SSH on the VM,



I only got the following line for MongoDB:



tcp 0 0 127.0.0.1:27017 0.0.0.0:* LISTEN 18490/mongod



The 0.0.0.0 line which should have been there indicating that it is open to all connections was still missing.



Can this possibly be a configuration error or is some internal firewall blocking the connection?



Edit: I even made sure iptables isn't causing this.
Issued the commands



iptables -A INPUT -p tcp --destination-port 27017 -m state --state NEW,ESTABLISHED -j ACCEPT



iptables -A OUTPUT -p tcp --source-port 27017 -m state --state ESTABLISHED -j ACCEPT



Still no luck










share|improve this question






























    0















    So I installed MongoDB v4.0 on an Ubuntu 18.10 VM running on Google Compute Engine. Installed successfully, working well with the mongo shell via SSH. Now I wanted to access the database remotely from my desktop.



    Following this guide, I edited my /etc/mongod.conf file and commented out the bind_ip line in the following code:



    net:



    port: 27017



    # bindIp: 127.0.0.1



    Restarted the service service mongod restart



    Also opened the TCP port 27017 on the Google Cloud Platform Firewall.



    However, the database is still inaccessible via all means, i.e. the mongo shell installed on my local machine, MongoDB Compass, the server_ip:27017 format on Google Chrome, all fail to connect.



    I ran sudo netstat -tlnp via SSH on the VM,



    I only got the following line for MongoDB:



    tcp 0 0 127.0.0.1:27017 0.0.0.0:* LISTEN 18490/mongod



    The 0.0.0.0 line which should have been there indicating that it is open to all connections was still missing.



    Can this possibly be a configuration error or is some internal firewall blocking the connection?



    Edit: I even made sure iptables isn't causing this.
    Issued the commands



    iptables -A INPUT -p tcp --destination-port 27017 -m state --state NEW,ESTABLISHED -j ACCEPT



    iptables -A OUTPUT -p tcp --source-port 27017 -m state --state ESTABLISHED -j ACCEPT



    Still no luck










    share|improve this question


























      0












      0








      0








      So I installed MongoDB v4.0 on an Ubuntu 18.10 VM running on Google Compute Engine. Installed successfully, working well with the mongo shell via SSH. Now I wanted to access the database remotely from my desktop.



      Following this guide, I edited my /etc/mongod.conf file and commented out the bind_ip line in the following code:



      net:



      port: 27017



      # bindIp: 127.0.0.1



      Restarted the service service mongod restart



      Also opened the TCP port 27017 on the Google Cloud Platform Firewall.



      However, the database is still inaccessible via all means, i.e. the mongo shell installed on my local machine, MongoDB Compass, the server_ip:27017 format on Google Chrome, all fail to connect.



      I ran sudo netstat -tlnp via SSH on the VM,



      I only got the following line for MongoDB:



      tcp 0 0 127.0.0.1:27017 0.0.0.0:* LISTEN 18490/mongod



      The 0.0.0.0 line which should have been there indicating that it is open to all connections was still missing.



      Can this possibly be a configuration error or is some internal firewall blocking the connection?



      Edit: I even made sure iptables isn't causing this.
      Issued the commands



      iptables -A INPUT -p tcp --destination-port 27017 -m state --state NEW,ESTABLISHED -j ACCEPT



      iptables -A OUTPUT -p tcp --source-port 27017 -m state --state ESTABLISHED -j ACCEPT



      Still no luck










      share|improve this question
















      So I installed MongoDB v4.0 on an Ubuntu 18.10 VM running on Google Compute Engine. Installed successfully, working well with the mongo shell via SSH. Now I wanted to access the database remotely from my desktop.



      Following this guide, I edited my /etc/mongod.conf file and commented out the bind_ip line in the following code:



      net:



      port: 27017



      # bindIp: 127.0.0.1



      Restarted the service service mongod restart



      Also opened the TCP port 27017 on the Google Cloud Platform Firewall.



      However, the database is still inaccessible via all means, i.e. the mongo shell installed on my local machine, MongoDB Compass, the server_ip:27017 format on Google Chrome, all fail to connect.



      I ran sudo netstat -tlnp via SSH on the VM,



      I only got the following line for MongoDB:



      tcp 0 0 127.0.0.1:27017 0.0.0.0:* LISTEN 18490/mongod



      The 0.0.0.0 line which should have been there indicating that it is open to all connections was still missing.



      Can this possibly be a configuration error or is some internal firewall blocking the connection?



      Edit: I even made sure iptables isn't causing this.
      Issued the commands



      iptables -A INPUT -p tcp --destination-port 27017 -m state --state NEW,ESTABLISHED -j ACCEPT



      iptables -A OUTPUT -p tcp --source-port 27017 -m state --state ESTABLISHED -j ACCEPT



      Still no luck







      remote-access google-compute-engine mongodb






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 12 at 7:16







      Tanmay Vij

















      asked Apr 12 at 6:49









      Tanmay VijTanmay Vij

      113




      113




















          1 Answer
          1






          active

          oldest

          votes


















          0














          Solved it. It was indeed a configuration problem and not a firewall issue.



          Apparently MongoDB no longer works fine with bindIp: 0.0.0.0 or commenting out bindIp entirely.



          What worked is that I removed the bindIp line and replaced it with




          bindIpAll: true




          So the final code looks like:




          net:



          port: 27017



          bindIpAll: true



          # bindIp: 127.0.0.1




          P.S. If you're doing this on your server, don't forget to enable MongoDB authentication



          Uncomment the line security:
          And add authorization: 'enabled' below that.




          security:



          authorization: 'enabled'







          share|improve this answer























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "2"
            ;
            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: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            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%2fserverfault.com%2fquestions%2f962727%2funable-to-access-mongodb-installed-on-a-gce-vm-from-client-desktop%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














            Solved it. It was indeed a configuration problem and not a firewall issue.



            Apparently MongoDB no longer works fine with bindIp: 0.0.0.0 or commenting out bindIp entirely.



            What worked is that I removed the bindIp line and replaced it with




            bindIpAll: true




            So the final code looks like:




            net:



            port: 27017



            bindIpAll: true



            # bindIp: 127.0.0.1




            P.S. If you're doing this on your server, don't forget to enable MongoDB authentication



            Uncomment the line security:
            And add authorization: 'enabled' below that.




            security:



            authorization: 'enabled'







            share|improve this answer



























              0














              Solved it. It was indeed a configuration problem and not a firewall issue.



              Apparently MongoDB no longer works fine with bindIp: 0.0.0.0 or commenting out bindIp entirely.



              What worked is that I removed the bindIp line and replaced it with




              bindIpAll: true




              So the final code looks like:




              net:



              port: 27017



              bindIpAll: true



              # bindIp: 127.0.0.1




              P.S. If you're doing this on your server, don't forget to enable MongoDB authentication



              Uncomment the line security:
              And add authorization: 'enabled' below that.




              security:



              authorization: 'enabled'







              share|improve this answer

























                0












                0








                0







                Solved it. It was indeed a configuration problem and not a firewall issue.



                Apparently MongoDB no longer works fine with bindIp: 0.0.0.0 or commenting out bindIp entirely.



                What worked is that I removed the bindIp line and replaced it with




                bindIpAll: true




                So the final code looks like:




                net:



                port: 27017



                bindIpAll: true



                # bindIp: 127.0.0.1




                P.S. If you're doing this on your server, don't forget to enable MongoDB authentication



                Uncomment the line security:
                And add authorization: 'enabled' below that.




                security:



                authorization: 'enabled'







                share|improve this answer













                Solved it. It was indeed a configuration problem and not a firewall issue.



                Apparently MongoDB no longer works fine with bindIp: 0.0.0.0 or commenting out bindIp entirely.



                What worked is that I removed the bindIp line and replaced it with




                bindIpAll: true




                So the final code looks like:




                net:



                port: 27017



                bindIpAll: true



                # bindIp: 127.0.0.1




                P.S. If you're doing this on your server, don't forget to enable MongoDB authentication



                Uncomment the line security:
                And add authorization: 'enabled' below that.




                security:



                authorization: 'enabled'








                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Apr 12 at 7:43









                Tanmay VijTanmay Vij

                113




                113



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Server Fault!


                    • 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%2fserverfault.com%2fquestions%2f962727%2funable-to-access-mongodb-installed-on-a-gce-vm-from-client-desktop%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

                    Club Baloncesto Breogán Índice Historia | Pavillón | Nome | O Breogán na cultura popular | Xogadores | Adestradores | Presidentes | Palmarés | Historial | Líderes | Notas | Véxase tamén | Menú de navegacióncbbreogan.galCadroGuía oficial da ACB 2009-10, páxina 201Guía oficial ACB 1992, páxina 183. Editorial DB.É de 6.500 espectadores sentados axeitándose á última normativa"Estudiantes Junior, entre as mellores canteiras"o orixinalHemeroteca El Mundo Deportivo, 16 setembro de 1970, páxina 12Historia do BreogánAlfredo Pérez, o último canoneiroHistoria C.B. BreogánHemeroteca de El Mundo DeportivoJimmy Wright, norteamericano do Breogán deixará Lugo por ameazas de morteResultados de Breogán en 1986-87Resultados de Breogán en 1990-91Ficha de Velimir Perasović en acb.comResultados de Breogán en 1994-95Breogán arrasa al Barça. "El Mundo Deportivo", 27 de setembro de 1999, páxina 58CB Breogán - FC BarcelonaA FEB invita a participar nunha nova Liga EuropeaCharlie Bell na prensa estatalMáximos anotadores 2005Tempada 2005-06 : Tódolos Xogadores da Xornada""Non quero pensar nunha man negra, mais pregúntome que está a pasar""o orixinalRaúl López, orgulloso dos xogadores, presume da boa saúde económica do BreogánJulio González confirma que cesa como presidente del BreogánHomenaxe a Lisardo GómezA tempada do rexurdimento celesteEntrevista a Lisardo GómezEl COB dinamita el Pazo para forzar el quinto (69-73)Cafés Candelas, patrocinador del CB Breogán"Suso Lázare, novo presidente do Breogán"o orixinalCafés Candelas Breogán firma el mayor triunfo de la historiaEl Breogán realizará 17 homenajes por su cincuenta aniversario"O Breogán honra ao seu fundador e primeiro presidente"o orixinalMiguel Giao recibiu a homenaxe do PazoHomenaxe aos primeiros gladiadores celestesO home que nos amosa como ver o Breo co corazónTita Franco será homenaxeada polos #50anosdeBreoJulio Vila recibirá unha homenaxe in memoriam polos #50anosdeBreo"O Breogán homenaxeará aos seus aboados máis veteráns"Pechada ovación a «Capi» Sanmartín e Ricardo «Corazón de González»Homenaxe por décadas de informaciónPaco García volve ao Pazo con motivo do 50 aniversario"Resultados y clasificaciones""O Cafés Candelas Breogán, campión da Copa Princesa""O Cafés Candelas Breogán, equipo ACB"C.B. Breogán"Proxecto social"o orixinal"Centros asociados"o orixinalFicha en imdb.comMario Camus trata la recuperación del amor en 'La vieja música', su última película"Páxina web oficial""Club Baloncesto Breogán""C. B. Breogán S.A.D."eehttp://www.fegaba.com

                    Vilaño, A Laracha Índice Patrimonio | Lugares e parroquias | Véxase tamén | Menú de navegación43°14′52″N 8°36′03″O / 43.24775, -8.60070

                    Cegueira Índice Epidemioloxía | Deficiencia visual | Tipos de cegueira | Principais causas de cegueira | Tratamento | Técnicas de adaptación e axudas | Vida dos cegos | Primeiros auxilios | Crenzas respecto das persoas cegas | Crenzas das persoas cegas | O neno deficiente visual | Aspectos psicolóxicos da cegueira | Notas | Véxase tamén | Menú de navegación54.054.154.436928256blindnessDicionario da Real Academia GalegaPortal das Palabras"International Standards: Visual Standards — Aspects and Ranges of Vision Loss with Emphasis on Population Surveys.""Visual impairment and blindness""Presentan un plan para previr a cegueira"o orixinalACCDV Associació Catalana de Cecs i Disminuïts Visuals - PMFTrachoma"Effect of gene therapy on visual function in Leber's congenital amaurosis"1844137110.1056/NEJMoa0802268Cans guía - os mellores amigos dos cegosArquivadoEscola de cans guía para cegos en Mortágua, PortugalArquivado"Tecnología para ciegos y deficientes visuales. Recopilación de recursos gratuitos en la Red""Colorino""‘COL.diesis’, escuchar los sonidos del color""COL.diesis: Transforming Colour into Melody and Implementing the Result in a Colour Sensor Device"o orixinal"Sistema de desarrollo de sinestesia color-sonido para invidentes utilizando un protocolo de audio""Enseñanza táctil - geometría y color. Juegos didácticos para niños ciegos y videntes""Sistema Constanz"L'ocupació laboral dels cecs a l'Estat espanyol està pràcticament equiparada a la de les persones amb visió, entrevista amb Pedro ZuritaONCE (Organización Nacional de Cegos de España)Prevención da cegueiraDescrición de deficiencias visuais (Disc@pnet)Braillín, un boneco atractivo para calquera neno, con ou sen discapacidade, que permite familiarizarse co sistema de escritura e lectura brailleAxudas Técnicas36838ID00897494007150-90057129528256DOID:1432HP:0000618D001766C10.597.751.941.162C97109C0155020