From 46ded3674009e4bb191325351da3ec2d000b1caf Mon Sep 17 00:00:00 2001 From: Bas Meijer Date: Thu, 30 Nov 2023 10:04:05 +0100 Subject: [PATCH] IPv6 in README.md --- .../jfrog/platform/README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Ansible/ansible_collections/jfrog/platform/README.md b/Ansible/ansible_collections/jfrog/platform/README.md index b139a545..7695ff60 100644 --- a/Ansible/ansible_collections/jfrog/platform/README.md +++ b/Ansible/ansible_collections/jfrog/platform/README.md @@ -149,4 +149,21 @@ The JFrog Platform Ansible Collection can be installed on the following operatin * By default, ansible_python_interpreter: "/usr/bin/python3" used , For Centos/RHEL-7, Set this to "/usr/bin/python" . For example ```bash ansible-playbook -vv platform.yml -i hosts.ini -e 'ansible_python_interpreter=/usr/bin/python' -``` \ No newline at end of file +``` + +* How to avoid IPv6 binding + +Some distributions have two entries for localhost in `/etc/hosts`: + +``` +127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 +::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 +``` + +This can cause Java apps trying binding using IPv6, which fails when that's disabled. This causes some tcp ports not listening, like the Artifactory router service. + +Solution: add an extra JAVA_OPTION: `-Djava.net.preferIPv4Stack=true` to this variable: + +``` +artifactory_extra_java_opts: '-server -Xms512m -Xmx4g -Xss256k -XX:+UseG1GC -Djava.net.preferIPv4Stack=true' +```