Tomcat 7 as windows service not accessible from other systems

筅森魡賤 提交于 2019-12-09 16:33:55

问题


I have downloaded Tomcat 7 zip for 32 bit windows 7 machine. I have unzipped the package and created the windows service using ..\bin\service.bat. But when i start the service from windows services.msc, i could NOT access by web application from other systems. It can be accessed from localhost.

But when i start the tomcat from command line using ..\bin\startup.bat i CAN access my web application from other systems.

I have added address="0.0.0.0" in ..\conf\server.xml of tomcat. But still the problem exists. Tried with adding exception in firewall too. But no luck.

OS: Windows 7 Professional

Any ideas??

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

回答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



回答2:


I start Tomcat7 using Eclipse java IDE and I had to disable the Windows 7 firewall rules blocking "program files\java\jre\javaw.exe" for both TCP and UDP. Then my other PC could access the web server.




回答3:


Another solution could be to install tomcat as a win service to make it available from outside.

If you have already install tomcat, then you can register it as service using below command.

service.bat install/remove [service_name] [/user username]

Both will solve the issue.



来源:https://stackoverflow.com/questions/20419058/tomcat-7-as-windows-service-not-accessible-from-other-systems

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!