• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

access tomcat on LAN

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

This is a very silly question, but please help me asap.

I have a LAN of 5 computers. One has tomcat 5.5 installed on it and my JSP webapp deployed on this tomcat. I can access this app from localhost, i.e. the same machine on which tomcat is installed. But I want to use this machine as a central server for other 4 machines. How can i access my webapp remotely over lan?

I tried the following:
http://ipaddress:8080/myapp
http://computername:8080/myapp

i also tried adding the server machine's ip addr with its netbios name in hosts and lmhosts file on all the other 4 systems. NOTHING WORKS.

Please guide ASAP.
 
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you ping it from other machines? If no there might be some problem in network, if yes try to telnet using the following command

telnet ipaddress 8080

if it does not work, some firewall might be blocking port 8080
 
Priya Bindra
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes i can ping the ip from other machines, but browser does not give access to tomcat homepage or my webapp
 
Swastik Dey
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you telnet the machine on port 8080?
 
Priya Bindra
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i tried:
telnet 192.168.1.15 8080

this is server's ip. cudbt connect
 
Swastik Dey
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There seems to be some firewall blocking that particular port. So there can be two possible solutions, either you have to remove the firewall settings or you have to change the port number of tomcat.
 
Priya Bindra
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i tried to telnet without port no, and with arbid port no such as 36000. i still cudnt connect. is there any point changing port for tomcat till i can successfully telnet the server?
 
Swastik Dey
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As far as i know for telnet some service needs to run, if you are not giving any port means you are hitting the default telnet port 23 so in that case the telnet server needs to run, and if you are using some arbitrary port, in that case some service needs to run on that port. So nothing wrong in changing the tomcat port and test it once.
 
Saloon Keeper
Posts: 28319
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Priya, please keep the abbreviations to a minimum. A lot of people here aren't fluent in English, and when abbreviations are concerned, even people fluent in English may not be familiar with dialectical abbreviations. Plus, I think you misspelled one, which made it even more cryptic.

One of the great things about the Internet is that most of the primary protocols are text-based, which means that for testing purposes, you can converse with them via telnet. The reason that text was used was partly for that very reason, and partly because in the early days, a lot of different brands of computers were talking to each other. Some of them were DEC machines, which are binary bytewise-discontinuous in their RAM organization, and used ASCII, and some of them were IBM mainframes, which are bytewise-continuous and EBCDIC. So 7-bit text was the common denominator.

You are correct. As long as you get a "connection refused" when attempting to telnet to port 8080 on your Tomcat server, there's no point in playing with Tomcat. Evidently there's a firewall between client and server, and overall it's better to open up port 8080 in that firewall. If you were to switch Tomcat to port 80, it would have to run as a root process on most server OS's, you might find port 80 was already being used by some other process such as Apache or IIS, and it's even possible that port 80 was firewalled as well.
 
Priya Bindra
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Swastik Dey wrote:As far as i know for telnet some service needs to run, if you are not giving any port means you are hitting the default telnet port 23 so in that case the telnet server needs to run, and if you are using some arbitrary port, in that case some service needs to run on that port. So nothing wrong in changing the tomcat port and test it once.



tried changing port 8080 to 2020 in server.xml on tomcat. restarted it. telnet didnt work. please help solve this problem or i wudnt be able to set up a development environment for my team.
 
Priya Bindra
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks all. i did it finally. i used microsoft help to unblock tomcat port in windows firewall. now it works.
 
I found some pretty shells, some sea glass and this lovely tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic