Tomcat 7.0 issue - java

I have a tomcat7.0 running in a remote desktop machine say 204.34.34.45.
When I log into the remote desktop and try "http://localhost:8080" it is working fine.However
http://204.34.34.45:8080 is not working.
I am able to ping 204.34.34.45 from outside the remote desktop machine.
Do you know how can I access tomcat outside the remote desktop machine.

The firewall rules for that host may not allow connections to 8080. Talk to your system administrator for details.
Also, make sure you have the correct IP bindings set up for tomcat. It is possible to allow connections to localhost:8080, but disallow them from 204.34.34.45:8080. See How do you configure tomcat to bind to a single ip address (localhost) instead of all addresses?

Related

Not able to connect localhost with system ip

I have deployed my java web application using apache tomcact in my system through Eclipse. I can access the same page with
https://localhost:8080/Home.jsp
as well
https://mysystemip:8080/Home.jsp
But the same page is not able to connect
https://mysystemip:8080/Home.jsp over the network through other systems. Previously it was working and now not. What issue causing this ?
Your Tomcat server is only bound to your local network interface. You need to bind it to all interfaces for it to be available.
There is already a solution (Can't access Tomcat using IP address):
Add address="0.0.0.0" to Connector string

Can I access my application running on localhost:8080 from WAN..?

I developed an application in my home machine. Now I want to show application that i made to client through WAN. I have TP-Link WiFi router at my home. Is it possible using port forwarding or other solution ?
Yes, you can use port forwarding to make your application accessible from the Internet. Essentially, what you want to do is redirect traffic coming into your public IP on port 80 to the internal machine running tomcat on port 8080.
There are public guides available for configuring port forwarding on different routers.
Edit: Port forwarding however might not be the only problem. There are other things to consider:
1. You should use a static external IP and map it to a DNS name, so users will be able to access the site by typing the name in the address bar.
2. You should make sure that the machine running tomcat allows external connections to port 8080, so these aren't blocked by the firewall.

Apache tomcat - how to open the browser in remote machine

I have a local machine , say A with IP (a.a.a.a) and a linux server, say B with IP (b.b.b.b)
Now I have created a war file with name 'example' and deployed it in Apache tomcat in our linux server.
I want to open the browser in my local machine by typing the following in address bar :
http://b.b.b.b:8080/example
But I am not able to open it.
Could any one please suggest where in lies the issue?
Note : We can connect from A to B using only VNC viewer and not able to connect it through remote desktop connection application.
Does this implies that there is some issue in network connectivity or what? I think as we are able to connect B using VNC viewer, the problem should not be there.
Please help.
++++++++++++++++
extended
I have installed the apache tomcat server in my linux server which doesnot have any internet connecttion and deployed the war file in the server successfully.
and want to open browser from my local machine using (linux_IP)//8080//war_file_name
Note : local machine connects linux server through VNC only.
Could any one suggest is it possible in this scenario?
If you can only open server B using VNC, then there is a definite possibility that port 8080 is not open. The port 8080 should be open on the server. To check that you could try :
telnet host port
so for you:
telnet b.b.b.b 8080
from your machine.
Another thing to do is to start tomcat with IP address of your linux server to listen. Start tomcat with parameters:
-b b.b.b.b (ip address of your linux machine).
To me if definitely feels like a firewall problem.

Running Jetty web server in LAN

GAE comes with an inbuilt jetty webserver for testing purpose.Can it be configured to accessed within our LAN?
I can access it using http://localhost:8888 or http://127.0.0.1:8888 but can't access using http://192.168.1.201:8888 (This my local LAN ip)
why?
Yes it is possible:
To make your GAE accessible on your LAN, you have to configure the launcher to use the address 0.0.0.0 instead of localhost.
Open the GoogleAppEngineLauncher >> Application Settings for your app
Add “-a 0.0.0.0″ to the Extra Flags section and restart. Now your GAE will run in your LAN and can be accessed by other devices.
You need to configure GAE to listen on all interfaces, not only localhost's loopback interface (127.0.0.1).
For IntelliJ IDEA users (version 11 at least):
If you're using the GAE plugin and have a AppEngine Run configuration, open its settings and add to Server parameters: -a 0.0.0.0. This will make the GAE built-in Jetty server to listen on your lan/wlan ip address, http://10.0.1.2 for instance.

How to connect to machine ip address & port via grails app

I'm running MacOS 10.6 with the default settings for my machine with Internet Sharing turned on.
What needs to be configured to allow access to my machine's grails/jetty instance on a specific port?
I can do 'http://localhost/' as well as 'http://192.x.x.x/' but if I were to set my grails app to run on a specific port, I can't access it with: 'http://192.x.x.x:8081/'.
The browser can't establish a connection with this address from my own machine and I know that I need to establish an accessible port in some config file.
I used to be able to do this prior to an upgrade from the last version of the OS but it's been so long I don't remember what I did the last time.
NOTE: I can use 'grails run-app -Dserver.port=' to specify a port number for jetty to run my grails application but that still doesn't allow my machine to be accessible by ip address & port number.
grails run-app -Dserver.port=<port number>
run-app Runs a grails app using the default Jetty container. The default http port is 8080. This can be customised by appending -Dserver.port= to the command line
See the grails website for more details.

Categories