1

我对 apache/tomcat/axis 很陌生。当我按照他们的教程开始安装axis2时,我已经安装了apache/tomcat。当我尝试启动轴服务时,出现此错误:

[INFO] Listening on port 8080
[WARN] Attempt number 10 of 10 to reestalish connection listener org.apache.axis2.transport.http.server.DefaultConnectionListener@19a029e due to failure 
java.net.BindException: Address already in use
    at java.net.PlainSocketImpl.socketBind(Native Method)
    at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:353)
    at java.net.ServerSocket.bind(ServerSocket.java:336)
    at java.net.ServerSocket.<init>(ServerSocket.java:202)
    at java.net.ServerSocket.<init>(ServerSocket.java:114)
    at org.apache.axis2.transport.http.server.DefaultConnectionListener.run(DefaultConnectionListener.java:81)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:679)
[INFO] Listening on port 8080
[ERROR] Terminating connection listener org.apache.axis2.transport.http.server.DefaultConnectionListener@19a029e after 10retries in 0 seconds.
java.net.BindException: Address already in use
    at java.net.PlainSocketImpl.socketBind(Native Method)
    at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:353)
    at java.net.ServerSocket.bind(ServerSocket.java:336)
    at java.net.ServerSocket.<init>(ServerSocket.java:202)
    at java.net.ServerSocket.<init>(ServerSocket.java:114)
    at org.apache.axis2.transport.http.server.DefaultConnectionListener.run(DefaultConnectionListener.java:81)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:679)
[INFO] [SimpleAxisServer] Started
[SimpleAxisServer] Started

所以我发现如果我将 $AXIS2_HOME/conf/axis2.xml 传输接收器端口从 8080 更改为 8081,那么该服务将起作用。但是每次我浏览时导航到http://localhost:8081它都会重定向到localhost:8081/axis2/services,我永远无法访问我阅读的漂亮的小轴主页,我应该能够访问。

因此,在本教程的后面,我创建了我的axis2.war 文件并在tomcat/webapps 文件夹中放置了一个副本。重新启动,但我仍然坚持没有得到 Axis2 主页?

4

2 回答 2

2

您在服务器轴和 tomcat apache 端口之间存在冲突,那是因为您试图在同一个端口上启动两个服务器。

要修复它,您必须构建第一个轴的 .war 并将其作为 servlet 在 tomcat 的 webapps 文件夹中运行,以获得您想要的可爱页面,在 tomcat 的服务器中。

于 2013-11-11T19:50:27.593 回答
0

可以直接下载Axis2.war文件,放到tomcat服务器的webapp文件夹下。一旦启动tomcat服务器axis2也在上面运行。然后你可以访问 URL:localhost:8080/axis2

于 2015-07-13T05:12:02.393 回答