Elastic Search startup error - “Common was unexpected at this time.”












28















I have downloaded and extracted elasticsearch and when I run the batch file "elasticsearch.bat' I am getting the following error.



"Common was unexpected at this time."


Solved:



By editing line 46 of the 'bat' file



'%JAVA%' ==> '!JAVA!'










share|improve this question




















  • 2





    this answer should help: stackoverflow.com/questions/50019539/…

    – Val
    Jul 2 '18 at 7:46











  • That did the trick. Thanks for your help.

    – gd vigneshwar
    Jul 2 '18 at 7:50











  • But I couldn't understand the difference between '%' and '!'

    – gd vigneshwar
    Jul 2 '18 at 7:51











  • The third comment in the solution explains it

    – Val
    Jul 2 '18 at 13:39











  • What do you change ? in (`"%JAVA% -cp "!ES_CLASSPATH!" "org.elas... ?

    – ThePassenger
    Dec 6 '18 at 11:49


















28















I have downloaded and extracted elasticsearch and when I run the batch file "elasticsearch.bat' I am getting the following error.



"Common was unexpected at this time."


Solved:



By editing line 46 of the 'bat' file



'%JAVA%' ==> '!JAVA!'










share|improve this question




















  • 2





    this answer should help: stackoverflow.com/questions/50019539/…

    – Val
    Jul 2 '18 at 7:46











  • That did the trick. Thanks for your help.

    – gd vigneshwar
    Jul 2 '18 at 7:50











  • But I couldn't understand the difference between '%' and '!'

    – gd vigneshwar
    Jul 2 '18 at 7:51











  • The third comment in the solution explains it

    – Val
    Jul 2 '18 at 13:39











  • What do you change ? in (`"%JAVA% -cp "!ES_CLASSPATH!" "org.elas... ?

    – ThePassenger
    Dec 6 '18 at 11:49
















28












28








28


8






I have downloaded and extracted elasticsearch and when I run the batch file "elasticsearch.bat' I am getting the following error.



"Common was unexpected at this time."


Solved:



By editing line 46 of the 'bat' file



'%JAVA%' ==> '!JAVA!'










share|improve this question
















I have downloaded and extracted elasticsearch and when I run the batch file "elasticsearch.bat' I am getting the following error.



"Common was unexpected at this time."


Solved:



By editing line 46 of the 'bat' file



'%JAVA%' ==> '!JAVA!'







elasticsearch






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 13 at 12:37









MD. Khairul Basar

2,819102240




2,819102240










asked Jul 2 '18 at 7:45









gd vigneshwargd vigneshwar

253412




253412








  • 2





    this answer should help: stackoverflow.com/questions/50019539/…

    – Val
    Jul 2 '18 at 7:46











  • That did the trick. Thanks for your help.

    – gd vigneshwar
    Jul 2 '18 at 7:50











  • But I couldn't understand the difference between '%' and '!'

    – gd vigneshwar
    Jul 2 '18 at 7:51











  • The third comment in the solution explains it

    – Val
    Jul 2 '18 at 13:39











  • What do you change ? in (`"%JAVA% -cp "!ES_CLASSPATH!" "org.elas... ?

    – ThePassenger
    Dec 6 '18 at 11:49
















  • 2





    this answer should help: stackoverflow.com/questions/50019539/…

    – Val
    Jul 2 '18 at 7:46











  • That did the trick. Thanks for your help.

    – gd vigneshwar
    Jul 2 '18 at 7:50











  • But I couldn't understand the difference between '%' and '!'

    – gd vigneshwar
    Jul 2 '18 at 7:51











  • The third comment in the solution explains it

    – Val
    Jul 2 '18 at 13:39











  • What do you change ? in (`"%JAVA% -cp "!ES_CLASSPATH!" "org.elas... ?

    – ThePassenger
    Dec 6 '18 at 11:49










2




2





this answer should help: stackoverflow.com/questions/50019539/…

– Val
Jul 2 '18 at 7:46





this answer should help: stackoverflow.com/questions/50019539/…

– Val
Jul 2 '18 at 7:46













That did the trick. Thanks for your help.

– gd vigneshwar
Jul 2 '18 at 7:50





That did the trick. Thanks for your help.

– gd vigneshwar
Jul 2 '18 at 7:50













But I couldn't understand the difference between '%' and '!'

– gd vigneshwar
Jul 2 '18 at 7:51





But I couldn't understand the difference between '%' and '!'

– gd vigneshwar
Jul 2 '18 at 7:51













The third comment in the solution explains it

– Val
Jul 2 '18 at 13:39





The third comment in the solution explains it

– Val
Jul 2 '18 at 13:39













What do you change ? in (`"%JAVA% -cp "!ES_CLASSPATH!" "org.elas... ?

– ThePassenger
Dec 6 '18 at 11:49







What do you change ? in (`"%JAVA% -cp "!ES_CLASSPATH!" "org.elas... ?

– ThePassenger
Dec 6 '18 at 11:49














5 Answers
5






active

oldest

votes


















20














I also encountered the same issue while running the batch file "elasticsearch.bat" in windows 10.
I set JAVA_HOME using below command and it worked for me.



set "JAVA_HOME=C:Program FilesJavayour_jdk_version"






share|improve this answer





















  • 1





    I think it depends on your version. Had the error stated by the author and now I have could not find java; set JAVA_HOME or ensure java is in PATH after running this command

    – ThePassenger
    Dec 6 '18 at 11:30











  • Put your installed jdk version at the place of your_jdk_version in the command

    – Shailesh Vikram Singh
    Dec 9 '18 at 16:52











  • As mentioned correctly in this answer, this happens when you try to run Kibana from Windows command line, after you install JAVA, but don't set JAVA_HOME. Thanks!

    – Lizozom
    Jan 22 at 16:05



















3














I placed SET "JAVA_HOME=C:Program FilesJavajdk1.8.0_191" just under SET params='%*' inside "binelasticsearch.bat" and that made it work



@echo off

setlocal enabledelayedexpansion
setlocal enableextensions

SET params='%*'
SET "JAVA_HOME=C:Program FilesJavajdk1.8.0_191"

:loop
......





share|improve this answer

































    2














    I solved this by editing my Environment Variables - System variables - variable named CLASSPATH. The variable contained



    ;C:Program Files (x86)Common FilesEMCExJNIAPIGateway.jar



    I quoted this



    ;"C:Program Files (x86)Common FilesEMCExJNIAPIGateway.jar"



    Everything ran smoothly afterwards. I don't really know what corporate software that jar file relates to, but I'm not bothered if it stops working on my PC.






    share|improve this answer
























    • that solved for me.

      – Arfeen
      Jan 31 at 10:49



















    1














    Remove in path variable like C:Program Files (x86)Common FilesOracleJavajavapath and go for it.



    https://discuss.elastic.co/t/cannot-start-elasticsearch/129779/10?u=ddagsan






    share|improve this answer































      0














      set "JAVA_HOME=C:Program FilesJava\[your_jdk_version]"



      type this with your version of jdk above and retry running the bat file






      share|improve this answer

























        Your Answer






        StackExchange.ifUsing("editor", function () {
        StackExchange.using("externalEditor", function () {
        StackExchange.using("snippets", function () {
        StackExchange.snippets.init();
        });
        });
        }, "code-snippets");

        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "1"
        };
        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%2fstackoverflow.com%2fquestions%2f51131300%2felastic-search-startup-error-common-was-unexpected-at-this-time%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        5 Answers
        5






        active

        oldest

        votes








        5 Answers
        5






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        20














        I also encountered the same issue while running the batch file "elasticsearch.bat" in windows 10.
        I set JAVA_HOME using below command and it worked for me.



        set "JAVA_HOME=C:Program FilesJavayour_jdk_version"






        share|improve this answer





















        • 1





          I think it depends on your version. Had the error stated by the author and now I have could not find java; set JAVA_HOME or ensure java is in PATH after running this command

          – ThePassenger
          Dec 6 '18 at 11:30











        • Put your installed jdk version at the place of your_jdk_version in the command

          – Shailesh Vikram Singh
          Dec 9 '18 at 16:52











        • As mentioned correctly in this answer, this happens when you try to run Kibana from Windows command line, after you install JAVA, but don't set JAVA_HOME. Thanks!

          – Lizozom
          Jan 22 at 16:05
















        20














        I also encountered the same issue while running the batch file "elasticsearch.bat" in windows 10.
        I set JAVA_HOME using below command and it worked for me.



        set "JAVA_HOME=C:Program FilesJavayour_jdk_version"






        share|improve this answer





















        • 1





          I think it depends on your version. Had the error stated by the author and now I have could not find java; set JAVA_HOME or ensure java is in PATH after running this command

          – ThePassenger
          Dec 6 '18 at 11:30











        • Put your installed jdk version at the place of your_jdk_version in the command

          – Shailesh Vikram Singh
          Dec 9 '18 at 16:52











        • As mentioned correctly in this answer, this happens when you try to run Kibana from Windows command line, after you install JAVA, but don't set JAVA_HOME. Thanks!

          – Lizozom
          Jan 22 at 16:05














        20












        20








        20







        I also encountered the same issue while running the batch file "elasticsearch.bat" in windows 10.
        I set JAVA_HOME using below command and it worked for me.



        set "JAVA_HOME=C:Program FilesJavayour_jdk_version"






        share|improve this answer















        I also encountered the same issue while running the batch file "elasticsearch.bat" in windows 10.
        I set JAVA_HOME using below command and it worked for me.



        set "JAVA_HOME=C:Program FilesJavayour_jdk_version"







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Dec 9 '18 at 16:50

























        answered Aug 16 '18 at 7:36









        Shailesh Vikram SinghShailesh Vikram Singh

        536416




        536416








        • 1





          I think it depends on your version. Had the error stated by the author and now I have could not find java; set JAVA_HOME or ensure java is in PATH after running this command

          – ThePassenger
          Dec 6 '18 at 11:30











        • Put your installed jdk version at the place of your_jdk_version in the command

          – Shailesh Vikram Singh
          Dec 9 '18 at 16:52











        • As mentioned correctly in this answer, this happens when you try to run Kibana from Windows command line, after you install JAVA, but don't set JAVA_HOME. Thanks!

          – Lizozom
          Jan 22 at 16:05














        • 1





          I think it depends on your version. Had the error stated by the author and now I have could not find java; set JAVA_HOME or ensure java is in PATH after running this command

          – ThePassenger
          Dec 6 '18 at 11:30











        • Put your installed jdk version at the place of your_jdk_version in the command

          – Shailesh Vikram Singh
          Dec 9 '18 at 16:52











        • As mentioned correctly in this answer, this happens when you try to run Kibana from Windows command line, after you install JAVA, but don't set JAVA_HOME. Thanks!

          – Lizozom
          Jan 22 at 16:05








        1




        1





        I think it depends on your version. Had the error stated by the author and now I have could not find java; set JAVA_HOME or ensure java is in PATH after running this command

        – ThePassenger
        Dec 6 '18 at 11:30





        I think it depends on your version. Had the error stated by the author and now I have could not find java; set JAVA_HOME or ensure java is in PATH after running this command

        – ThePassenger
        Dec 6 '18 at 11:30













        Put your installed jdk version at the place of your_jdk_version in the command

        – Shailesh Vikram Singh
        Dec 9 '18 at 16:52





        Put your installed jdk version at the place of your_jdk_version in the command

        – Shailesh Vikram Singh
        Dec 9 '18 at 16:52













        As mentioned correctly in this answer, this happens when you try to run Kibana from Windows command line, after you install JAVA, but don't set JAVA_HOME. Thanks!

        – Lizozom
        Jan 22 at 16:05





        As mentioned correctly in this answer, this happens when you try to run Kibana from Windows command line, after you install JAVA, but don't set JAVA_HOME. Thanks!

        – Lizozom
        Jan 22 at 16:05













        3














        I placed SET "JAVA_HOME=C:Program FilesJavajdk1.8.0_191" just under SET params='%*' inside "binelasticsearch.bat" and that made it work



        @echo off

        setlocal enabledelayedexpansion
        setlocal enableextensions

        SET params='%*'
        SET "JAVA_HOME=C:Program FilesJavajdk1.8.0_191"

        :loop
        ......





        share|improve this answer






























          3














          I placed SET "JAVA_HOME=C:Program FilesJavajdk1.8.0_191" just under SET params='%*' inside "binelasticsearch.bat" and that made it work



          @echo off

          setlocal enabledelayedexpansion
          setlocal enableextensions

          SET params='%*'
          SET "JAVA_HOME=C:Program FilesJavajdk1.8.0_191"

          :loop
          ......





          share|improve this answer




























            3












            3








            3







            I placed SET "JAVA_HOME=C:Program FilesJavajdk1.8.0_191" just under SET params='%*' inside "binelasticsearch.bat" and that made it work



            @echo off

            setlocal enabledelayedexpansion
            setlocal enableextensions

            SET params='%*'
            SET "JAVA_HOME=C:Program FilesJavajdk1.8.0_191"

            :loop
            ......





            share|improve this answer















            I placed SET "JAVA_HOME=C:Program FilesJavajdk1.8.0_191" just under SET params='%*' inside "binelasticsearch.bat" and that made it work



            @echo off

            setlocal enabledelayedexpansion
            setlocal enableextensions

            SET params='%*'
            SET "JAVA_HOME=C:Program FilesJavajdk1.8.0_191"

            :loop
            ......






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Feb 13 at 12:37









            MD. Khairul Basar

            2,819102240




            2,819102240










            answered Dec 16 '18 at 17:50









            Joshua WaurichJoshua Waurich

            3111




            3111























                2














                I solved this by editing my Environment Variables - System variables - variable named CLASSPATH. The variable contained



                ;C:Program Files (x86)Common FilesEMCExJNIAPIGateway.jar



                I quoted this



                ;"C:Program Files (x86)Common FilesEMCExJNIAPIGateway.jar"



                Everything ran smoothly afterwards. I don't really know what corporate software that jar file relates to, but I'm not bothered if it stops working on my PC.






                share|improve this answer
























                • that solved for me.

                  – Arfeen
                  Jan 31 at 10:49
















                2














                I solved this by editing my Environment Variables - System variables - variable named CLASSPATH. The variable contained



                ;C:Program Files (x86)Common FilesEMCExJNIAPIGateway.jar



                I quoted this



                ;"C:Program Files (x86)Common FilesEMCExJNIAPIGateway.jar"



                Everything ran smoothly afterwards. I don't really know what corporate software that jar file relates to, but I'm not bothered if it stops working on my PC.






                share|improve this answer
























                • that solved for me.

                  – Arfeen
                  Jan 31 at 10:49














                2












                2








                2







                I solved this by editing my Environment Variables - System variables - variable named CLASSPATH. The variable contained



                ;C:Program Files (x86)Common FilesEMCExJNIAPIGateway.jar



                I quoted this



                ;"C:Program Files (x86)Common FilesEMCExJNIAPIGateway.jar"



                Everything ran smoothly afterwards. I don't really know what corporate software that jar file relates to, but I'm not bothered if it stops working on my PC.






                share|improve this answer













                I solved this by editing my Environment Variables - System variables - variable named CLASSPATH. The variable contained



                ;C:Program Files (x86)Common FilesEMCExJNIAPIGateway.jar



                I quoted this



                ;"C:Program Files (x86)Common FilesEMCExJNIAPIGateway.jar"



                Everything ran smoothly afterwards. I don't really know what corporate software that jar file relates to, but I'm not bothered if it stops working on my PC.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 20 '18 at 2:12









                Clive GoutClive Gout

                212




                212













                • that solved for me.

                  – Arfeen
                  Jan 31 at 10:49



















                • that solved for me.

                  – Arfeen
                  Jan 31 at 10:49

















                that solved for me.

                – Arfeen
                Jan 31 at 10:49





                that solved for me.

                – Arfeen
                Jan 31 at 10:49











                1














                Remove in path variable like C:Program Files (x86)Common FilesOracleJavajavapath and go for it.



                https://discuss.elastic.co/t/cannot-start-elasticsearch/129779/10?u=ddagsan






                share|improve this answer




























                  1














                  Remove in path variable like C:Program Files (x86)Common FilesOracleJavajavapath and go for it.



                  https://discuss.elastic.co/t/cannot-start-elasticsearch/129779/10?u=ddagsan






                  share|improve this answer


























                    1












                    1








                    1







                    Remove in path variable like C:Program Files (x86)Common FilesOracleJavajavapath and go for it.



                    https://discuss.elastic.co/t/cannot-start-elasticsearch/129779/10?u=ddagsan






                    share|improve this answer













                    Remove in path variable like C:Program Files (x86)Common FilesOracleJavajavapath and go for it.



                    https://discuss.elastic.co/t/cannot-start-elasticsearch/129779/10?u=ddagsan







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Oct 16 '18 at 10:52









                    ddagsanddagsan

                    1,0881212




                    1,0881212























                        0














                        set "JAVA_HOME=C:Program FilesJava\[your_jdk_version]"



                        type this with your version of jdk above and retry running the bat file






                        share|improve this answer






























                          0














                          set "JAVA_HOME=C:Program FilesJava\[your_jdk_version]"



                          type this with your version of jdk above and retry running the bat file






                          share|improve this answer




























                            0












                            0








                            0







                            set "JAVA_HOME=C:Program FilesJava\[your_jdk_version]"



                            type this with your version of jdk above and retry running the bat file






                            share|improve this answer















                            set "JAVA_HOME=C:Program FilesJava\[your_jdk_version]"



                            type this with your version of jdk above and retry running the bat file







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Feb 13 at 12:36









                            MD. Khairul Basar

                            2,819102240




                            2,819102240










                            answered Nov 20 '18 at 10:11









                            ershersh

                            243




                            243






























                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to Stack Overflow!


                                • 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%2fstackoverflow.com%2fquestions%2f51131300%2felastic-search-startup-error-common-was-unexpected-at-this-time%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

                                鏡平學校

                                ꓛꓣだゔៀៅຸ໢ທຮ໕໒ ,ໂ'໥໓າ໼ឨឲ៵៭ៈゎゔit''䖳𥁄卿' ☨₤₨こゎもょの;ꜹꟚꞖꞵꟅꞛေၦေɯ,ɨɡ𛃵𛁹ޝ޳ޠ޾,ޤޒޯ޾𫝒𫠁သ𛅤チョ'サノބޘދ𛁐ᶿᶇᶀᶋᶠ㨑㽹⻮ꧬ꧹؍۩وَؠ㇕㇃㇪ ㇦㇋㇋ṜẰᵡᴠ 軌ᵕ搜۳ٰޗޮ޷ސޯ𫖾𫅀ल, ꙭ꙰ꚅꙁꚊꞻꝔ꟠Ꝭㄤﺟޱސꧨꧼ꧴ꧯꧽ꧲ꧯ'⽹⽭⾁⿞⼳⽋២៩ញណើꩯꩤ꩸ꩮᶻᶺᶧᶂ𫳲𫪭𬸄𫵰𬖩𬫣𬊉ၲ𛅬㕦䬺𫝌𫝼,,𫟖𫞽ហៅ஫㆔ాఆఅꙒꚞꙍ,Ꙟ꙱エ ,ポテ,フࢰࢯ𫟠𫞶 𫝤𫟠ﺕﹱﻜﻣ𪵕𪭸𪻆𪾩𫔷ġ,ŧآꞪ꟥,ꞔꝻ♚☹⛵𛀌ꬷꭞȄƁƪƬșƦǙǗdžƝǯǧⱦⱰꓕꓢႋ神 ဴ၀க௭எ௫ឫោ ' េㇷㇴㇼ神ㇸㇲㇽㇴㇼㇻㇸ'ㇸㇿㇸㇹㇰㆣꓚꓤ₡₧ ㄨㄟ㄂ㄖㄎ໗ツڒذ₶।ऩछएोञयूटक़कयँृी,冬'𛅢𛅥ㇱㇵㇶ𥄥𦒽𠣧𠊓𧢖𥞘𩔋цѰㄠſtʯʭɿʆʗʍʩɷɛ,əʏダヵㄐㄘR{gỚṖḺờṠṫảḙḭᴮᵏᴘᵀᵷᵕᴜᴏᵾq﮲ﲿﴽﭙ軌ﰬﶚﶧ﫲Ҝжюїкӈㇴffצּ﬘﭅﬈軌'ffistfflſtffतभफɳɰʊɲʎ𛁱𛁖𛁮𛀉 𛂯𛀞నఋŀŲ 𫟲𫠖𫞺ຆຆ ໹້໕໗ๆทԊꧢꧠ꧰ꓱ⿝⼑ŎḬẃẖỐẅ ,ờỰỈỗﮊDžȩꭏꭎꬻ꭮ꬿꭖꭥꭅ㇭神 ⾈ꓵꓑ⺄㄄ㄪㄙㄅㄇstA۵䞽ॶ𫞑𫝄㇉㇇゜軌𩜛𩳠Jﻺ‚Üမ႕ႌႊၐၸဓၞၞၡ៸wyvtᶎᶪᶹစဎ꣡꣰꣢꣤ٗ؋لㇳㇾㇻㇱ㆐㆔,,㆟Ⱶヤマފ޼ޝަݿݞݠݷݐ',ݘ,ݪݙݵ𬝉𬜁𫝨𫞘くせぉて¼óû×ó£…𛅑הㄙくԗԀ5606神45,神796'𪤻𫞧ꓐ㄁ㄘɥɺꓵꓲ3''7034׉ⱦⱠˆ“𫝋ȍ,ꩲ軌꩷ꩶꩧꩫఞ۔فڱێظペサ神ナᴦᵑ47 9238їﻂ䐊䔉㠸﬎ffiﬣ,לּᴷᴦᵛᵽ,ᴨᵤ ᵸᵥᴗᵈꚏꚉꚟ⻆rtǟƴ𬎎

                                Guess what letter conforming each word