Skip to content
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 misconfigured and/or unavailable #6928

Closed
izhangzhihao opened this Issue Nov 24, 2016 · 36 comments

Comments

Projects
None yet
@izhangzhihao
Copy link

commented Nov 24, 2016

jdk:
  - oraclejdk8

what's wrong with my config?

@BanzaiMan

This comment has been minimized.

Copy link
Member

commented Nov 27, 2016

This looks like a bug. For some reason, we are removing the symlink, but not reloading jdk_switcher. The function still thinks that the $JAVA_HOME is the symlink that's removed, and the switch fails.

Could you try setting $JAVA_HOME to /usr/lib/jvm/java-8-oracle until we fix this?

@BanzaiMan

This comment has been minimized.

Copy link
Member

commented Nov 27, 2016

I think this is the relevant commit: travis-ci/travis-build@59a3db6

@maximgubar

This comment has been minimized.

Copy link

commented Nov 27, 2016

I have similar issue, in my travis config I use php language and sudo trusty dist.
but I install solr on top of it, and some time ago it started to erroring:

The currently defined JAVA_HOME (/usr/lib/jvm/java-8-oracle-amd64) refers
to a location where Java could not be found. Aborting.
Either fix the JAVA_HOME variable or remove it from the
environment so that the system PATH will be searched.

I've tried to solved it as you recommended, defining JAVA_HOME directly, but it still keeps show me the message with old home path.

I have private repo, and payed travis plan, is it the right communication channel, or I should contact you in different channel ?

@BanzaiMan

This comment has been minimized.

Copy link
Member

commented Nov 27, 2016

@maximgubar Sorry about the continued problem. Please email us at support@travis-ci.com.

@izhangzhihao

This comment has been minimized.

Copy link
Author

commented Nov 28, 2016

@BanzaiMan thx! I try "export JAVA_HOME=/usr/lib/jvm/java-8-oracle" and it fixed!

@BanzaiMan

This comment has been minimized.

Copy link
Member

commented Nov 28, 2016

I'm reopening this, since the bug still exists and it should be fixed.

@BanzaiMan BanzaiMan reopened this Nov 28, 2016

@fyockm

This comment has been minimized.

Copy link

commented Dec 1, 2016

Just started seeing the same issue this morning when trying to start elasticsearch on trusty:

$ sudo service elasticsearch start
Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME

FWIW, my .travis.yml looks like this:

sudo: required
dist: trusty
language: node_js
node_js: '6'
cache:
  directories:
  - node_modules
services:
- mongodb
- elasticsearch
addons:
  apt:
    sources:
    - elasticsearch-2.x
    packages:
    - elasticsearch

@meatballhat meatballhat self-assigned this Dec 1, 2016

@MariadeAnton

This comment has been minimized.

Copy link
Member

commented Dec 1, 2016

Since the promotion of the edge image to stable, see: https://docs.travis-ci.com/user/build-environment-updates/2016-12-01/

This issue can now happen for the default configuration.

sudo: required
dist: trusty

jdk:
  - oraclejdk8

Known workarounds are:

  • adding group: deprecated to the .travis.yml file to use the previous stable image
  • add the following lines
before_install:
  - source /opt/jdk_switcher/jdk_switcher.sh
  - jdk_switcher use oraclejdk8

Thank you, we'll post an update when it's resolved!

@meatballhat

This comment has been minimized.

Copy link

commented Dec 1, 2016

I have a runtime patch on the way via travis-ci/travis-build#902

@fyockm

This comment has been minimized.

Copy link

commented Dec 1, 2016

@MariadeAnton thanks for the workarounds. I tried setting JAVA_HOME in before_install. However, that's too late in the build cycle for me because elasticsearch is installed and started via "APT Sources", which occurs prior to before_install.

@meatballhat what's the timeframe for the patch? Will I need to set group: edge, or will it be pushed directly to stable?

@meatballhat

This comment has been minimized.

Copy link

commented Dec 1, 2016

@fyockm that patch will apply to all jobs, and should be live in under ~20m

@meatballhat

This comment has been minimized.

Copy link

commented Dec 1, 2016

@fyockm travis-ci/travis-build#902 is live now, btw 👍 Thanks for your patience! ❤️

@scasagrande-d2l

This comment has been minimized.

Copy link

commented Dec 1, 2016

@meatballhat I now see that source /opt/jdk_switcher/jdk_switcher.sh is being run, but I'm still getting java is not present on your PATH.. Is it now expected that I specify which JRE to use for xvfb?

@meatballhat

This comment has been minimized.

Copy link

commented Dec 1, 2016

@scasagrande-d2l the exact behavior depends on multiple variables. Do you have a job URL to which you can link?

@scasagrande-d2l

This comment has been minimized.

@fyockm

This comment has been minimized.

Copy link

commented Dec 1, 2016

@meatballhat I am also still getting the same error.

here's my job url: https://travis-ci.com/BessemerAlliance/voyant-models/jobs/58184176

@meatballhat

This comment has been minimized.

Copy link

commented Dec 1, 2016

@fyockm @scasagrande-d2l It looks like update-java-alternatives is not successfully switching the system java. Still looking...

klarkc added a commit to klarkc/streaming-list that referenced this issue Dec 1, 2016

@scasagrande-d2l

This comment has been minimized.

Copy link

commented Dec 1, 2016

Any news @meatballhat ?

@kiulkiel

This comment has been minimized.

Copy link

commented Dec 1, 2016

sorry all. so has all my computer issues been you guys? Just not sure if I blamed the wrong person or if it was her. If you have any idea what I'm talking about it would help (ha me asking for help) to know what has been happening. Or do I just sound crazy?

@david-wilson-mcn

This comment has been minimized.

Copy link

commented Dec 1, 2016

the workaround of putting "group: deprecated" in the .travis.yml has been working for me.

@meatballhat

This comment has been minimized.

Copy link

commented Dec 1, 2016

@scasagrande-d2l Sorry for delay. Spinning multiple plates. No update yet for group: stable. Please use group: deprecated to get un-blocked 👍 ❤️

nathandunn added a commit to GMOD/Apollo that referenced this issue Dec 1, 2016

@meatballhat

This comment has been minimized.

Copy link

commented Dec 2, 2016

Latest cookbook changes look promising, fwiw.

@meatballhat

This comment has been minimized.

Copy link

commented Dec 2, 2016

I've hit a snag with one of the stacks that performs a deferred installation of lein. Working on it...

@meatballhat meatballhat changed the title JAVA_HOME is set to an invalid directory: /usr/lib/jvm/java-8-oracle-amd64 java misconfigured and/or unavailable Dec 2, 2016

ehuelsmann added a commit to ehuelsmann/LedgerSMB that referenced this issue Dec 2, 2016

@meatballhat

This comment has been minimized.

Copy link

commented Dec 3, 2016

There are some fresh Trusty stack images available that I'm very much hoping address the remaining issues. I'd appreciate input from anyone here who's able to run their jobs with:

group: edge
@xhochy

This comment has been minimized.

Copy link

commented Dec 3, 2016

Can confirm that the edge images fixes the problem, build with edge: https://travis-ci.org/xhochy/arrow/jobs/180921629

(Failing build with stable: https://travis-ci.org/xhochy/arrow/jobs/180629177 )

@andrerom

This comment has been minimized.

Copy link

commented Dec 5, 2016

Can confirm getting solr to run on a language: php job is broken as of last week.
Besides group: edge/deprecated and script: jdk_switcher use oraclejdk8workarounds, when is eta for fix in stable?

@scasagrande-d2l

This comment has been minimized.

Copy link

commented Dec 5, 2016

Can also confirm that group: edge is working for me now :D

@meatballhat

This comment has been minimized.

Copy link

commented Dec 5, 2016

@andrerom I'm preparing a release for group: stable right now, which will likely go out tomorrow morning US/Eastern 👍

@fyockm

This comment has been minimized.

Copy link

commented Dec 5, 2016

I'll jump on the bandwagon - group: edge fixes it for my use case as well. Thanks @meatballhat!

@meatballhat

This comment has been minimized.

Copy link

commented Dec 5, 2016

This is the group: stable push that will include the fix currently available via group: edge: https://docs.travis-ci.com/user/build-environment-updates/2016-12-06/

Please note that we currently do not have support for multiple group assignment, which means that once the above update goes live, anyone using group: edge will likely experience a regression, as the image most recently tagged group: edge will be from The Past ⌛️

@meatballhat

This comment has been minimized.

Copy link

commented Dec 6, 2016

This build env update is complete https://docs.travis-ci.com/user/build-environment-updates/2016-12-06/. Please holler if you are still experiencing issues on sudo-enabled Trusty that you believe are related to this issue 💖 .

@meatballhat meatballhat closed this Dec 6, 2016

yatch added a commit to yatch/contiki that referenced this issue Dec 6, 2016

yatch added a commit to yatch/contiki that referenced this issue Dec 6, 2016

@scasagrande-d2l

This comment has been minimized.

Copy link

commented Dec 6, 2016

Everything is back to normal for us now :) many thanks @meatballhat, I owe you one :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.