Hello,
I'm trying to run Elasticsearch 5.1 on Ubuntu 16.04 virtual machine
Elastisearch is starting but crashes with the following errors :
Jan  4 08:02:20 kibana systemd[1]: Starting Elasticsearch... 
Jan  4 08:02:20 kibana systemd[1]: Started Elasticsearch. 
Jan  4 08:02:29 kibana elasticsearch[27073]: java.security.policy: error adding Entry: 
Jan  4 08:02:29 kibana elasticsearch[27073]: #011java .net.MalformedURLException: no protocol: ${codebase.netty-common-4.1.6.Final.jar} 
Jan  4 08:02:29 kibana elasticsearch[27073]: java.security.policy: error adding Entry: 
Jan  4 08:02:29 kibana elasticsearch[27073]: #011java .net.MalformedURLException: no protocol: ${codebase.netty-transport-4.1.6.Final.jar} 
Jan  4 08:02:29 kibana elasticsearch[27073]: java.security.policy: error adding Entry: 
Jan  4 08:02:29 kibana elasticsearch[27073]: #011java .net.MalformedURLException: no protocol: ${codebase.securesm-1.1.jar} 
Jan  4 08:02:29 kibana elasticsearch[27073]: java.security.policy: error adding Entry: 
Jan  4 08:02:29 kibana elasticsearch[27073]: #011java .net.MalformedURLException: no protocol: ${codebase.lucene-core-6.3.0.jar} 
Jan  4 08:02:29 kibana elasticsearch[27073]: java.security.policy: error adding Entry: 
Jan  4 08:02:29 kibana elasticsearch[27073]: #011java .net.MalformedURLException: no protocol: ${codebase.lucene-misc-6.3.0.jar} 
Jan  4 08:02:35 kibana systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE 
Jan  4 08:02:35 kibana systemd[1]: elasticsearch.service: Unit entered failed state. 
Jan  4 08:02:35 kibana systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
I don't understand these issues, can you help me ?
Thanks !
             
            
               
               
               
            
            
           
          
            
              
                JKhondhu  
                (Jymit Singh Khondhu)
               
              
                  
                    January 4, 2017, 10:07am
                   
                   
              2 
               
             
            
              Hi, 
Is this a new installation of 5.1.1? 
Do you have any plugins installed?
This could be coming from the plugin-security.policy however we need to gauge what has occurred previous to this run of ES 5.1.x.
             
            
               
               
               
            
            
           
          
            
            
              Hi JKhondhu,
Thank you for your message.
Yes, ElasticSearch instance is new (setup from official repositories).
No plugins are installed (plugins folder is empty).
             
            
               
               
               
            
            
           
          
            
              
                jasontedor  
                (Jason Tedor)
               
              
                  
                    January 4, 2017, 11:40am
                   
                   
              4 
               
             
            
              This looks suspicious. What Java version (java -version), are you using an old EA JDK 9 build?
             
            
               
               
               
            
            
           
          
            
            
              Here is the java -version output :
openjdk version "9-internal" 
OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src) 
OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)
I have also tried to run with Open JDK 8 but nothing changes about the issue
             
            
               
               
               
            
            
           
          
            
              
                jasontedor  
                (Jason Tedor)
               
              
                  
                    January 4, 2017,  1:43pm
                   
                   
              6 
               
             
            
              As suspected. That EA build of JDK 9 is very old, and you shouldn't be running with any EA build of JDK 9 anyway.
Sorry, but I'm skeptical of this. Are you sure you correctly set JAVA_HOME to point to the JDK 8 install? Would you please completely remove the JDK 9 install from your system?
             
            
               
               
               
            
            
           
          
            
            
              I am running ubuntu gnome 16.10 (fresh install yesterday evening)
I am having the exact same issue. Here is what i did prior...
Installed elastic search from default ubuntu repos. During the process i noticed the version number was not that newest (1.7.X something). 
apt-get purged elasticsearch 
Installed from the default repos 
followed systctl instructions. 
started service 
reviewed status with the above errors. 
Noticed i also had the openjdk-9-jdk installed. 
Installed openjdk-8-jdk. (now i have both installed). 
Not sure how to proceed i set JAVA_HOME to the java 8 jdk 
restarted service 
Same issue. 
 
Pretty sure its an issue between the jdk's and the prior install from default ubuntu repos. I am just not sure how to unwind this and get it working.
Thanks!
             
            
               
               
               
            
            
           
          
            
            
              Figured it out just needed to set-alternatives in apt.
             
            
               
               
               
            
            
           
          
            
            
              Thanks Jason !
ElasticSearch is running now.  The JAVA_HOME environment variable was indeed not correctly set.
             
            
               
               
               
            
            
           
          
            
              
                jasontedor  
                (Jason Tedor)
               
              
                  
                    January 5, 2017, 11:43am
                   
                   
              10 
               
             
            
              You're welcome. I'm glad that you got it sorted out.
             
            
               
               
               
            
            
           
          
            
              
                system  
                (system)
                  Closed 
               
              
                  
                    February 2, 2017, 11:43am
                   
                   
              11 
               
             
            
              This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.