jenkinsci / ec2-fleet-plugin

The EC2 Fleet plugin launches EC2 instances as worker nodes for Jenkins CI server, automatically scaling the capacity with the load.
https://plugins.jenkins.io/ec2-fleet/
Apache License 2.0
111 stars 81 forks source link

How i can pass JAVA_OPTS to an agent #444

Closed mrsombre closed 3 months ago

mrsombre commented 3 months ago

Greetings, we have a problem like described in this topic https://community.jenkins.io/t/while-upgrading-jenkins-to-2-426-2-i-am-getting-below-when-connecting-a-node-to-the-jenkins-server/12272 after upgrading nodes to java17. But i haven't find how i can set JAVA_OPTS for agent.

mrsombre commented 3 months ago

Fixed using Environment variables

sudo tee /etc/environment <<EOF
JDK_JAVA_OPTIONS="--add-opens java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED"
EOF