Sultan Ahmed
Sultan Ahmed

Reputation: 2220

tomcat start but can't listen from another pc

I am running tomcat in linux pc whose ip address is 192.168.1.31 and port number is 8084 . I have tested it via the following url :

http://192.168.1.31:8084/

The welcome message is come as depicted int he following picture :
enter image description here

But when I enter the above address from another pc (windwos 10 ) , I am getting this error :

This site can’t be reached

192.168.1.31 took too long to respond.
Search Google for 201 8084
ERR_CONNECTION_TIMED_OUT

I have firewall off . I cant understand where is the error . Please help me .

Upvotes: 0

Views: 198

Answers (1)

ka4eli
ka4eli

Reputation: 5424

IP address which starts with192.168. by default is for local network, so if your windows machine isn't in this network it actually can't reach your tomcat. Check ipconfig on your windows machine and try to find address which starts from 192.168. to find it out.

Also you can change your tomcat bind address in the config file tomcat/conf/server.xml and bind tomcat to public IP address.

Another solution is to configure your iptables to forward traffic from some port of your public IP to the port 8084 on your local network.

Upvotes: 2

Related Questions