Elasticsearch remote access between two separate ubuntu servers












0















We are running a website on ubuntu 16.04 where we are going to use a search function that uses Elasticsearch. We plan to have multiple projects with each project having two indexes. For that reason we setup another ubuntu server with a decent ram only for housing Elasticsearch.



Our question is; Whats the best way to integrate these two servers to be able to use Elasticsearch on the website? Is there a plugin to use to further secure the integration or our best shot is to use ES's configs?



Thanks










share|improve this question



























    0















    We are running a website on ubuntu 16.04 where we are going to use a search function that uses Elasticsearch. We plan to have multiple projects with each project having two indexes. For that reason we setup another ubuntu server with a decent ram only for housing Elasticsearch.



    Our question is; Whats the best way to integrate these two servers to be able to use Elasticsearch on the website? Is there a plugin to use to further secure the integration or our best shot is to use ES's configs?



    Thanks










    share|improve this question

























      0












      0








      0








      We are running a website on ubuntu 16.04 where we are going to use a search function that uses Elasticsearch. We plan to have multiple projects with each project having two indexes. For that reason we setup another ubuntu server with a decent ram only for housing Elasticsearch.



      Our question is; Whats the best way to integrate these two servers to be able to use Elasticsearch on the website? Is there a plugin to use to further secure the integration or our best shot is to use ES's configs?



      Thanks










      share|improve this question














      We are running a website on ubuntu 16.04 where we are going to use a search function that uses Elasticsearch. We plan to have multiple projects with each project having two indexes. For that reason we setup another ubuntu server with a decent ram only for housing Elasticsearch.



      Our question is; Whats the best way to integrate these two servers to be able to use Elasticsearch on the website? Is there a plugin to use to further secure the integration or our best shot is to use ES's configs?



      Thanks







      16.04 server remote-access elasticsearch






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 21 at 12:08









      Umid AlnuaimiUmid Alnuaimi

      11




      11






















          1 Answer
          1






          active

          oldest

          votes


















          0














          We found the solution.
          In elasticsearch.yml we did the following:



          network.host: internal ip address of ES server (Server B)
          http.port: 9200
          transport.host: internal ip address of ES server (Server B)
          transport.tcp.port: 9300


          We gave the internal IP address of the server which houses Elasticsearch (Server B). And then in the firewall we gave access permission for the internal IP of the application server (Server A). (These two servers are in the same network in the data center).



          By that we are able to curl from Server A using the internal IP of Server B to get results from Elasticsearch.



          Now we are getting the following result from Php.



          array(2) { ["result"]=> bool(true) ["data"]=> array(3) { ["acknowledged"]=> bool(true) ["shards_acknowledged"]=> bool(true) ["index"]=> string(23) "project_name" } }


          For anyone interested in some more details I'll be glad to help.






          share|improve this answer

























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "89"
            };
            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%2faskubuntu.com%2fquestions%2f1111632%2felasticsearch-remote-access-between-two-separate-ubuntu-servers%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














            We found the solution.
            In elasticsearch.yml we did the following:



            network.host: internal ip address of ES server (Server B)
            http.port: 9200
            transport.host: internal ip address of ES server (Server B)
            transport.tcp.port: 9300


            We gave the internal IP address of the server which houses Elasticsearch (Server B). And then in the firewall we gave access permission for the internal IP of the application server (Server A). (These two servers are in the same network in the data center).



            By that we are able to curl from Server A using the internal IP of Server B to get results from Elasticsearch.



            Now we are getting the following result from Php.



            array(2) { ["result"]=> bool(true) ["data"]=> array(3) { ["acknowledged"]=> bool(true) ["shards_acknowledged"]=> bool(true) ["index"]=> string(23) "project_name" } }


            For anyone interested in some more details I'll be glad to help.






            share|improve this answer






























              0














              We found the solution.
              In elasticsearch.yml we did the following:



              network.host: internal ip address of ES server (Server B)
              http.port: 9200
              transport.host: internal ip address of ES server (Server B)
              transport.tcp.port: 9300


              We gave the internal IP address of the server which houses Elasticsearch (Server B). And then in the firewall we gave access permission for the internal IP of the application server (Server A). (These two servers are in the same network in the data center).



              By that we are able to curl from Server A using the internal IP of Server B to get results from Elasticsearch.



              Now we are getting the following result from Php.



              array(2) { ["result"]=> bool(true) ["data"]=> array(3) { ["acknowledged"]=> bool(true) ["shards_acknowledged"]=> bool(true) ["index"]=> string(23) "project_name" } }


              For anyone interested in some more details I'll be glad to help.






              share|improve this answer




























                0












                0








                0







                We found the solution.
                In elasticsearch.yml we did the following:



                network.host: internal ip address of ES server (Server B)
                http.port: 9200
                transport.host: internal ip address of ES server (Server B)
                transport.tcp.port: 9300


                We gave the internal IP address of the server which houses Elasticsearch (Server B). And then in the firewall we gave access permission for the internal IP of the application server (Server A). (These two servers are in the same network in the data center).



                By that we are able to curl from Server A using the internal IP of Server B to get results from Elasticsearch.



                Now we are getting the following result from Php.



                array(2) { ["result"]=> bool(true) ["data"]=> array(3) { ["acknowledged"]=> bool(true) ["shards_acknowledged"]=> bool(true) ["index"]=> string(23) "project_name" } }


                For anyone interested in some more details I'll be glad to help.






                share|improve this answer















                We found the solution.
                In elasticsearch.yml we did the following:



                network.host: internal ip address of ES server (Server B)
                http.port: 9200
                transport.host: internal ip address of ES server (Server B)
                transport.tcp.port: 9300


                We gave the internal IP address of the server which houses Elasticsearch (Server B). And then in the firewall we gave access permission for the internal IP of the application server (Server A). (These two servers are in the same network in the data center).



                By that we are able to curl from Server A using the internal IP of Server B to get results from Elasticsearch.



                Now we are getting the following result from Php.



                array(2) { ["result"]=> bool(true) ["data"]=> array(3) { ["acknowledged"]=> bool(true) ["shards_acknowledged"]=> bool(true) ["index"]=> string(23) "project_name" } }


                For anyone interested in some more details I'll be glad to help.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Jan 24 at 10:59

























                answered Jan 24 at 8:21









                Umid AlnuaimiUmid Alnuaimi

                11




                11






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Ask Ubuntu!


                    • 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%2faskubuntu.com%2fquestions%2f1111632%2felasticsearch-remote-access-between-two-separate-ubuntu-servers%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

                    mysqli_query(): Empty query in /home/lucindabrummitt/public_html/blog/wp-includes/wp-db.php on line 1924

                    How to change which sound is reproduced for terminal bell?

                    Can I use Tabulator js library in my java Spring + Thymeleaf project?