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

Avoiding IPv6 with extra JAVA_OPTION #347

Closed
bbaassssiiee opened this issue Nov 21, 2023 · 4 comments · Fixed by #349 or #352
Closed

Avoiding IPv6 with extra JAVA_OPTION #347

bbaassssiiee opened this issue Nov 21, 2023 · 4 comments · Fixed by #349 or #352

Comments

@bbaassssiiee
Copy link
Contributor

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.

artifactory_extra_java_opts: -server -Xms512m -Xmx4g -Xss256k -XX:+UseG1GC

artifactory_extra_java_opts: '-server -Xms512m -Xmx4g -Xss256k -XX:+UseG1GC -Djava.net.preferIPv4Stack=true'
@Logeshwarsn
Copy link
Contributor

@bbaassssiiee Thanks for raising this issue. Did you had a chance to test this change from your end ? if it is tested then please provide us the artifactory-service.log with enabling this artifactory_extra_java_opts: '-server -Xms512m -Xmx4g -Xss256k -XX:+UseG1GC -Djava.net.preferIPv4Stack=true'

@Logeshwarsn
Copy link
Contributor

@bbaassssiiee we would like to include in this readme instead of default in vars.

@bbaassssiiee
Copy link
Contributor Author

bbaassssiiee commented Nov 30, 2023

This was tested and here is the log you requested:
artifactory-service.log

@bbaassssiiee
Copy link
Contributor Author

@bbaassssiiee we would like to include in this readme instead of default in vars.

Pull-request to amend the README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants