How to override the port properties when running the JenkinsRule?

7 views
Skip to first unread message

Victor Martinez

unread,
Jan 30, 2019, 3:10:10 PM1/30/19
to Jenkins Developers
Hi guys,

I'm running out of ideas. I'm getting some binding errors when running the tests for the jenkins core locally. Probably that's something I can easily fix by setting the port, but I've no clue where I can find those details, even though I already with  mvn -Pdebug  verify -Dport=18080  but it didn't work (as I saw the property in the source code: (https://github.com/jenkinsci/jenkins-test-harness/blob/6d9d823fffcfac02303a4d330e2ddab9553fe9ac/src/main/java/org/jvnet/hudson/test/JenkinsRule.java#L693)

See the below stacktrace for the record:

java.net.BindException: Can't assign requested address

       at sun.nio.ch.Net.bind0(Native Method)

       at sun.nio.ch.Net.bind(Net.java:433)

       at sun.nio.ch.Net.bind(Net.java:425)

       at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)

       at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)

       at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:298)

       at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)

       at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:236)

       at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)

       at org.eclipse.jetty.server.Server.doStart(Server.java:431)

       at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)

       at org.jvnet.hudson.test.JenkinsRule.createWebServer(JenkinsRule.java:693)

       at org.jvnet.hudson.test.JenkinsRule.newHudson(JenkinsRule.java:619)

       at org.jvnet.hudson.test.JenkinsRule.before(JenkinsRule.java:391)

       at org.jvnet.hudson.test.JenkinsRule$1.evaluate(JenkinsRule.java:544)


Any ideas what's going on and how I can set the port for my running tests?

Thanks

Carlos Sanchez

unread,
Jan 30, 2019, 3:14:16 PM1/30/19
to Jenkins Developers
is it the port or the ip? I've seen that error when it tried to bind to an ip address that did not exist


--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/58d3a6b2-2ea0-41a3-bd53-2b3058e5b744%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Victor Martinez

unread,
Jan 30, 2019, 3:33:41 PM1/30/19
to Jenkins Developers
I see! Then I completely misunderstood the stacktrace when debugging the line ... I need to narrow down what's causing that issue in my local machine. 

Thanks Carlos!

Victor Martinez

unread,
Jan 30, 2019, 3:47:05 PM1/30/19
to Jenkins Developers
Just for the record, an environmental issue in mi end (quite obvious) I basically tweaked my /etc/hosts for some unknown reason and that's where the localhost was wrongly redirected to a wrong IP. Sorry about the spam and thanks Carlos, you really saved my day. 
Reply all
Reply to author
Forward
0 new messages