【问题标题】:Tomcat 7 as windows service not accessible from other systemsTomcat 7 作为 Windows 服务无法从其他系统访问
【发布时间】:2013-12-06 08:10:28
【问题描述】:

我已经为 32 位 windows 7 机器下载了 Tomcat 7 zip。我已解压缩包并使用 ..\bin\service.bat 创建了 Windows 服务。但是当我从 windows services.msc 启动服务时,我无法通过其他系统的 Web 应用程序访问。它可以从 localhost 访问。

但是当我使用 ..\bin\startup.bat 从命令行启动 tomcat 时,我可以从其他系统访问我的 Web 应用程序。

我在tomcat的..\conf\server.xml中添加了address="0.0.0.0"。但问题仍然存在。也尝试在防火墙中添加例外。但没有运气。

操作系统:Windows 7 专业版

有什么想法吗??

Solution:

Add the ..\bin\tomcat7.exe to the Windows exception list. Everything works fine.
1. To to Windows Start --> Control Panel
2. Open windows firewall
3. Click on "Allow a program or feature through windows firewall" in the left menu
4. Add tomcat7.exe to the exception list and click ok.
5. Restart tomcat and now you can access tomcat from other machines

【问题讨论】:

  • 我们也遇到过这个问题。是防火墙。
  • 有什么解决办法吗?
  • 停止 Windows 防火墙服务,看看问题是否仍然存在。请注意,这个问题与代码无关,因此应该在服务器故障或超级用户中提出

标签: windows tomcat windows-7 tomcat7


【解决方案1】:
Solution:

Add the ..\bin\tomcat7.exe to the Windows exception list. Everything works fine.
1. Go to Windows Start --> Control Panel
2. Open windows firewall
3. Click on "Allow a program or feature through windows firewall" in the left menu
4. Add tomcat7.exe to the exception list and click ok.
5. Restart tomcat and now you can access tomcat from other machines

【讨论】:

  • 好的,这解决了我的问题,但为什么它没有作为服务安装时可以工作?
  • 这意味着你需要设置入站允许TCP和UDP允许来自安装tomcat服务器的系统的防火墙。
  • 对我来说,这已经在列表中,名称为“Common Deamon Service Runner”,我所要做的就是选择“public”复选框。
【解决方案2】:

我使用 Eclipse java IDE 启动 Tomcat7,我必须禁用 Windows 7 防火墙规则,阻止 TCP 和 UDP 的“程序文件\java\jre\javaw.exe”。然后我的另一台电脑就可以访问网络服务器了。

【讨论】:

    【解决方案3】:

    另一种解决方案是安装 tomcat 作为 win 服务,以使其从外部可用。

    如果你已经安装了tomcat,那么你可以使用下面的命令将它注册为服务。

    service.bat 安装/删除 [service_name] [/user 用户名]

    两者都会解决问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-12-04
      • 2013-06-19
      • 2018-02-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多