Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have installed the apache-tomcat server on my local win7. The port I specified is 9999. Additionally, I use the distributed binary version of apache tomcat. Not installing as a windows service.

I can access my service by http://localhost:9999 and http://myIPAddress:9999

But I cannot access my apache server from other computers. I searched on the internet, and found I should add a firewall inbound rule in its advanced settings.

  1. Right click "Inbound Rules" on the left pane
  2. Choose "New Rule"
  3. Choose "Port"
  4. Under "Specific ports" enter your port number (9999)
  5. Continue with "Next" until the end of the wizard, naming the rule when asked.

After doing this, it still doesn't work!!

I have checked with "netstat -na" to see that: TCP 0.0.0.0:9999 0.0.0.0:0 LISTENING

Then only method I find by far is turning off my windows firewall! But this is not preferred since the potential security risk.

Some online post refers to httpd.conf file. But my apache-tomcat have no such kind of fire.

Could someone give me some hints?


EDIT:

There are three places related to port number setting in the /conf/server.xml file.

<Server port="8005" shutdown="SHUTDOWN">

<Connector port="9999" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />// I change the 8080 to 9999 for my own use.

<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

share|improve this question
    
So when you turned your firewall off, it worked? –  Danila Ladner May 4 '13 at 4:29
    
Eh, 9999 and 8009 aren't the same... –  Chris S May 4 '13 at 4:30
    
@DanilaLadner yes. if i turned off windows firewall, it will work fine. But this is not really secure for my own computer. –  Zack May 4 '13 at 4:55
    
@ChrisS Sorry, it is a typo. 8009 is another port listening. –  Zack May 4 '13 at 4:55
1  
This has nothing to do with your tomcat configuration. Access is being blocked when you enable the firewall, and it's being allowed when the firewall is down. –  tdk2fe May 4 '13 at 5:08

1 Answer 1

Use the Advanced Firewall interface, make sure the profile (private, public, etc) matches what zone the interface is associated with in the Network and Sharing Center, then verify there is an enabled rule that allows the protocol and port (TCP 9999). tdk2fe is right, if it works with the firewall off, the app is configured correctly and the issue is in the firewall.

**Reading your post again, make SURE the rule you added was enabled...

share|improve this answer
    
What you mentioned here are all confirmed by me. I even checked the private, public, domain boxes. And the inbound rule is TCP 9999. It is enabled. This is really tough question. –  Zack May 4 '13 at 10:54
    
The issue is definitely in the firewall since it works when that is disabled. You also have some other ports listed such as 8009 and 8443, you may need to include these in ENABLED allow firewall rules with the appropriate interface, zone, subnet(s), etc... –  John W May 4 '13 at 17:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.