New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java Version Detection Fails on Ubuntu #469

Closed
mwaeckerlin opened this Issue Jan 4, 2018 · 7 comments

Comments

Projects
None yet
2 participants
@mwaeckerlin
Copy link

mwaeckerlin commented Jan 4, 2018

$ xtfs_cleanup
Java version is . You need JAVA 1.6!!!

reason: on Ubuntu 16.04, /usr/bin/java -version results in:

openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)

1.8.0 is higher than 1.6.0!

So, this line is wrong:

    JVERS=`$JAVA_HOME/bin/java -version 2>&1 | grep "java version" | \
       cut -d " " -f 3`

Please fix it.

Workaround: Just edit the script and remove all lines that test for the java version.

@robert-schmidtke

This comment has been minimized.

Copy link
Contributor

robert-schmidtke commented Jan 4, 2018

Java version is . You need JAVA 1.6!!!

Could you please check whether your JAVA_HOME is set properly. There should be some version reported instead of just the dot.

For reference on my machine:

$ java -version
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
$ ./xtfs_cleanup
invalid number of arguments

usage: xtfs_cleanup [options] uuid:<osd_uuid>

  <osd_uuid> the unique identifier of the OSD to clean

  options:
      -c <creds_file>                  a PKCS#12 file containing user credentials (SSL/GridSSL only)
      -cpass <creds_passphrase>        a pass phrase to decrypt the the user credentials file (SSL/GridSSL only).  Set to '-' to prompt for the passphrase.
      -delete_volumes                  !dangerous! deletes volumes that might be dead
      -dir <uri>                       directory services to use (comma separated, e.g. 'pbrpc://localhost:32638',..)
      -e                               erase potential zombies
      -h                               show usage information
      -i                               interactive mode
      -metadata_keep                   keep metadata (by default metadata is deleted after <timeout> seconds)
      -metadata_timeout <timeout>      delete metadata of zombie files, if the XLocSet has not been updated during the last <timeout> seconds (default: 600)
      -r                               restore zombies found on the OSD
      -stop                            suspends the currently running cleanup process
      -t <trusted_CAs>                 a PKCS#12 file containing a set of certificates from trusted CAs (SSL/GridSSL only)
      -tpass <trusted_passphrase>      a pass phrase to decrypt the trusted CAs file (SSL/GridSSL only).  Set to '-' to prompt for the passphrase.
      -v                               run a version cleanup (only if file content versioning is enabled)
      -wait                            blocks call until the currently running cleanup process has terminated

      --admin_password <passphrase>    administrator password to authorize operation. Set to '-' to prompt for the passphrase.
      --help                           show usage information
      --ssl-protocol <ssl_protocol>    SSL/TLS version to use: sslv3, ssltls, tlsv1, tlsv11, tlsv12. 'ssltls' (default) accepts all versions, the others accept only the exact version they name. 'tlsv12' is available in JDK 7+ only. 'tlsv11' comes with JDK 6 or 7, depending on the vendor.
$ echo $JAVA_HOME
/usr/lib/jvm/java-8-openjdk-amd64
@mwaeckerlin

This comment has been minimized.

Copy link

mwaeckerlin commented Jan 4, 2018

It is what it is on every Ubuntu 16.04: Not set. The variable is not set by default, but /usr/bin/java is linked to the correct version.

marc@pulsar:~$ ls -l /usr/bin/java
lrwxrwxrwx 1 root root 22 Jan  4 11:50 /usr/bin/java -> /etc/alternatives/java
marc@pulsar:~$ ls -l /etc/alternatives/java
lrwxrwxrwx 1 root root 42 Jan  4 11:50 /etc/alternatives/java -> /usr/lib/jvm/java-9-openjdk-amd64/bin/java

The tool should run as is on a standard Ubuntu.

@robert-schmidtke

This comment has been minimized.

Copy link
Contributor

robert-schmidtke commented Jan 5, 2018

Okay I see, I was checking against the current master version. This has been fixed beginning of August 2016. Maybe this is not in the latest stable release yet. Feel free to try the more frequently updated packages available at http://download.opensuse.org/repositories/home:/xtreemfs:/unstable/

They're not unstable, but they receive minor updates regularly.

@mwaeckerlin

This comment has been minimized.

Copy link

mwaeckerlin commented Jan 5, 2018

Well «unstable» is not, what I want on my production server. :)

But in that case, I'll just wait.

@robert-schmidtke

This comment has been minimized.

Copy link
Contributor

robert-schmidtke commented Jan 5, 2018

Like I said, the packages are a lot more up-to-date than the latest "stable" version. They contain bug fixes and performance improvements. The packages are just called "unstable" because they change more often. That does not mean that the XtreemFS software will be unstable.

@mwaeckerlin

This comment has been minimized.

Copy link

mwaeckerlin commented Jan 5, 2018

Well, I don't care about the number of updates, as long as I won't loose my precious data…

So, you mean using unstable branch is 100% safe?

Why don't you update stable more frequently, after unstable changes are tested for a while? For me, that would be the best solution.

@robert-schmidtke

This comment has been minimized.

Copy link
Contributor

robert-schmidtke commented Jan 8, 2018

The unstable branch is perfectly fine to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment