jenkinsci / selenium-plugin

Jenkins selenium plugin
https://plugins.jenkins.io/selenium/
MIT License
113 stars 106 forks source link

Selenium Grid Hub not starting up on install #49

Closed kuroiokami closed 8 years ago

kuroiokami commented 9 years ago

This is the error I see in the console. What could be happening?

Starting Selenium Grid [jenkins_home] $ /opt/bitnami/java/bin/java -cp /opt/bitnami/apache-tomcat/webapps/jenkins/WEB-INF/lib/remoting-2.51.jar hudson.remoting.Launcher -cp /opt/bitnami/apps/jenkins/jenkins_home/plugins/selenium/WEB-INF/lib/selenium-server-standalone-2.41.0.jar -connectTo localhost:53241 Starting Selenium Grid channel started 2015-06-08 18:26:03.764:INFO:osjs.Server:jetty-7.x.y-SNAPSHOT 2015-06-08 18:26:03.868:INFO:osjsh.ContextHandler:started o.s.j.s.ServletContextHandler{/,null} 2015-06-08 18:26:03.899:WARN:osjuc.AbstractLifeCycle:FAILED SocketConnector@bitnami-jenkins-2516.cloudapp.net:4444: java.net.BindException: Cannot assign requested address java.net.BindException: Cannot assign requested address at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.AbstractPlainSocketImpl.bind(Unknown Source) at java.net.ServerSocket.bind(Unknown Source) at java.net.ServerSocket.(Unknown Source) at org.seleniumhq.jetty7.server.bio.SocketConnector.newServerSocket(SocketConnector.java:91) at org.seleniumhq.jetty7.server.bio.SocketConnector.open(SocketConnector.java:80) at org.seleniumhq.jetty7.server.AbstractConnector.doStart(AbstractConnector.java:311) at org.seleniumhq.jetty7.server.bio.SocketConnector.doStart(SocketConnector.java:151) at org.seleniumhq.jetty7.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) at org.seleniumhq.jetty7.server.Server.doStart(Server.java:272) at org.seleniumhq.jetty7.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) at org.openqa.grid.web.Hub.start(Hub.java:167) at hudson.plugins.selenium.HubLauncher.call(HubLauncher.java:46) at hudson.plugins.selenium.HubLauncher.call(HubLauncher.java:20) at hudson.remoting.UserRequest.perform(UserRequest.java:121) at hudson.remoting.UserRequest.perform(UserRequest.java:49) at hudson.remoting.Request$2.run(Request.java:325) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

darkrift commented 9 years ago

Is there already a process running using that port ?

Richard Lavoie

On 2015-06-08, at 15:07, kuroiokami notifications@github.com wrote:

This is the error I see in the console. What could be happening?

Starting Selenium Grid [jenkins_home] $ /opt/bitnami/java/bin/java -cp /opt/bitnami/apache-tomcat/webapps/jenkins/WEB-INF/lib/remoting-2.51.jar hudson.remoting.Launcher -cp /opt/bitnami/apps/jenkins/jenkins_home/plugins/selenium/WEB-INF/lib/selenium-server-standalone-2.41.0.jar -connectTo localhost:53241 Starting Selenium Grid channel started 2015-06-08 18:26:03.764:INFO:osjs.Server:jetty-7.x.y-SNAPSHOT 2015-06-08 18:26:03.868:INFO:osjsh.ContextHandler:started o.s.j.s.ServletContextHandler{/,null} 2015-06-08 18:26:03.899:WARN:osjuc.AbstractLifeCycle:FAILED SocketConnector@bitnami-jenkins-2516.cloudapp.net:4444: java.net.BindException: Cannot assign requested address java.net.BindException: Cannot assign requested address at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.AbstractPlainSocketImpl.bind(Unknown Source) at java.net.ServerSocket.bind(Unknown Source) at java.net.ServerSocket.(Unknown Source) at org.seleniumhq.jetty7.server.bio.SocketConnector.newServerSocket(SocketConnector.java:91) at org.seleniumhq.jetty7.server.bio.SocketConnector.open(SocketConnector.java:80) at org.seleniumhq.jetty7.server.AbstractConnector.doStart(AbstractConnector.java:311) at org.seleniumhq.jetty7.server.bio.SocketConnector.doStart(SocketConnector.java:151) at org.seleniumhq.jetty7.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) at org.seleniumhq.jetty7.server.Server.doStart(Server.java:272) at org.seleniumhq.jetty7.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) at org.openqa.grid.web.Hub.start(Hub.java:167) at hudson.plugins.selenium.HubLauncher.call(HubLauncher.java:46) at hudson.plugins.selenium.HubLauncher.call(HubLauncher.java:20) at hudson.remoting.UserRequest.perform(UserRequest.java:121) at hudson.remoting.UserRequest.perform(UserRequest.java:49) at hudson.remoting.Request$2.run(Request.java:325) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)

