You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "EvgenyAfanasev (via GitHub)" <gi...@apache.org> on 2023/12/17 08:53:17 UTC

[I] JDK 21 incompatible with Pinot [pinot]

EvgenyAfanasev opened a new issue, #12167:
URL: https://github.com/apache/pinot/issues/12167

   Hi. I have:
   - linux x86_64 machine
   - OpenJDK 21
   - Apache Pinot 1.0.0 binary


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [I] JDK 21 incompatible with Pinot [pinot]

Posted by "EvgenyAfanasev (via GitHub)" <gi...@apache.org>.
EvgenyAfanasev closed issue #12167: JDK 21 incompatible with Pinot
URL: https://github.com/apache/pinot/issues/12167


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [I] JDK 21 incompatible with Pinot [pinot]

Posted by "EvgenyAfanasev (via GitHub)" <gi...@apache.org>.
EvgenyAfanasev commented on issue #12167:
URL: https://github.com/apache/pinot/issues/12167#issuecomment-1868472329

   @gortiz thank you for help. debug logs help me understand that "java" can not be found in PATH :)  
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [I] JDK 21 incompatible with Pinot [pinot]

Posted by "gortiz (via GitHub)" <gi...@apache.org>.
gortiz commented on issue #12167:
URL: https://github.com/apache/pinot/issues/12167#issuecomment-1862816605

   Hi Evgeny, thanks for you interest in Apache Pinot.
   
   First of all, I have to say that Apache Pinot 1.0.0 should work in Java 21, but it is still not officially supported. Next release (1.1.0) will bring official support. Also, as a recommendation, it seems you are using OpenJDK 21, which is not recommended for production usage. Instead it is recommended (not by the Pinot team, but the Java community in general) to use other distributions like Eclipse Temurin, Microsoft JDK, Oracle JDK, Azul OpenJDK, Amazon Corretto, etc.
   
   Anyway, as said, although we don't officially support Java 21, Apache Pinot should run in there. I've downloaded the binary from the web and executed in the same way you did in Linux and didn't have that issue. By the way, have you tried to execute Pinot with other JDK (specially Java 11)? did it work?
   
   Given your bash reports an error in line 203 of pinot-admin, which is:
   ```bash
   if [ "$(jdk_version)" -gt 11 ]; then
   ```
   
   I would say the error is in `jdk_version` bash function, which tries to detect your jvm version in order to modify JAVA_OPTS accordingly.
   
   That script is defined as 
   ```bash
   jdk_version() {
     IFS='
   '
     # remove \r for Cygwin
     lines=$(java -Xms32M -Xmx32M -version 2>&1 | tr '\r' '\n')
     for line in $lines; do
       if test -z $result && echo "$line" | grep -q 'version "'
       then
         ver=$(echo $line | sed -e 's/.*version "\(.*\)"\(.*\)/\1/; 1q')
         # on macOS, sed doesn't support '?'
         if case $ver in "1."*) true;; *) false;; esac;
         then
           result=$(echo $ver | sed -e 's/1\.\([0-9]*\)\(.*\)/\1/; 1q')
         else
           result=$(echo $ver | sed -e 's/\([0-9]*\)\(.*\)/\1/; 1q')
         fi
       fi
     done
     unset IFS
     echo "$result"
   }
   ```
   
   Given you included your `java --version` in the report, I've modified the script to use your `java --version` and it correctly returned `21` for me. So I'm not sure where is the issue.
   
   Can you modify your copy of `bin/pinot-admin.sh` to add `set -x` to the first line of `jdk_version` function? It should be something like:
   ```bash
   jdk_version() {
     set -x
     IFS='
   '
     # remove \r for Cygwin
     lines=$(java -Xms32M -Xmx32M -version 2>&1 | tr '\r' '\n')
     for line in $lines; do
       if test -z $result && echo "$line" | grep -q 'version "'
       then
         ver=$(echo $line | sed -e 's/.*version "\(.*\)"\(.*\)/\1/; 1q')
         # on macOS, sed doesn't support '?'
         if case $ver in "1."*) true;; *) false;; esac;
         then
           result=$(echo $ver | sed -e 's/1\.\([0-9]*\)\(.*\)/\1/; 1q')
         else
           result=$(echo $ver | sed -e 's/\([0-9]*\)\(.*\)/\1/; 1q')
         fi
       fi
     done
     unset IFS
     echo "$result"
   }
   ```
   
   Once you execute with that script you should see something like:
   
   ```
   > bin/pinot-admin.sh StartController -zkAddress 172.16.0.23:2181 -controllerHost 172.16.0.23 -controllerPort 9777 -dataDir /usr/local/pinot/data/controller -clusterName cluster-prod
   
   ++ IFS='
   '
   +++ java -Xms32M -Xmx32M -version
   +++ tr '\r' '\n'
   ++ lines='openjdk version "21" 2023-09-19 LTS
   OpenJDK Runtime Environment Temurin-21+35 (build 21+35-LTS)
   OpenJDK 64-Bit Server VM Temurin-21+35 (build 21+35-LTS, mixed mode, sharing)'
   ++ for line in $lines
   ++ test -z
   ++ echo 'openjdk version "21" 2023-09-19 LTS'
   ++ grep -q 'version "'
   +++ echo 'openjdk version "21" 2023-09-19 LTS'
   +++ sed -e 's/.*version "\(.*\)"\(.*\)/\1/; 1q'
   ++ ver=21
   ++ case $ver in
   ++ false
   +++ echo 21
   +++ sed -e 's/\([0-9]*\)\(.*\)/\1/; 1q'
   ++ result=21
   ++ for line in $lines
   ++ test -z 21
   ++ for line in $lines
   ++ test -z 21
   ++ unset IFS
   ++ echo 21
   SLF4J: Class path contains multiple SLF4J bindings.
   ...
   ```
   
   Which should give us more information about the issue.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [I] JDK 21 incompatible with Pinot [pinot]

Posted by "walterddr (via GitHub)" <gi...@apache.org>.
walterddr commented on issue #12167:
URL: https://github.com/apache/pinot/issues/12167#issuecomment-1861301224

   CC @gortiz  :-) 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org