scylladb / scylla-ansible-roles

Ansible roles for deploying and managing Scylla, Scylla-Manager and Scylla-Monitoring
44 stars 38 forks source link

Nodetool/scylla-jmx fails to start on Amazon Linux #138

Open swarooppatra opened 2 years ago

swarooppatra commented 2 years ago

I created a cluster on Amazon Linux using Ansible playbook. But one of the task failed at https://github.com/scylladb/scylla-ansible-roles/blob/master/ansible-scylla-node/tasks/common.yml#L261.

This task checks status of node using nodetool command. But on Amazon Linux nodetool command fails with below error

$ nodetool status
Using /etc/scylla/scylla.yaml as the config file
nodetool: Failed to connect to '127.0.0.1:7199' - ConnectException: 'Connection refused'.

Reason: Default java on Amazon linux is java-17-amazon-corretto. I think scylla-jmx process doesn't work on Java 17.

Fix: Using update-alternatives change default java to JDK 1.8.

Please update Ansible script to check java version and update default java to 1.8 if available. If Java 1.8 is not available install and use as default java.

vladzcloudius commented 2 years ago

@swarooppatra Could you, please, confirm that jdk-1.8 was installed as a dependency and the only issue is calling the update-alternatives like we already do for Debian variants?

swarooppatra commented 2 years ago

I doubt jdk-8 was installed as part of ansible tasks but jdk-8 comes preinstalled in Amazon Linux. I just ran update-alternatives to change default java to jdk-8 which fixed the issue.

vladzcloudius commented 2 years ago

If it comes pre-installed naturally it doesn't need to be installed again.

@fee-mendes This issue can be fixed as a part of "uniting installation flows" since we already call update-alternaticed for Debian.