如何从 Websphere 的标准输出日志中找出哪个端口用于 Web 服务器模块?
How to find out which port is used for web server module from Websphere's standard output log?
假设无法访问生产环境并且无法访问管理控制台,我必须找出 Websphere 使用哪个端口来侦听 REST 控制器的新 http 请求。我找到的唯一条目如下所示:
webcontainer I com.ibm.ws.webcontainer.VirtualHostImpl addWebApplication SRVE0250I: Web Module WebSphere ASYNC Response Servlet Application has been bound to default_host[*:8012,*:80,*:8013,*:8014,*:8015,*:443,*:9080,*:9443,*:5060,*:5061,*:8097,*:8019,*:8085].
标准输出日志中是否有任何其他信息明确说明 Web 服务器绑定到哪个端口?或者可能使用了所有提到的端口?
Websphere 版本 8.5.5
这些是 虚拟 host/port 组合,任何特定服务器上的 listening 端口将是一个子集。
查找消息 "TCPC0001I:" 至少会向您显示实际的侦听端口。
如果您发现问题中的消息有交集,您可能已经找到了正确的 host/port 连接,至少从本地系统的角度来看。
通常该端口是可预测的 -- 9080。但是并置应用服务器或创建大量配置文件将导致默认 Web 容器侦听端口增加。
检查日志中是否有以下消息:
...TCPChannel I TCPC0001I: TCP Channel TCP_2 is listening on host * (IPv6) port 9080.
...WSChannelFram A CHFW0019I: The Transport Channel Service has started chain WCInboundDefault.
...TCPChannel I TCPC0001I: TCP Channel TCP_4 is listening on host * (IPv6) port 9443.
...WSChannelFram A CHFW0019I: The Transport Channel Service has started chain WCInboundDefaultSecure.
其中 WCInboundDefault
是服务器的 http 端口,WCInboundDefaultSecure
是 https 端口。
假设无法访问生产环境并且无法访问管理控制台,我必须找出 Websphere 使用哪个端口来侦听 REST 控制器的新 http 请求。我找到的唯一条目如下所示:
webcontainer I com.ibm.ws.webcontainer.VirtualHostImpl addWebApplication SRVE0250I: Web Module WebSphere ASYNC Response Servlet Application has been bound to default_host[*:8012,*:80,*:8013,*:8014,*:8015,*:443,*:9080,*:9443,*:5060,*:5061,*:8097,*:8019,*:8085].
标准输出日志中是否有任何其他信息明确说明 Web 服务器绑定到哪个端口?或者可能使用了所有提到的端口?
Websphere 版本 8.5.5
这些是 虚拟 host/port 组合,任何特定服务器上的 listening 端口将是一个子集。
查找消息 "TCPC0001I:" 至少会向您显示实际的侦听端口。 如果您发现问题中的消息有交集,您可能已经找到了正确的 host/port 连接,至少从本地系统的角度来看。
通常该端口是可预测的 -- 9080。但是并置应用服务器或创建大量配置文件将导致默认 Web 容器侦听端口增加。
检查日志中是否有以下消息:
...TCPChannel I TCPC0001I: TCP Channel TCP_2 is listening on host * (IPv6) port 9080.
...WSChannelFram A CHFW0019I: The Transport Channel Service has started chain WCInboundDefault.
...TCPChannel I TCPC0001I: TCP Channel TCP_4 is listening on host * (IPv6) port 9443.
...WSChannelFram A CHFW0019I: The Transport Channel Service has started chain WCInboundDefaultSecure.
其中 WCInboundDefault
是服务器的 http 端口,WCInboundDefaultSecure
是 https 端口。