pingcap / pingcap/tiup

tiup cluster check ‘java’;`java_home` not work

Open
#1,214 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type/bug
Dominant language
Go
Stars
466
Forks
338
Avg merge
3d 7h
Merged PRs (30d)
8

Description

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?

5.129 host
vim /etc/profile

export JAVA_HOME=/opt/jdk-11.0.10
export PATH=$JAVA_HOME/bin:$PATH

5.203

yum install java -y

yaml 1 - example

tispark_masters:
  - host: 172.16.5.129

tispark_workers:
  - host: 172.16.5.203
172.16.5.203  command     Pass    java: openjdk version "1.8.0_282"
172.16.5.203  command     Pass    java: openjdk version "1.8.0_282"
172.16.5.129  command     Fail    java not usable, bash: java: command not found
172.16.5.129  command     Fail    java not usable, bash: java: command not found

yaml 2 - example

tispark_masters:
  - host: 172.16.5.129
  java_home: /opt/jdk-11.0.10

tispark_workers:
  - host: 172.16.5.203
172.16.5.203  command     Pass    java: openjdk version "1.8.0_282"
172.16.5.203  command     Pass    java: openjdk version "1.8.0_282"
172.16.5.129  command     Fail    java not usable, bash: java: command not found
172.16.5.129  command     Fail    java not usable, bash: java: command not found

yaml 3 - example

5.129 host

ln -s  /opt/jdk-11.0.10/bin/java /bin/java

/bin/java -version
java version "11.0.10" 2021-01-19 LTS
172.16.5.203  command     Pass    java: openjdk version "1.8.0_282"
172.16.5.203  command     Pass    java: openjdk version "1.8.0_282"
172.16.5.129  command     Pass    java: java version "11.0.10" 2021-01-19 LTS
172.16.5.129  command     Pass    java: java version "11.0.10" 2021-01-19 LTS

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the tiup cluster check path that validates Java and reads the per-host java_home value; reproduce the three YAML and host setups in the report. Done means a configured java_home is used during the check and the host with /opt/jdk-11.0.10 reports Java as usable without a /bin/java symlink.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, java
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.