HI Team,
I am able to connect to Elastic sql CLI but while querying the index data getting below error. Could you please help me on this.
sql> select * from employee; 
Communication error [Cannot POST address http://10.10.18.174:9200/_sql?error_trace  (Unexpected end of file from server)]
 
Thanks, 
Debasis
             
            
               
               
               
            
            
           
          
            
            
              Hi Team,
Any update on the below request.
Thanks, 
Debasis
             
            
               
               
               
            
            
           
          
            
              
                TimV  
                (Tim Vernum)
               
              
                  
                    October 31, 2023,  6:33am
                   
                   
              3 
               
             
            
              Do you have access to curl on the same machine?
What does this give you?
curl http://10.10.18.174:9200/
 
             
            
               
               
               
            
            
           
          
            
            
              @TimV  Thanks for response.
We are getting below response while doing curl.
[root@cb-1 bin]# curl http://10.10.18.174:9200/  
curl: (52) Empty reply from server
 
Thanks, 
Debasis
             
            
               
               
               
            
            
           
          
            
              
                TimV  
                (Tim Vernum)
               
              
                  
                    November 2, 2023,  3:44am
                   
                   
              5 
               
             
            
              The most likely cause is that your ES server is actually running with TLS and you need
curl https://10.10.18.174:9200/
 
If that works then you'll need to apply the same config to the SQL CLI
             
            
               
               
               
            
            
           
          
            
            
              Hi @TimV  ,
Still we are getting below error related to certificate in Elasticsearch.
[root@cb-1 bin]# ./elasticsearch-sql-cli https://elastic:elastic@10.10.18.174:9200  -c -d -v 
sql> 
| select * from employee; 
Communication error [Cannot POST address https://10.10.18.174:9200/_sql?error_trace  (PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target)]
 
Thanks, 
Debasis
             
            
               
               
               
            
            
           
          
            
              
                TimV  
                (Tim Vernum)
               
              
                  
                    November 7, 2023,  4:46am
                   
                   
              7 
               
             
            
              Your Elasticsearch nodes are using a certificate that was issued by a CA that isn't trusted by your JVM.
You'll need to use the -k option to provide a keystore (truststore) to the SQL CLI.
             
            
               
               
               
            
            
           
          
            
              
                system  
                (system)
                  Closed 
               
              
                  
                    December 5, 2023,  4:46am
                   
                   
              8 
               
             
            
              This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.