0

We are using Jenkins for CI.

We used

https://github.com/rji/jenkins-standalone

as per

https://github.com/jenkinsci/mesos-plugin

We tried to start jenkins with

"-Dhudson.slaves.NodeProvisioner.MARGIN=50 -Dhudson.slaves.NodeProvisioner.MARGIN0=0.85"

like

# Start the master
export JENKINS_HOME="$(pwd)"

java -jar jenkins.war \
    -Djava.awt.headless=true \

    --webroot=war \
    --httpPort=${PORT} \
    --ajp13Port=-1 \
    --httpListenAddress=0.0.0.0 \
    --ajp13ListenAddress=127.0.0.1 \
    --preferredClassLoader=java.net.URLClassLoader \
    -Dhudson.slaves.NodeProvisioner.MARGIN=30 \
    -Dhudson.slaves.NodeProvisioner.MARGIN0=0.6 \
    --logfile=../jenkins.log

But we are not able to start the jenkins, jenkin logs showing

Running from: /var/jenkins/jenkins-standalone/jenkins.war
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at Main._main(Main.java:293)
        at Main.main(Main.java:98)
Caused by: java.lang.IllegalArgumentException: Multiple command line argument specified: -Djava.hudson.slaves.NodeProvisioner.MARGIN=30
        at winstone.cmdline.CmdLineParser.parse(CmdLineParser.java:68)
        at winstone.Launcher.getArgsFromCommandLine(Launcher.java:361)
        at winstone.Launcher.main(Launcher.java:334)
        ... 6 more

Any suggestions

Thank you.

Rajiv Reddy
  • 153
  • 1
  • 9

1 Answers1

2

Got the solution.

Need to pass

"-Dhudson.slaves.NodeProvisioner.MARGIN=50 -Dhudson.slaves.NodeProvisioner.MARGIN0=0.85"

these variables before

-jar jenkins.war \

Thank you.

Rajiv Reddy
  • 153
  • 1
  • 9