私はセレンに不慣れです。既存のセレンRCコードを実行しています。ハブを起動しようとすると、次のエラーが発生しました
tools.jarが見つかりません。C:\ Program Files \ Java \ jre6 \ lib \ tools.jar Buildfileにあるはずです:build.xmlは存在しません!ビルドに失敗しました
そこで、JDKファイルをダウンロードしました。次に、システム変数を変更しました。
C:\>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.7.0_11
C:\>echo %PATH%
c:\ruby\bin;C:\ant\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C
:\Program Files\Windows Imaging\;C:\Program Files\Common Files\Roxio Shared\DLLS
hared\;C:\Program Files\Java\jre1.6.0_05\bin;C:\Program Files\Java\jdk1.7.0_11
C:\>echo %ANT_HOME%
C:\ant\bin\ant.bat
次のbatファイルを実行してハブを起動しました--launchhub.bat
title Hub
cd C:\selenium\Grid\selenium-grid-1.0.4
c:\ant\bin\ant launch-hub
出力
C:\selenium\Grid\selenium-grid-1.0.4>c:\ant\bin\ant launch-hub
Buildfile: build.xml
launch-hub:
[java] jan 16, 2013 2:45:25 PM com.thoughtworks.selenium.grid.hub.HubRegist
ry gridConfiguration
[java] INFO: Loaded grid configuration:
[java] ---
[java] hub:
[java] environments:
[java] -
[java] browser: "*firefox"
[java] name: Firefox on Windows
[java] -
[java] browser: "*firefox"
[java] name: Firefox on OS X
[java] -
[java] browser: "*firefox"
[java] name: Firefox on Linux
[java] -
[java] browser: "*iehta"
[java] name: IE on Windows
[java] -
[java] browser: "*safari"
[java] name: Safari on OS X
[java] -
[java] browser: "*firefox"
[java] name: "*firefox"
[java] -
[java] browser: "*firefox2"
[java] name: "*firefox2"
[java] -
[java] browser: "*firefox3"
[java] name: "*firefox3"
[java] -
[java] browser: "*chrome"
[java] name: "*chrome"
[java] -
[java] browser: "*iexplore"
[java] name: "*iexplore"
[java] -
[java] browser: "*iehta"
[java] name: "*iehta"
[java] -
[java] browser: "*safari"
[java] name: "*safari"
[java] -
[java] browser: "*opera"
[java] name: "*opera"
[java] -
[java] browser: "*googlechrome"
[java] name: "*googlechrome"
[java] -
[java] browser: "*firefoxproxy"
[java] name: "*firefoxproxy"
[java] -
[java] browser: "*pifirefox"
[java] name: "*pifirefox"
[java] -
[java] browser: "*iexploreproxy"
[java] name: "*iexploreproxy"
[java] -
[java] browser: "*piiexplore"
[java] name: "*piiexplore"
[java] -
[java] browser: "*safariproxy"
[java] name: "*safariproxy"
[java]
[java] 2013-01-16 14:45:25.161::INFO: Logging to STDERR via org.mortbay.lo
g.StdErrLog
[java] 2013-01-16 14:45:25.224::INFO: jetty-6.0.x
[java] 2013-01-16 14:45:25.364::WARN: failed SocketConnector @ 0.0.0.0:444
4
[java] java.net.BindException: Address already in use: JVM_Bind
[java] at java.net.TwoStacksPlainSocketImpl.socketBind(Native Method)
[java] at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl
.java:376)
[java] at java.net.TwoStacksPlainSocketImpl.bind(TwoStacksPlainSocketIm
pl.java:101)
[java] at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:175)
[java] at java.net.ServerSocket.bind(ServerSocket.java:376)
[java] at java.net.ServerSocket.<init>(ServerSocket.java:237)
[java] at java.net.ServerSocket.<init>(ServerSocket.java:181)
[java] at org.mortbay.jetty.bio.SocketConnector.newServerSocket(SocketC
onnector.java:78)
[java] at org.mortbay.jetty.bio.SocketConnector.open(SocketConnector.ja
va:72)
[java] at org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector
.java:251)
[java] at org.mortbay.jetty.bio.SocketConnector.doStart(SocketConnector
.java:145)
[java] at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCyc
le.java:40)
[java] at org.mortbay.jetty.Server.doStart(Server.java:239)
[java] at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCyc
le.java:40)
[java] at com.thoughtworks.selenium.grid.hub.HubServer.main(HubServer.j
ava:39)
[java] 2013-01-16 14:45:25.364::WARN: failed Server@d38c3d
[java] java.net.BindException: Address already in use: JVM_Bind
[java] at java.net.TwoStacksPlainSocketImpl.socketBind(Native Method)
[java] at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl
.java:376)
[java] at java.net.TwoStacksPlainSocketImpl.bind(TwoStacksPlainSocketIm
pl.java:101)
[java] at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:175)
[java] at java.net.ServerSocket.bind(ServerSocket.java:376)
[java] at java.net.ServerSocket.<init>(ServerSocket.java:237)
[java] at java.net.ServerSocket.<init>(ServerSocket.java:181)
[java] at org.mortbay.jetty.bio.SocketConnector.newServerSocket(SocketC
onnector.java:78)
[java] at org.mortbay.jetty.bio.SocketConnector.open(SocketConnector.ja
va:72)
[java] at org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector
.java:251)
[java] at org.mortbay.jetty.bio.SocketConnector.doStart(SocketConnector
.java:145)
[java] at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCyc
le.java:40)
[java] at org.mortbay.jetty.Server.doStart(Server.java:239)
[java] at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCyc
le.java:40)
[java] at com.thoughtworks.selenium.grid.hub.HubServer.main(HubServer.j
ava:39)
[java] Exception in thread "main" java.net.BindException: Address already i
n use: JVM_Bind
[java] at java.net.TwoStacksPlainSocketImpl.socketBind(Native Method)
[java] at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl
.java:376)
[java] at java.net.TwoStacksPlainSocketImpl.bind(TwoStacksPlainSocketIm
pl.java:101)
[java] at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:175)
[java] at java.net.ServerSocket.bind(ServerSocket.java:376)
[java] at java.net.ServerSocket.<init>(ServerSocket.java:237)
[java] at java.net.ServerSocket.<init>(ServerSocket.java:181)
[java] at org.mortbay.jetty.bio.SocketConnector.newServerSocket(SocketC
onnector.java:78)
[java] at org.mortbay.jetty.bio.SocketConnector.open(SocketConnector.ja
va:72)
[java] at org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector
.java:251)
[java] at org.mortbay.jetty.bio.SocketConnector.doStart(SocketConnector
.java:145)
[java] at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCyc
le.java:40)
[java] at org.mortbay.jetty.Server.doStart(Server.java:239)
[java] at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCyc
le.java:40)
[java] at com.thoughtworks.selenium.grid.hub.HubServer.main(HubServer.j
ava:39)
私のトレーニングドキュメントには、次のように記載されています。•「startedSocketConnector」ステートメントと「44」が表示されるのを待ちます。
しかし、私はそれを取得できませんでした。SocketConnectorが故障したためだと思います。私がそれを修正するのを手伝ってください。