我正在尝试在Windows服务器上设置Hudson。
当我尝试使用命令java -jar hudson.war
运行Hudson时,我收到一个错误,表明该地址已用于HTTP侦听器。
我已确认未使用端口8080(默认的Hudson HTTP端口)。我也尝试在另一个端口(java -jar hudson.war --httpPort=8888
)上启动Hudson,但错误相同。
如果我浏览http://localhost:8080,那么我会得到一个'它有效!'网页上的消息。但是,如果我浏览到http://localhost:8080/hudson,则会收到404错误。
这是log:
D:\hudson>java -jar hudson.war
Running from: D:\hudson\hudson.war
[Winstone 2010/10/27 11:07:47] - Beginning extraction from war file
hudson home directory: C:\Documents and Settings\scottk\.hudson
[Winstone 2010/10/27 11:07:54] - Error during HTTP listener init or shutdown
java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at winstone.HttpListener.getServerSocket(HttpListener.java:102)
at winstone.HttpListener.run(HttpListener.java:116)
at java.lang.Thread.run(Unknown Source)
[Winstone 2010/10/27 11:07:54] - HTTP Listener shutdown successfully
[Winstone 2010/10/27 11:07:54] - AJP13 Listener started: port=8009
Using one-time self-signed certificate
[Winstone 2010/10/27 11:07:54] - Winstone Servlet Engine v0.9.10 running: controlPort=disabled
Oct 27, 2010 11:07:55 AM hudson.model.Hudson$4 onAttained
INFO: Started initialization
Oct 27, 2010 11:07:56 AM hudson.model.Hudson$4 onAttained
INFO: Listed all plugins
Oct 27, 2010 11:07:56 AM hudson.model.Hudson$4 onAttained
INFO: Prepared all plugins
Oct 27, 2010 11:07:56 AM hudson.model.Hudson$4 onAttained
INFO: Started all plugins
Oct 27, 2010 11:07:57 AM hudson.model.Hudson$4 onAttained
INFO: Loaded all jobs
Oct 27, 2010 11:08:01 AM hudson.model.Hudson$4 onAttained
INFO: Completed initialization
Oct 27, 2010 11:08:01 AM hudson.TcpSlaveAgentListener <init>
INFO: JNLP slave agent listener started on TCP port 1162
未使用端口8080:
D:\>netstat -o
Active Connections
Proto Local Address Foreign Address State PID
TCP dev1:1038 dev1.GCCU.local:15003 ESTABLISHED 1668
TCP dev1:1142 dev1.GCCU.local:1143 ESTABLISHED 1668
TCP dev1:1143 dev1.GCCU.local:1142 ESTABLISHED 1668
TCP dev1:1144 dev1.GCCU.local:1145 ESTABLISHED 1668
TCP dev1:1145 dev1.GCCU.local:1144 ESTABLISHED 1668
TCP dev1:15003 dev1.GCCU.local:1038 ESTABLISHED 1316
TCP dev1:1081 172.16.1.7:1000 ESTABLISHED 2100
TCP dev1:1127 app1.gccu.local:netbios-ssn ESTABLISHED 4
TCP dev1:1129 gccufs1.gccu.local:microsoft-ds ESTABLISHED 4
TCP dev1:1138 sql1.gccu.local:netbios-ssn ESTABLISHED 4
TCP dev1:1167 dc2.gccu.local:microsoft-ds TIME_WAIT 0
TCP dev1:ms-wbt-server devpc1.gccu.local:54699 ESTABLISHED 2916
答案 0 :(得分:0)
我从http://hudson-ci.org/download/war/下载了最新的.war文件,指定了端口8888而不是8080,现在它可以工作了。看起来端口8080上必须运行一些东西,而我试图在1.381之前使用的版本有问题。