— Reply to this email directly or view it on GitHub.

kuroiokami commented 9 years ago

The only thing running on that box is jenkins on port 80

darkrift commented 9 years ago

Is the host address in the message a resolvable dns that would resolve to a local ip of the jenkins master ?

Richard Lavoie

On 2015-06-08, at 17:40, kuroiokami notifications@github.com wrote:

The only thing running on that box is jenkins on port 80

— Reply to this email directly or view it on GitHub.

kuroiokami commented 9 years ago

If the host address is this? localhost:53241 Where does the selenium plugin get this number? I don't see any place to change it

Also for SocketConnector@bitnami-jenkins-2516.cloudapp.net:4444

Again can this be configured? Is this the port that the node should try to connect to?

darkrift commented 9 years ago

localhost:53241 is randomly generated by jenkins. It is used to enable communication between processes that jenkins starts and jenkins itself. It is currently not configurable.

The host I'm more worried about is the cloudapp.net one as resolvable or not to a local ip on your server. This one and the port can be configured in the manage section of jenkins in the selenium section. The default configuration is to use the hostnsme specified in the jenkins url which depending on your env might not be the one you want. This is indeed where nodes will try to connect to register themselves to the hub.

Richard Lavoie

On 2015-06-08, at 19:41, kuroiokami notifications@github.com wrote:

If the host address is this? localhost:53241 Where does the selenium plugin get this number? I don't see any place to change it

Also for SocketConnector@bitnami-jenkins-2516.cloudapp.net:4444

Again can this be configured? Is this the port that the node should try to connect to?

— Reply to this email directly or view it on GitHub.

kuroiokami commented 9 years ago

So this is a Azure VM that i've opened up port 4444. I can get the cloud.app address fine from the net. Where can you change that port? It looks like the only configuration screens are for the nodes themselves

darkrift commented 9 years ago

is this ip resolvable from this vm to a local ip of this vm (what does nslookup tell you about it from the command lone of the vm)?

In the manage page of jenkins just where you configure the global options like authentication, there is a section for selenium to configure hub options.

Richard Lavoie

On 2015-06-09, at 07:40, kuroiokami notifications@github.com wrote:

So this is a Azure VM that i've opened up port 4444. I can get the cloud.app address fine from the net. Where can you change that port? It looks like the only configuration screens are for the nodes themselves

— Reply to this email directly or view it on GitHub.

CRuppert commented 9 years ago

@kuroiokami I have solved this issue. the problem is that the public dns name doesn't match up to the IP on the interface for your instance. The plugin, apparently does a dns lookup to determine what interface to bind to, instead of all (@darkrift: why is this, why not just bind to all interfaces?).

to correct the problem (as long as your vm has a single network interface): get a list of interfaces/ip addresses FROM the host machine (ipconfig in a shell), locate the IP Address, not the Gateway IP address.

then, add a hostname in your hosts file (c:\windows\system32\drivers\etc\hosts) using your dns name, and the ip obtained in the previous step.

restart jenkins

This should allow the hub to start. I am still having problems getting slaves to start (when clicking start on the "selenium grid" tab in the slave NOTHING happens)

rouke-broersma commented 8 years ago

See #60