【发布时间】:2014-05-17 07:26:58
【问题描述】:
我必须要系统:一台 mac 和一台 centos。两者都在 8080 上运行 apache tomcat,监听 ipv4。
都嵌套 -an | grep 8080 显示:127.0.0.1:8080 LISTEN 未启用 IPTABLES 未启用 SeLinux
两个 server.xml 看起来和我一模一样...
我部署了一个休息服务器应用程序。 在 mac CURL 以 200 OK 和 json 数据响应 在 centos CURL 上响应 404 ...
macos 的卷曲响应:
* About to connect() to localhost port 8080 (#0)
* Trying ::1...
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET /core/rest/metadata/brand HTTP/1.1
> User-Agent: curl/7.30.0
> Host: localhost:8080
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: application/json
< Transfer-Encoding: chunked
centos 的卷曲响应:
* About to connect() to localhost port 8080 (#0)
* Trying ::1... Connection refused
* Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET /core/rest/metadata/brand HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: localhost:8080
> Accept: */*
>
< HTTP/1.1 404 Not Found
(应用程序正在后台运行,因为正在从 DB 计算一些数据,并在 catalina.out 日志中显示正确的响应)。我所需要的只是我的 Rest 界面,它可以在我的开发机器(mac)上运行,而不是在 prod(centos)上运行
我的调查中有什么遗漏吗?
【问题讨论】: