You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@fluo.apache.org by GitBox <gi...@apache.org> on 2020/05/04 18:58:43 UTC

[GitHub] [fluo-muchos] milleruntime opened a new issue #342: Accumulo fails to start with java 11

milleruntime opened a new issue #342:
URL: https://github.com/apache/fluo-muchos/issues/342


   I was trying to setup a 2.1 cluster with Java 11 and Accumulo will fail to initialize due to the wrong java version.  The cluster is still running Java 8 even with Java 11 configured in mucos.props.
   
   ```
   # The package to use for java 11
   java_package=java-11-openjdk-devel
   ```
   ```
   RUNNING HANDLER [initialize accumulo] *****************************************************************************************************************************************************************************
   Monday 04 May 2020  18:29:21 +0000 (0:00:02.318)       0:03:50.878 ************ 
   
   fatal: [leader1]: FAILED! => {"changed": true
    "cmd": ["/home/centos/install/accumulo-2.1.0-SNAPSHOT/bin/accumulo"
    "init"
    "--clear-instance-name"
    "--instance-name"
    "muchos"
    "--password"
    "secret"]
    "delta": "0:00:00.114641"
    "end": "2020-05-04 18:29:22.102107"
    "msg": "non-zero return code"
    "rc": 1
    "start": "2020-05-04 18:29:21.987466"
    "stderr": "Error: A JNI error has occurred
    please check your installation and try again\nException in thread \"main\" java.lang.UnsupportedClassVersionError: org/apache/accumulo/start/Main has been compiled by a more recent version of the Java Runtime (class file version 55.0)
    this version of the Java Runtime only recognizes class file versions up to 52.0\n\tat java.lang.ClassLoader.defineClass1(Native Method)\n\tat java.lang.ClassLoader.defineClass(ClassLoader.java:756)\n\tat java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)\n\tat java.net.URLClassLoader.defineClass(URLClassLoader.java:468)\n\tat java.net.URLClassLoader.access$100(URLClassLoader.java:74)\n\tat java.net.URLClassLoader$1.run(URLClassLoader.java:369)\n\tat java.net.URLClassLoader$1.run(URLClassLoader.java:363)\n\tat java.security.AccessController.doPrivileged(Native Method)\n\tat java.net.URLClassLoader.findClass(URLClassLoader.java:362)\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:418)\n\tat sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:351)\n\tat sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)"
    "stderr_lines": ["Error: A JNI error has occurred
    please check your installation and try again"
    "Exception in thread \"main\" java.lang.UnsupportedClassVersionError: org/apache/accumulo/start/Main has been compiled by a more recent version of the Java Runtime (class file version 55.0)
    this version of the Java Runtime only recognizes class file versions up to 52.0"
    "\tat java.lang.ClassLoader.defineClass1(Native Method)"
    "\tat java.lang.ClassLoader.defineClass(ClassLoader.java:756)"
    "\tat java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)"
    "\tat java.net.URLClassLoader.defineClass(URLClassLoader.java:468)"
    "\tat java.net.URLClassLoader.access$100(URLClassLoader.java:74)"
    "\tat java.net.URLClassLoader$1.run(URLClassLoader.java:369)"
    "\tat java.net.URLClassLoader$1.run(URLClassLoader.java:363)"
    "\tat java.security.AccessController.doPrivileged(Native Method)"
    "\tat java.net.URLClassLoader.findClass(URLClassLoader.java:362)"
    "\tat java.lang.ClassLoader.loadClass(ClassLoader.java:418)"
    "\tat sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)"
    "\tat java.lang.ClassLoader.loadClass(ClassLoader.java:351)"
    "\tat sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)"]
    "stdout": ""
    "stdout_lines": []}
   ```


----------------------------------------------------------------
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.

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



[GitHub] [fluo-muchos] milleruntime commented on issue #342: Accumulo fails to start with java 11

Posted by GitBox <gi...@apache.org>.
milleruntime commented on issue #342:
URL: https://github.com/apache/fluo-muchos/issues/342#issuecomment-624063237


   Thanks @arvindshmicrosoft I will take a look at it. 


----------------------------------------------------------------
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.

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



[GitHub] [fluo-muchos] arvindshmicrosoft commented on issue #342: Accumulo fails to start with java 11

Posted by GitBox <gi...@apache.org>.
arvindshmicrosoft commented on issue #342:
URL: https://github.com/apache/fluo-muchos/issues/342#issuecomment-623686194


   Ah - for now I think the only option is to run `update-alternatives` or equivalent to set the active JDK. A related problem I've noticed in such cases is that the `JAVA_HOME` variable does not seem to get updated in the `.bashrc` file. So you might need to double-check that as well. If you see this scenario as being a relatively common one, then we can definitely investigate a robust solution to automate handling the mixed versions of Java, using Muchos itself.


----------------------------------------------------------------
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.

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



[GitHub] [fluo-muchos] arvindshmicrosoft commented on issue #342: Accumulo fails to start with java 11

Posted by GitBox <gi...@apache.org>.
arvindshmicrosoft commented on issue #342:
URL: https://github.com/apache/fluo-muchos/issues/342#issuecomment-623926780


   @milleruntime PR #343 should fix this. I tested the same with a "round-trip" scenario involving side-by-side versions of OpenJDK:
   1. Install Accumulo 2.0 with OpenJDK 11 (the first JDK on the nodes), then wipe
   2. Install Accumulo 1.9.3 with OpenJDK 1.8 (becomes the side-by-side JDK), then wipe
   3. Repeat step 1 again
   
   In all cases, I verified that the correct versions of java and javac are being used, and in addition to making sure that Muchos setup succeeded, I also verified Accumulo functionality by creating a new table and scanning it.
   
   Please take a look at the PR when convenient.


----------------------------------------------------------------
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.

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



[GitHub] [fluo-muchos] arvindshmicrosoft commented on issue #342: Accumulo fails to start with java 11

Posted by GitBox <gi...@apache.org>.
arvindshmicrosoft commented on issue #342:
URL: https://github.com/apache/fluo-muchos/issues/342#issuecomment-623676512


   Was this setup run on an existing cluster which already had JDK 8 on it? If so, I have seen issues because update-alternatives (or equivalent) would need to be run on the nodes first to switch to using OpenJDK11. If you can run `sudo update-alternatives --config java` to check on a sample node, it would help confirm if the multiple versions of JDK are responsible for the above situation. Currently Muchos does not execute anything to switch to a specific version of JDK, so a mitigation therein would be to run a script or manually set the JDK version...


----------------------------------------------------------------
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.

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



[GitHub] [fluo-muchos] milleruntime commented on issue #342: Accumulo fails to start with java 11

Posted by GitBox <gi...@apache.org>.
milleruntime commented on issue #342:
URL: https://github.com/apache/fluo-muchos/issues/342#issuecomment-623683014


   Yes, I am using CentOs 7 and with adding the java 11 package to the config, I now have two versions of Java.
   


----------------------------------------------------------------
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.

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