我知道简短的回答是“你告诉它的”。但是,当然,我不确定我是如何告诉 Tomcat 以8000
打开默认调试端口开始的,而是打开0.0.0.0
而不是预期的127.0.0.1
. 这是 Ubuntu 10.10 启动后的几个上下文命令。
$ netstat -lnt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN
tcp6 0 0 127.0.0.1:8080 :::* LISTEN
tcp6 0 0 ::1:631 :::* LISTEN
tcp6 0 0 127.0.0.1:8005 :::* LISTEN
/usr/share/tomcat6/bin$ grep -C 5 8000 catalina.sh
#
# JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start"
# command is executed. The default is "dt_socket".
#
# JPDA_ADDRESS (Optional) Java runtime options used when the "jpda start"
# command is executed. The default is 8000.
#
# JPDA_SUSPEND (Optional) Java runtime options used when the "jpda start"
# command is executed. Specifies whether JVM should suspend
# execution immediately after startup. Default is "n".
#
--
if [ "$1" = "jpda" ] ; then
if [ -z "$JPDA_TRANSPORT" ]; then
JPDA_TRANSPORT="dt_socket"
fi
if [ -z "$JPDA_ADDRESS" ]; then
JPDA_ADDRESS="8000"
fi
if [ -z "$JPDA_SUSPEND" ]; then
JPDA_SUSPEND="n"
fi
if [ -z "$JPDA_OPTS" ]; then
鉴于这两个输出,我希望在某个地方发现我在不知不觉中修改了另一个配置文件,因为catalina.sh
打开的唯一方法8000
是如果它通过了jpda
开关,即使这样,它似乎也会开始 onlocalhost
而不是0.0.0.0
. .bashrc
没有tomcat tomfoolery,我很难过还有其他地方可以看!